Maven Repository Provisioner goes 1.0.0 and beyond

Unbelievable how time flies – the Maven Repository Provisioner is nearly two years old. And it has been in production usage for well beyond a year already as well. So with some recent further improvements I decided to push it to 1.0.0 and ended up with a final 1.1.1 release recently. So what is the provisioner anyway?

Well, in a nutshell the Maven Repository Provisioner is a command line tool to provision one or a number of specified artifacts and all their transitive dependencies as well as required parent POMs in a target repository. It can also provision a Maven repository in a local directory to the target repository manager.

Use Cases

So what are some use cases for such a tool? Here are a few:

  • Allow an administrator to transfer a dependency and its required transitive dependencies and parent POM from a public repository to a specific internal repository
  • Copy artifacts and their dependencies into a self contained target repository for purposes such as backup, audit, software escrow or similar tasks
  • Transfer specific artifacts from one repository or repository manager to another without low-level interactions and related restrictions

Features

At this stage the provisioner is pretty powerful and includes the following features:

  • 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 – groupId, artifactId, version, classifier, type
  • Allows processing of multiple components in one run
  • Option to include javadoc and sources jars
  • Source repository defaults to the Central Repository, but can be configured to different remote repository
  • Target repository can be a file location or a repository manager repository
  • Authentication for repository manager deployment can be configured
  • Temporary cache directory on local disk for inspection
  • Logging to stdout as well as log file maven-repository-provisioner.log
  • 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
  • Ability to specify source repository as local directory and transfer that as strict Maven repository
  • Usage

    The provisioner is a command line tool and available as a single jar to download with a simple command line invocation. This allows any user to install and run the tool as desired easily.

    It is possible to wrap the tool with a parameterized Jenkins job as well. This allows you to provide an easy user interface and thanks to kept job logs an easy record keeping of any invocations of the tool.

    Conclusion and Next Steps

    At this stage the tool works reliably for the desired use cases. A potential next steps is the creation of a Maven plugin as well as the usage of the library in the Android Maven Plugin. But that any other work will be purely demand and contribution driven, just like the development has happened so far. So – what do you want to see implemented or what pull request are you going to send my way?

Comments are closed.