Introduction to Apache Archiva: The Build Artifact Repository Manager

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

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

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).

View Comments

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

    Cheers!

    John Smart.

Share
Published by
Viral Patel
Tags: apache apache archiva build repository Tutorial

Recent Posts

  • Java

Java URL Encoder/Decoder Example

Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…

5 years ago
  • General

How to Show Multiple Examples in OpenAPI Spec

Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…

5 years ago
  • General

How to Run Local WordPress using Docker

Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…

5 years ago
  • Java

Create and Validate JWT Token in Java using JJWT

1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…

5 years ago
  • Spring Boot

Spring Boot GraphQL Subscription Realtime API

GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…

5 years ago
  • Spring Boot

Spring Boot DynamoDB Integration Test using Testcontainers

1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…

5 years ago