{"id":15706537,"url":"https://github.com/ldez/jar2pom","last_synced_at":"2025-05-12T18:55:38.823Z","repository":{"id":19639482,"uuid":"22891620","full_name":"ldez/jar2pom","owner":"ldez","description":"Convert Jar to POM","archived":false,"fork":false,"pushed_at":"2020-10-12T19:43:14.000Z","size":214,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T01:51:08.387Z","etag":null,"topics":["jar","java","maven","pom"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ldez.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-12T20:34:29.000Z","updated_at":"2024-10-23T04:11:46.000Z","dependencies_parsed_at":"2022-08-24T02:50:21.847Z","dependency_job_id":null,"html_url":"https://github.com/ldez/jar2pom","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldez%2Fjar2pom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldez%2Fjar2pom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldez%2Fjar2pom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldez%2Fjar2pom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldez","download_url":"https://codeload.github.com/ldez/jar2pom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805343,"owners_count":21967050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jar","java","maven","pom"],"created_at":"2024-10-03T20:24:02.897Z","updated_at":"2025-05-12T18:55:38.800Z","avatar_url":"https://github.com/ldez.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n[![JAR2POM Logo](https://github.com/ldez/jar2pom/blob/master/jar2pom-medium.png)](https://github.com/ldez/jar2pom)\r\n\r\n\r\n# JAR2POM\r\n\r\n[![Build Status](https://travis-ci.org/ldez/jar2pom.svg?branch=master)](https://travis-ci.org/ldez/jar2pom) \r\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/2805/badge.svg)](https://scan.coverity.com/projects/2805)\r\n[![Coverage Status](https://coveralls.io/repos/ldez/jar2pom/badge.png)](https://coveralls.io/r/ldez/jar2pom)\r\n\r\n\r\n## Summary\r\n\r\nCommand line tools for producing a POM from one or more JAR.\r\n\r\n    jar → maven search → pom\r\n\r\nBased on the idea of [Provenance](https://github.com/armhold/Provenance) by [George Armhold](http://armhold.com).\r\n\r\n\r\n## Download\r\n\r\nDownload version 2.0.0 [here](https://github.com/ldez/jar2pom/releases/download/jar2pom-parent-2.0.0/jar2pom.jar)\r\n\r\n\r\n## Build\r\n\r\nIn the directory where the pom.xml is, run:\r\n\r\n```shell\r\nmvn clean package\r\n```\r\n\r\n\r\n## Run\r\n\r\n```shell\r\njava -jar jar2pom.jar\r\n```\r\n\r\nor\r\n\r\n```shell\r\njava -jar jar2pom.jar -host 192.168.0.1 -i \"c:\\myProjet\\source\" -o \"c:\\output\" -p -r\r\n```\r\n\r\nShow all options:\r\n\r\n```shell\r\njava -jar jar2pom.jar -h\r\n```\r\n\r\nOptions (no options are mandatory):\r\n\r\n     -h (--help)  : display help.\r\n     -host HOST   : defined custom Nexus host.\r\n                    (ex: oss.sonatype.org)\r\n     -i INPUT     : input path (file or directory).\r\n     -o OUTPUT    : directory output path.\r\n                    (default output is console)\r\n     -p (--proxy) : Use system proxies.\r\n     -r           : inspect input path recursively.\r\n\r\n\r\n## Technologies\r\n\r\n- Java 8\r\n- [args4j](https://github.com/kohsuke/args4j) : interface and options for the command line\r\n- [NIO.2](http://docs.oracle.com/javase/tutorial/essential/io/fileio.html) : browse JAR files.\r\n- [Guava](https://code.google.com/p/guava-libraries) : calculating SHA1 from the contents of the JAR files.\r\n- [Jersey](https://jersey.java.net/) : Rest client\r\n- [mustache.java](https://github.com/spullara/mustache.java) : generation of the output file\r\n\r\n\r\n## Explanation\r\n\r\n- Browse and detect all jars.\r\n- For each JAR file, calculates the SHA1.\r\n- Querying REST Services Maven repositories.\r\n- Creating a POM file.\r\n\r\n### Browse Jar\r\n\r\n- a single jar.\r\n- a folder containing jars (recursive or not).\r\n\r\n\r\n### Maven Search\r\n\r\nApril 22, 2015\r\n\r\nNexus:\r\n\r\n| URL                                                        | version   |\r\n|------------------------------------------------------------|-----------|\r\n| [oss.sonatype.org](https://oss.sonatype.org)               | 2.11.2-06 |\r\n| [repository.sonatype.org](https://repository.sonatype.org) | 2.11.2-06 |\r\n| [maven.java.net](https://maven.java.net)                   | 2.11.2-06 |\r\n| [maven.atlassian.com](https://maven.atlassian.com)         | 2.11.2-06 |\r\n| [repository.apache.org](https://repository.apache.org)     | 2.11.1-01 |\r\n\r\nSearch type:\r\n\r\n- Checksum (SHA1).\r\n- ~~Artifact id~~\r\n- ~~Class name~~\r\n\r\n### POM build\r\n\r\nOutput as an XML file [Partial POM].\r\n\r\n\r\n## REST API\r\n\r\n### Nexus\r\n\r\n#### Nexus Indexer Lucene Plugin REST API\r\n\r\n- [Sonatype OSS - Nexus Indexer Lucene Plugin REST API](https://oss.sonatype.org/nexus-indexer-lucene-plugin/default/docs/index.html)\r\n- [Sonatype RSO - Nexus Indexer Lucene Plugin REST API](https://repository.sonatype.org/nexus-indexer-lucene-plugin/default/docs/index.html)\r\n\r\nLe service supporte des réponses en XML ou JSON uniquement pour certaines ressources.\r\nLa définition XSD est disponible pour le XML uniquement pour une partie des ressources.\r\n\r\n##### Warning\r\n\r\n- Bug with `Nexus Indexer Lucene Plugin REST API` XSD : [NEXUS-6755](https://issues.sonatype.org/browse/NEXUS-6755)\r\n- `da39a3ee5e6b4b0d3255bfef95601890afd80709` qui est le sha1 d'un fichier vide correspond à plus de 100 jars mais `identify` ne retourne qu'une seule valeur sans cohérence.\r\n\r\nExample :\r\n\r\n- [search OSS](https://oss.sonatype.org/service/local/lucene/search?sha1=35379fb6526fd019f331542b4e9ae2e566c57933) XML only\r\n- [search OSS](https://oss.sonatype.org/service/local/identify/sha1/35379fb6526fd019f331542b4e9ae2e566c57933) XML or JSON (Header : Accept=application/json)\r\n- [search RSO](https://repository.sonatype.org/service/local/lucene/search?sha1=35379fb6526fd019f331542b4e9ae2e566c57933) XML only\r\n- [search RSO](https://repository.sonatype.org/service/local/identify/sha1/35379fb6526fd019f331542b4e9ae2e566c57933) XML or JSON (Header : Accept=application/json)\r\n\r\n#### Nexus Core API (Restlet 1.x Plugin) REST API\r\n\r\n- [Sonatype OSS - Nexus Core API (Restlet 1.x Plugin) REST API](https://oss.sonatype.org/nexus-restlet1x-plugin/default/docs/index.html)\r\n- [Sonatype RSO - Nexus Core API (Restlet 1.x Plugin) REST API](https://repository.sonatype.org/nexus-restlet1x-plugin/default/docs/index.html)\r\n\r\n### Maven Central\r\n\r\n- [Maven Central - Sonatype - API](http://search.maven.org/#api)\r\n\r\nLe service supporte des réponses en XML ou JSON.\r\nAucune définition XSD n'est disponible pour le XML.\r\n\r\n**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.\r\n\r\nex : [search](http://search.maven.org/solrsearch/select?q=1:\"35379fb6526fd019f331542b4e9ae2e566c57933\"\u0026rows=20\u0026wt=json)\r\n\r\n\r\n## XML file\r\n\r\n```xml\r\n\u003c!-- source url / file path --\u003e\r\n\u003cdependency\u003e\r\n    \u003cgroupId\u003egroupId\u003c/groupId\u003e\r\n    \u003cartifactId\u003eartifactId\u003c/artifactId\u003e\r\n    \u003cversion\u003eversion\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n- source url\r\n- absolute input file path\r\n- artifact :\r\n - groupId (groupId by default: unknownGroupId)\r\n - artifactId (jar name by default)\r\n - version (version by default: 0.0.0)\r\n - ~~classifier~~\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldez%2Fjar2pom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldez%2Fjar2pom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldez%2Fjar2pom/lists"}