archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Spencer <>
Subject Re: How to define the location of archive.xml
Date Mon, 09 Jun 2008 14:17:17 GMT
Wendy Smoak wrote:
> On Fri, Jun 6, 2008 at 11:48 AM, Paul Spencer <> wrote:
>> I have defined the environment variable ARCHIVA_BASE, but the default
>> archiva.xml is being used. I even tried adding -DARCHIVA_BASE=$ARCHIVA_BASE
>> to CATALINA_OPTS, but to no avail.
> What do you mean by "the" default archiva.xml file?  By default it can
> exist in several places.
> You asked for a way to change what configuration files are read, and I
> pointed you to a page suggesting that you change application.xml.  Did
> you do that, or not?
> If you only set ARCHIVA_BASE, and there is an archiva.xml file in the
> user's home directory, then I'm not surprised that it gets read and
> used.  See:
> Try removing ~/.m2/archiva.xml and making sure there is only *one*
> archiva.xml file, where ever you decide to put it.  I'd suggest
> sticking with $ARCHIVA_BASE/conf unless you really need to put it
> elsewhere (or if that doesn't work with Tomcat for some reason.)
> (And please don't top-post after someone takes the time to properly
> quote and reply below.)

Setting the environment variable ARCHVA_BASE does not work when 
installing Apache Archiva as a Web Application.

In DefaultArchivaConfiguration [1] the are 2 configuration files 
definitions, userConfigFilename, which is set to 
${user.home}/.m2/archiva.xml, and altCofigFilename, which is set to 
${appserver.base}/conf/archiva.xml.  Including 
-Dappserver.base=$ARCHIVA_BASE in CATALINA_OPTS works, but does not 
allow for an application specific "application.base".

As I read the documentation for "standalone" configuration [2] setting 
ARCHIVA_BASE should work as I expect, but this would have Archiva 
running in it's own servlet.

My intent is to install Archiva and Continuum as web application in one 
instance of Tomcat, but keep the configurations separated so I can 
easily split them up later and avoid issues with common configuration 
file names.  Based on what I have found, this is not currently possible. 
  A enhancement would be to set altCofigFilename dynamically by 
searching ARCHIVA_BASE, ARCHIVA_HOME, application.base, and 
application.home for archiva.xml.

Paul Spencer


View raw message