From 40a360dbdbb474aa13c5d30f5f2a7c70b712d19a Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Fri, 28 Mar 2008 08:07:38 +0000 Subject: [PATCH] [MRM-688] allow separating the base from the installation again git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@642119 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/site/apt/adminguide/standalone.apt | 19 ++++++++++++-- .../archiva-standalone/archiva-jetty/pom.xml | 25 ++++++++++++++++--- .../src/main/conf/jetty-logging.xml | 2 +- .../archiva-jetty/src/main/conf/jetty.xml | 8 +++--- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/archiva-docs/src/site/apt/adminguide/standalone.apt b/archiva-docs/src/site/apt/adminguide/standalone.apt index 53b88e789..31ed6a04e 100644 --- a/archiva-docs/src/site/apt/adminguide/standalone.apt +++ b/archiva-docs/src/site/apt/adminguide/standalone.apt @@ -19,15 +19,30 @@ Installing Standalone Distribution of Apache Archiva [] +* Separating the base from the installation + + The standalone instance of Archiva uses the Plexus application server, which is capable of separating it's configuration from installation, + in much the same way Tomcat does for example. + + This is achieved by the following steps: + + [[1]] Creating the base location. For example, you might install Archiva in <<>> and the data in <<>>. Create the directories <<>>, <<>> and <<>>. + + [[2]] Copy the configuration files from the Archiva installation (eg <<>> to the new location (eg. <<>>). If you've previously run Archiva, you may need to edit <<>> to change the location of the repositories + + [[3]] Set the environment variable <<>> to the data location (eg. <<>>). In bash, be sure to export the variable. + + [[4]] Start Archiva standalone as described above from the installation location + * Configuring Archiva Archiva's configuration is loaded from the following files, in order of most precedent: * <<<~/.m2/archiva.xml>>> - * <<<$ARCHIVA_BASE/conf/archiva.xml>>> + * <<<$APP_BASE/conf/archiva.xml>>> - * <<<$ARCHIVA_HOME/conf/archiva.xml>>> + * <<>> in the Archiva installation When Archiva saves it's configuration, all configuration is stored to a single file. The file chosen is by the following rules: diff --git a/archiva-web/archiva-standalone/archiva-jetty/pom.xml b/archiva-web/archiva-standalone/archiva-jetty/pom.xml index bbe9269e9..8d86927f6 100644 --- a/archiva-web/archiva-standalone/archiva-jetty/pom.xml +++ b/archiva-web/archiva-standalone/archiva-jetty/pom.xml @@ -128,6 +128,12 @@ jasper-compiler-jdt 5.5.15 runtime + + + org.eclipse.jdt + core + + @@ -160,21 +166,34 @@ wrapper.java.additional.1.stripquotes TRUE + + set.default.APP_BASE + %PWD%/.. + set.default.REPO_DIR lib wrapper.logfile - ./logs/wrapper.log + %APP_BASE%/logs/wrapper.log + + + wrapper.app.parameter.2 + %APP_BASE%/conf/jetty.xml + + + wrapper.app.parameter.3 + %APP_BASE%/conf/jetty-logging.xml - appserver.base="." - derby.system.home=logs + appserver.base=%APP_BASE% + derby.system.home=%APP_BASE%/logs + jetty.logs=%APP_BASE%/logs diff --git a/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml b/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml index 0a1c292d0..3eedcd6bd 100644 --- a/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml +++ b/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml @@ -13,7 +13,7 @@ - /logs/yyyy_mm_dd.stderrout.log + /yyyy_mm_dd.stderrout.log false 90 GMT diff --git a/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml b/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml index c908723c7..6568ae25c 100644 --- a/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml +++ b/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml @@ -294,7 +294,7 @@ jdbc/archiva - ../data/databases/archiva + /data/databases/archiva sa create @@ -305,7 +305,7 @@ jdbc/archivaShutdown - ../data/databases/archiva + /data/databases/archiva sa shutdown @@ -318,7 +318,7 @@ jdbc/users - ../data/databases/users + /data/databases/users sa create @@ -329,7 +329,7 @@ jdbc/usersShutdown - ../data/databases/users + /data/databases/users sa shutdown -- 2.39.5