Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Getting Started with Archiva

To build

Run 'mvn install'. If this is the first time, and if you've not pulled this down for some other reason then it will save time to do the following first:

  • Download the 1.0 connector from:
  • Unpack the zip to get the jar
  • Run: mvn install:install-file -DgroupId=javax.resource -DartifactId=connector -Dversion=1.0 -Dpackaging=jar -Dfile=connector.jar

To deploy Archiva on Plexus

Plexus is a container developed as a part of Maven. It provides a very simple way to get started with Archiva:

  • Unpack the archiva-plexus-runtime/target/archiva-bin.tar.gz archive into a directory of your choice.
  • Start with: ./bin/ start (don't use the platform specific versions).
  • A Derby exception "Schema 'SA' does not exist" occurs, but is not of concern.

To deploy Archiva to Tomcat 5.5

  • create a directory in tomcat called archiva, at the same level as bin, conf, logs and the others.
  • copy the war file from archiva/archiva-webapp/target into the new directory
  • create a conf/Catalina/localhost/archiva.xml file with the following data:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/archiva"

<Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"

  • Copy archiva/archiva-webapp/target/archiva-webapp-1.0-SNAPSHOT/WEB-INF/lib/derby- into the tomcat common/lib

To deal with a current bug, you'll also need to add the following to your ${catalina.home}/conf/web.xml in the relevant section (search for jspx):


When you first start Archiva, you will see an Exception that schema SA does not exist - however it doesn't appear to cause a problem. If you use a username other than 'sa', such as 'archiva', then you seem to get the same error but Tomcat fails to start the context and you have to shutdown and restart again.

Setting up your Archiva instance

  • Goto http://localhost:8080/archiva/ if on Tomcat and http://localhost:8080/ if on Plexus.
  • On the first page - setup your administration user. The password requires a numerical character.
  • On the second page - setup your first repository. It can be both an m1 and an m2 repository.
  • On the third page - setup your indexing. Mostly this means choosing a directory to put the index in. It'll re-index every hour.

A useful repository to setup when exploring is your local Maven repository.

  • Identifier: LOCAL
  • Name: Maven2 Local Repository
  • Location: $HOME/.m2/repository

Resetting Archiva

  • With Tomcat shutdown, remove the database/ and derby.log files that have appeared within your bin/ directory (if you started from there).
  • rm webapps/archiva/ && rm work/Catalina/localhost/archiva/
  • rm $HOME/.m2/archiva.xml
  • No labels