Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fracpete/maven-dependency-helper
Helper class for automatically generating Maven dependency tag snippets by querying Maven Central using the SHA-1 of the jar(s).
https://github.com/fracpete/maven-dependency-helper
dependencies-manager java maven
Last synced: 19 days ago
JSON representation
Helper class for automatically generating Maven dependency tag snippets by querying Maven Central using the SHA-1 of the jar(s).
- Host: GitHub
- URL: https://github.com/fracpete/maven-dependency-helper
- Owner: fracpete
- License: gpl-3.0
- Created: 2018-05-18T05:10:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-22T20:48:13.000Z (over 2 years ago)
- Last Synced: 2024-10-03T08:15:35.551Z (about 1 month ago)
- Topics: dependencies-manager, java, maven
- Language: Java
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# maven-dependency-helper
Helper class for automatically generating Maven dependency tag snippets by
querying Maven Central using the SHA-1 of the jar(s).## Command-line
```
usage: com.github.fracpete.maven.DependencyHelper
[-h] [--jar JAR] [--dir DIR] [--include INCLUDE]
[--exclude EXCLUDE] [--proxy PROXY] [--proxy-port PROXYPORT]
[--proxy-user PROXYUSER] [--proxy-pw PROXYPW]
[--verbosity VERBOSITY]Tools for outputting Maven dependency snippets generated from arbitrary
jars.
For this to work, the jars must be available from Maven Central.
The include/exclude order is: apply include and apply exclude.
If no include pattern is provided all files that end in '.jar' will get
added.optional arguments:
-h, --help show this help message and exit
--jar JAR The jar(s) to process.
Either this option or '--dir' has to be provided.
Can be supplied multiple times.
--dir DIR The directory/ies containing the jars to process.
Either this option or '--jar' has to be provided.
Can be supplied multiple times.
--include INCLUDE The regular expression to use for including jars
when traversing directories.
--exclude EXCLUDE The regular expression to use for excluding jars
when traversing directories.
--proxy PROXY The proxy to use.
--proxy-port PROXYPORT
The proxy port to use.
--proxy-user PROXYUSER
The user for the proxy.
--proxy-pw PROXYPW The password for the proxy.
--verbosity VERBOSITY The verbosity level for logging output, 0 to turn
off logging.
```## Examples
### Single jar
The following example queries Maven Central for a single jar.
```
java -jar maven-dependency-helper-0.0.2-spring-boot.jar \
--jar /some/where/5.3/iscwt-5.3.jar
```Which results in the following output:
```xml
de.intarsys.opensource
iscwt
5.3```
### Jars in directory
For processing all jars in a directory, but skip ones that contain `-sources`
or `-javdadoc` you can use something like this:```
java -jar maven-dependency-helper-0.0.2-spring-boot.jar \
--dir /some/dir/ \
--exclude ".*(-sources|-javadoc).*"
```Which will generate output like this:
```xml
de.intarsys.opensource
iscwt
5.3de.intarsys.opensource
isfreetype
5.3...
```## Maven
Add the following artifact to your dependencies of your `pom.xml`:
```xml
com.github.fracpete
maven-dependency-helper
0.0.2
```## Releases
The following releases are available:
* [0.0.2](https://github.com/fracpete/maven-dependency-helper/releases/download/maven-dependency-helper-0.0.2/maven-dependency-helper-0.0.2-spring-boot.jar)
* [0.0.1](https://github.com/fracpete/maven-dependency-helper/releases/download/maven-dependency-helper-0.0.1/maven-dependency-helper-0.0.1-spring-boot.jar)