Introduction to Apache Archiva: The Build Artifact Repository Manager

apache-archiva-logo Following is the basic overview of Apache Archiva, The Build Artifact Repository Manager.

What is Archiva?

Apache Archiva is an extensible repository management software that helps taking care of your own personal or enterprise-wide build artifact repository. It is the perfect companion for build tools such as Maven, Continuum, and ANT.

Features of Archiva

  • Remote repository proxying
  • Security access management
  • Build artifact storage
  • Browsing
  • Indexing
  • Usage reporting
  • Extensible scanning functionality

Remote Repository Proxying

Archiva act as a remote repository proxy

Archiva act as a remote repository proxy

Apache Archiva can be used as a repository for Maven build. To get your local Maven 2 installation to use an Archiva proxy you need to add the repositories you require to your settings.xml. This file is usually found in $user.dir/.m2/settings.xml
<settings> ... <mirrors> <mirror> <id>archiva.default</id> <url>http://repo.mycompany.com:8080/archiva/repository/internal/</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors> ... </settings>
Code language: HTML, XML (xml)
You can specify access control mechanism to restrict the repository access to certain type of users. If guest account does not have read access to given repository, add following security configuration in settings.xml
<settings> ... <servers> <server> <id>repository-1</id> <username>{archiva-user}</username> <password>{archiva-pwd}</password> </server> ... </servers> ... </settings>
Code language: HTML, XML (xml)

Deploying artifacts to Repository

There are different ways on how you can deploy artifacts in an Archiva repository.
  • Configuring Maven to deploy to an Archiva repository
  • Deploying via the Web UI Form
archiva-deploy-repository-form

RSS Feeds in Archiva

Archiva can be configured to generate RSS feeds for all the new Artifacts added to the repository of any version updates. User can configure the RSS feed for new artifact by subscribing to the feed URL: http://[hostname]:[port]/archiva/feeds/[repositoryId] The repositoryId is the id of the Archiva repo which you want to monitor. The authentication method used for the rss feeds is Http Basic Authentication. If your reader supports this, you would be prompted for a username and password when you subscribe to the feed. Supply your Archiva account credentials for this. Take note that only users with an Observer role for the specific repository would be able to subscribe to this feed.

Repository Roles in Archiva

Following are few Roles you can assign to any users in Archiva.
  • Repository Observer: users with this role can read from the given repository that the role is for.
  • Repository Manager: users with this role can write to and administer the given repository that the role is for.
  • Global Repository Observer: users with this role can read from any repository.
  • Global Repository Manager: users with this role can write to and administer any repository in the instance.

Reports in Archiva

Archiva has two types of reports: 1. Repository Statistics 2. Repository Health. Repository statistics contains the detailed statistics such as number of artifacts, number of groups and projects, etc. of an Archiva managed repository. The Repository Health report is a detailed listing of the problematic artifacts in the different repositories. Problematic artifacts are those artifacts that were detected by Archiva to have defects (ex. the versions in the pom and in the artifact itself do not match).
Get our Articles via Email. Enter your email address.

You may also like...

1 Comment

  1. John Smart says:

    Nice summary. Personally, however, I find Nexus and Hudson to be a more powerful and easier-to-administrate stack.

    Cheers!

    John Smart.

Leave a Reply

Your email address will not be published. Required fields are marked *