Maven: how to identify SHA jar files

I inherited an Ant based project that has over 80 MB jar files in the lib directory. I would like to convert it to Maven. Jar files are called very simply, for example quartz.jar . Since there is no pointer to a group identifier, much smaller version, converting this to pom.xml format will be very painful.

Is there a service or API that will return the Maven coordinates (group, artifact, version) for the jar file, given its SHA?

My rollback will be to examine the MANIFEST file from each jar, which will at least give me version information, if not specific Maven coordinates.

+6
source share
1 answer

And it seems that I need Google to find the checksum, not for the SHA. It appeared on this page:

How to Convert from Ant to Maven in 5 Minutes

... which explains that you can use checksum search on this page .

Based on this information, I simply encoded a quick project on Github that will use this API and automatically create XML dependency stanzas. You can use it like:

 $ java com.armhold.Provenance lib_dir 

And he will print Maven coords for every jar file found.

+12
source

Source: https://habr.com/ru/post/896531/


All Articles