I have huge number of jars listed in text file along with its versions. For ex:
- spring-jdbc-4.3.6.RELEASE.jar
- commons-codec.jar
- commons-fileupload.jar
. . . .
This list goes on for 500+ jars.
Problem: I need a pom.xml that comprises all these jars as dependency. I need this for GHAS scanning in github to determine the EOL's
Any jar file that is built by maven should have
pom.propertiesfile underMETA-INF\maven\${groupId}\${artifactId}. Thispom.propertiesfile should contain thegroupId,artifactIdandversionof the jarPersonally I'd write a gradle/groovy script to iterate the list of jar files, extract the
pom.propertiesfile and write apom.xmlsnippet (since gradle has really nice api's for iterating files and extracting from zipfiles etc).This could also be done in java although it would be more verbose (using
ZipInputStream)Here's what a gradle script might look like to achieve this