You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Paul Spencer <pa...@apache.org> on 2008/06/06 19:29:39 UTC
How to define the location of archive.xml
Their are a few users in addition to root that may start the Tomcat
running Archiva. How do I define Archive configuration file to
something other then ~/.m2/archiva.xml?
In my case the configuration file will be /internal/archive/archiva.xml.
Paul Spencer
Re: How to define the location of archive.xml
Posted by Paul Spencer <pa...@apache.org>.
Wendy Smoak wrote:
> On Fri, Jun 6, 2008 at 11:48 AM, Paul Spencer <pa...@apache.org> 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
Re: How to define the location of archive.xml
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Jun 6, 2008 at 11:48 AM, Paul Spencer <pa...@apache.org> 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.)
--
Wendy
Re: How to define the location of archive.xml
Posted by Paul Spencer <pa...@apache.org>.
Wendy,
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.
Below is from tomcat's conf/setenv.sh
> export ARCHIVA_BASE=/internal/archiva
> export CATALINA_HOME=/internal/apache/apache-tomcat-6.0.16
> export CATALINA_BASE=`pwd`
> export CATALINA_OPTS="-Dappserver.home=$CATALINA_BASE -Dappserver.base=$CATALINA_BASE -DARCHIVA_BASE=$ARCHIVA_BASE"
What am I missing?
Paul Spencer
Wendy Smoak wrote:
> On Fri, Jun 6, 2008 at 10:29 AM, Paul Spencer <pa...@apache.org> wrote:
>> Their are a few users in addition to root that may start the Tomcat running
>> Archiva. How do I define Archive configuration file to something other then
>> ~/.m2/archiva.xml?
>>
>> In my case the configuration file will be /internal/archive/archiva.xml.
>
> I found:
> http://archiva.apache.org/guides/configuration.html ->
> http://archiva.apache.org/guides/security-configuration.html ->
>
> Note: Archiva's list of configuration files is itself configurable,
> and can be found in:
> $ARCHIVA_HOME/apps/archiva/webapp/WEB-INF/classes/META-INF/plexus/application.xml
>
Re: How to define the location of archive.xml
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Jun 6, 2008 at 10:29 AM, Paul Spencer <pa...@apache.org> wrote:
> Their are a few users in addition to root that may start the Tomcat running
> Archiva. How do I define Archive configuration file to something other then
> ~/.m2/archiva.xml?
>
> In my case the configuration file will be /internal/archive/archiva.xml.
I found:
http://archiva.apache.org/guides/configuration.html ->
http://archiva.apache.org/guides/security-configuration.html ->
Note: Archiva's list of configuration files is itself configurable,
and can be found in:
$ARCHIVA_HOME/apps/archiva/webapp/WEB-INF/classes/META-INF/plexus/application.xml
--
Wendy