My new website on Artificial Intelligence and Machine Learning www.aimlfront.com

Types of maven repository,Comparison of various maven repository managers

Maven is reducing the duplication of dependent software libraries (jars) required to build an application. As of now we have finished local setup, now will move to maven repository manager setup.

Repository is storing all the software libraries in a remote store. Libraries private to the organization cannot be uploaded. By setting up an internal maven repository, an organization can avail of the benefits of a maven repository.

Repository jars has been used by maven pom.xml files.

Types of maven repository

1. Local repository - exists on developer's machine and is maintained by the developer. It is in sync with the maven repositories defined in the 'settings.xml' in their '~home/.m2' folder. If no private remote internal repository is setup and listed in the pom.xml file or settings.xml file, then this local repository on developer's machine is synchronized with the public maven repository at ibiblio.org.

2. Private remote internal repository - This repository which we will setup. We will change the maven pom.xml or settings.xml to use this repository

3. Public remote external repository - This is the public external repository at ibiblio.org. By default, maven synchronizes with this repository.

Comparison of various maven repository managers

Some of the popular open source and free maven repositories are:

Standard maven repository

Dead simple Maven Proxy (DSMP)

Proximity

Artifactory

Admin tools

No

Basic

Yes

Yes

Repository browser

Basic

No

Yes

Yes

Deployable in standard web server (e.g. Tomcat or Jetty)

Yes, but not configurable

No

Yes

Yes(works in Tomcat and bundled with Jetty)

Create, edit and delete sub repositories

Yes

Yes

Yes

Yes

Bulk import/export artifacts

No

No

No

Yes

Easy to setup and use

Yes

No, build from source

Yes

Yes(Ajax web UI)

Backup facility

No

No

No

Yes(using Java quartz API and 'cron' expressions)

Issue tracker, forums and other sources of information

Jira, IRC

No

Wiki and issues tracker

Jira issue tracker. Good documentation on site

Anyone who was using Proximity is now encouraged to use Nexus (http://www.sonatype.org/nexus/). The entire codebase of Proximity was absorbed into Nexus and Nexus provides a migration path for all Proximity users.

Comparison of various maven repository managers

  • Nexus uses file system to store artifacts and metadata, where as Artifactory uses Derby DB by default. Artifactory can also be configured to use a handful of RDMBS for artifact storage (MySQL, PostgreSQL, Oracle...) as well as using the file system. Artifactory takes the polar opposite approach and stores the metadata and the artifacts themselves in a huge database. The reason they claim it's needed is for transactional behavior. Using a database doesn't guarantee transactional and it certainly isn't the only way to get transactional behavior.
  • In order to use a database, Artifactory needs to have import and export tools. The imports and exports of this data are reported to take a significant amount of time.

  • Nexus jar weighs about ~13M while Artifactory is about ~37M. Artifactory memory consumption is about 50% higher than Nexus.
  • For maven build, had to edit maven settings.xml to use Nexus as releases and plugins repository, and built my project using mvn install, after enabling remote indexing on Nexus. Artifactory has is the ability to generate and save a settings.xml file
  • Building the project using Artifactory took about 5 minutes whereas building using Nexus took about 8.5 minutes. Not exact science kind of faster, but still good for initial impression.