Wendy Smoak wrote:
On Fri, Jun 6, 2008 at 11:48 AM, Paul Spencer <[EMAIL PROTECTED]> 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: http://archiva.apache.org/guides/configuration.html
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
[1]http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java?view=markup
[2]http://archiva.apache.org/docs/1.0.2/adminguide/standalone.html