simpligility technologies inc. presents
Maven Repository Provisioner
A command line tool and library from the Maven Repository Tools project to provision a component and all its transitive dependencies from a source Maven repository to a target Maven repository. Both are accessed via HTTP/HTTPS using the normal Maven interactions.
It can also be used to deploy a local, file-system directory using the Maven repository format to a repository manager.
Provision a repository to contain only "approved" components
Create a repository that contains a product and all its dependencies for archival, software escrow, auditing or similar compliance related reasons
Transfer components and all needed dependencies between repositories or repository managers without using migration tools
Command line tool with built-in help
Resolves specified component including transitive dependencies and parent pom’s required
All coordinates can be used to specify component -
Allows processing of multiple components in one run
Optionally includes javadoc and sources JAR files
Optionally include dependencies with scope provided
Source repository defaults to the Central Repository, but can be configured
Target repository can be a file location or a repository manager repository
Authentication for repository manager deployment or source repository can be configured
Temporary cache directory on local disk for inspection
Logging to stdout as well as log file
Exit codes to signal success or failure
Strict adherence to Maven repository format specs in terms of file names
Check target repository for POM file and skips repeated deployments
Verify only mode allowing to download and report on potential deployments after checking target repository
*-jar-with-dependencies.jar of the latest version available from
Java 8 or higher is required.
java -jar maven-repository-provisioner-*-jar-with-dependencies.jar
shows the documentation. A full example invocation could look like this:
java - jar maven-repository-provisioner-*-jar-with-dependencies.jar -a "com.simpligility.maven:progressive-organization-pom:pom:2.3.0" -t "http://localhost:8081/nexus/content/repositories/test" -u admin -p admin123 -s "http://localhost:8081/nexus/content/groups/public/" -su admin -sp admin123
To provision an existing Maven repository from the filesystem into a target repository, simply specify the path to the folder as the local cache and omit the artifact coordinates:
java - jar maven-repository-provisioner-*-jar-with-dependencies.jar -cd "/opt/maven-repo" -t "http://localhost:8081/nexus/content/repositories/test" -u admin -p admin123
See the test.sh script for a number of further examples. Syntax for artifact (-a) or lists of artifacts is "g:a[:extension][:classifier]:v|g:a[:extension][:classifier]:v".
If you need to access the source repository via a proxy server, you can configure the standard Java proxy parameters:
http.proxyHost http.proxyPort http.proxyUser http.proxyPassword
Find more information about these properties in the Java documentation.