manash
manash

Reputation: 7106

Good configuration for Archiva?

We have recently decided to use Maven as build system. I'm responsible to migrate all the projects from Ant to Maven. We also decided to use Apache Archiva to configure an internal repository in the company.

I see that Archiva create two repositories by default (internal and snapshots). I also see that it configures the internal repository to proxy the central and java.net repositories. Are there some best practices regarding Archiva configuration?

In the Archiva documentation, there is a possibility to configure Maven to use only the internal repository and then access the remote repository through the internal repository. What do you think about this option?

Thanks for your help

Upvotes: 0

Views: 980

Answers (1)

Mark O'Connor
Mark O'Connor

Reputation: 77951

A Maven repository manager is essential to support Enterprise Maven development. The Maven installer is merely a bootstrap, running Maven for the first time downloads everything it needs from the Maven Central repository in order to compile your project.

The benefits of using a Maven repository aree documented elsewhere but I'll summarize:

  • Efficiency. Repository acts as a cache for Maven Central artifacts
  • Resilience. Repository protects against remote repository failures or lack of internet connection
  • Repeatability. Storing common artifacts centrally, avoids shared build failures caused by developers maintaining their own local repositories.
  • Audit. If all 3rd party libraries used by development come from a single entry point in the build process one can assess how often they're used (based on download log files) and what kinds of licensing conditions apply.

To that end I'd encourage you to use the following Archiva features:

PS I use Nexus for my Maven repository management, but the same concepts apply.

Upvotes: 2

Related Questions