Command line tools for producing a POM from one or more JAR.
jar → maven search → pom
Based on the idea of Provenance by George Armhold.
Download version 2.0.0 here
In the directory where the pom.xml is, run:
mvn clean package
java -jar jar2pom.jar
or
java -jar jar2pom.jar -host 192.168.0.1 -i "c:\myProjet\source" -o "c:\output" -p -r
Show all options:
java -jar jar2pom.jar -h
Options (no options are mandatory):
-h (--help) : display help.
-host HOST : defined custom Nexus host.
(ex: oss.sonatype.org)
-i INPUT : input path (file or directory).
-o OUTPUT : directory output path.
(default output is console)
-p (--proxy) : Use system proxies.
-r : inspect input path recursively.
- Java 8
- args4j : interface and options for the command line
- NIO.2 : browse JAR files.
- Guava : calculating SHA1 from the contents of the JAR files.
- Jersey : Rest client
- mustache.java : generation of the output file
- Browse and detect all jars.
- For each JAR file, calculates the SHA1.
- Querying REST Services Maven repositories.
- Creating a POM file.
- a single jar.
- a folder containing jars (recursive or not).
April 22, 2015
Nexus:
URL | version |
---|---|
oss.sonatype.org | 2.11.2-06 |
repository.sonatype.org | 2.11.2-06 |
maven.java.net | 2.11.2-06 |
maven.atlassian.com | 2.11.2-06 |
repository.apache.org | 2.11.1-01 |
Search type:
- Checksum (SHA1).
Artifact idClass name
Output as an XML file [Partial POM].
- Sonatype OSS - Nexus Indexer Lucene Plugin REST API
- Sonatype RSO - Nexus Indexer Lucene Plugin REST API
Le service supporte des réponses en XML ou JSON uniquement pour certaines ressources. La définition XSD est disponible pour le XML uniquement pour une partie des ressources.
- Bug with
Nexus Indexer Lucene Plugin REST API
XSD : NEXUS-6755 da39a3ee5e6b4b0d3255bfef95601890afd80709
qui est le sha1 d'un fichier vide correspond à plus de 100 jars maisidentify
ne retourne qu'une seule valeur sans cohérence.
Example :
- search OSS XML only
- search OSS XML or JSON (Header : Accept=application/json)
- search RSO XML only
- search RSO XML or JSON (Header : Accept=application/json)
- Sonatype OSS - Nexus Core API (Restlet 1.x Plugin) REST API
- Sonatype RSO - Nexus Core API (Restlet 1.x Plugin) REST API
Le service supporte des réponses en XML ou JSON. Aucune définition XSD n'est disponible pour le XML.
Warning : la response ne correspond pas à l'artifact mais au "bundle", ie toutes les checksum d'un ensemble retourne toujours la même réponse.
ex : search
<!-- source url / file path -->
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
</dependency>
- source url
- absolute input file path
- artifact :
- groupId (groupId by default: unknownGroupId)
- artifactId (jar name by default)
- version (version by default: 0.0.0)
classifier