Benefits of a Repository Manager

>> Monday, September 28, 2009

For organizations and projects of any reasonable size that use Maven as their build tool, the deployment and use of a Maven repository manager is a must. As Maven users know, Maven requires access to standard format repositories from where it can retrieve the various artifacts that projects declare dependencies on. In fact, Maven's operation is based on the existence of public repositories that follow the Maven nomenclature and versioning scheme (artifact coordinates in mavenese). Since artifacts declare dependencies on other artifacts, it is quite impressive to see how quickly a reference to a major open source framework translates into dependencies on a multitude of other, public, artifacts. By configuring Maven to automatically retrieve these from the web, the task of retrieving all the various jars one by one and of making sure they have the right version number suddenly disappears.

This is the first obvious benefit that comes with the use of Maven. However, what new Maven users do not always realize is that the right way to do things is to host your own repository manager and to thus control and optimize artifact distribution and uploads. There are various repository management solutions available out there and a web page on Codehaus that compares three of the most popular ones is available here.

In my view, the most important benefits that come with a corporate repository manager are the following:

  1. The caching of artifacts used by the various projects in the organization (released artifacts are fetched from the web once and made available to all from then on).
  2. The grouping of several repositories into groups to reduce the complexity of maven configurations (settings.xml files)
  3. The possibility to install non-public artifacts required or used by the various projects (these can be legacy modules, third party modules or other)
  4. The possibility to enforce various access control policies for both reading and deploying artifacts (snapshots or releases)
  5. The flexibility brought on by the fact that repositories can be easily added, removed, reconfigured, disabled, reenabled etc
  6. The possibility that some some repository managers provide in terms of procurement so that an organization can control which artifact is available to whom for legal or technical considerations.
  7. The possibility to automate certain tasks such as the removal of outdated snapshots or the reindexing of public repositories.
  8. The availability of a user-friendly console to manage access, search, upload, remove and update artifacts.
I recently deployed the "Nexus Pro" repository manager from Sonatype for approximately 50 developers and I must say that I was impressed with the ease of use, flexibility, power and feature set of this particular solution. The Apache Archiva solution can also be a good choice. I do not have any first-hand experience with any other product.

Have fun with Maven and your corporate repository manager.


0 commentaires:

Post a Comment

  © Blogger template Webnolia by 2009

Back to TOP