You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2008/03/28 09:07:40 UTC

svn commit: r642119 - in /maven/archiva/trunk: archiva-docs/src/site/apt/adminguide/ archiva-web/archiva-standalone/archiva-jetty/ archiva-web/archiva-standalone/archiva-jetty/src/main/conf/

Author: brett
Date: Fri Mar 28 01:07:38 2008
New Revision: 642119

URL: http://svn.apache.org/viewvc?rev=642119&view=rev
Log:
[MRM-688] allow separating the base from the installation again

Modified:
    maven/archiva/trunk/archiva-docs/src/site/apt/adminguide/standalone.apt
    maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/pom.xml
    maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml
    maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml

Modified: maven/archiva/trunk/archiva-docs/src/site/apt/adminguide/standalone.apt
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-docs/src/site/apt/adminguide/standalone.apt?rev=642119&r1=642118&r2=642119&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-docs/src/site/apt/adminguide/standalone.apt (original)
+++ maven/archiva/trunk/archiva-docs/src/site/apt/adminguide/standalone.apt Fri Mar 28 01:07:38 2008
@@ -19,15 +19,30 @@
 
     []
 
+* 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 <<</opt/archiva-1.0>>> and the data in <<</var/archiva>>>. Create the directories <<</var/archiva/logs>>>, <<</var/archiva/data>>> and <<</var/archiva/conf>>>.
+
+   [[2]] Copy the configuration files from the Archiva installation (eg <<</opt/archiva-1.0/conf>>> to the new location (eg. <<</var/archiva/conf>>>). If you've previously run Archiva, you may need to edit <<<conf/archiva.xml>>> to change the location of the repositories
+
+   [[3]] Set the environment variable <<<APP_BASE>>> to the data location (eg. <<</var/archiva>>>). 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>>>
+    * <<<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:
 

Modified: maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/pom.xml?rev=642119&r1=642118&r2=642119&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/pom.xml (original)
+++ maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/pom.xml Fri Mar 28 01:07:38 2008
@@ -128,6 +128,12 @@
       <artifactId>jasper-compiler-jdt</artifactId>
       <version>5.5.15</version>
       <scope>runtime</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jdt</groupId>
+          <artifactId>core</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
   </dependencies>
   <build>
@@ -161,20 +167,33 @@
                       <value>TRUE</value>
                     </property>
                     <property>
+                      <name>set.default.APP_BASE</name>
+                      <value>%PWD%/..</value>
+                    </property>
+                    <property>
                       <name>set.default.REPO_DIR</name>
                       <value>lib</value>
                     </property>
                     <property>
                       <name>wrapper.logfile</name>
-                      <value>./logs/wrapper.log</value>
+                      <value>%APP_BASE%/logs/wrapper.log</value>
+                    </property>
+                    <property>
+                      <name>wrapper.app.parameter.2</name>
+                      <value>%APP_BASE%/conf/jetty.xml</value>
+                    </property>
+                    <property>
+                      <name>wrapper.app.parameter.3</name>
+                      <value>%APP_BASE%/conf/jetty-logging.xml</value>
                     </property>
                   </configuration>
                 </generatorConfiguration>
               </generatorConfigurations>
               <jvmSettings>
                 <systemProperties>
-                  <systemProperty>appserver.base="."</systemProperty>
-                  <systemProperty>derby.system.home=logs</systemProperty>
+                  <systemProperty>appserver.base=%APP_BASE%</systemProperty>
+                  <systemProperty>derby.system.home=%APP_BASE%/logs</systemProperty>
+                  <systemProperty>jetty.logs=%APP_BASE%/logs</systemProperty>
                 </systemProperties>
               </jvmSettings> 
             </daemon>

Modified: maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml?rev=642119&r1=642118&r2=642119&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml (original)
+++ maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty-logging.xml Fri Mar 28 01:07:38 2008
@@ -13,7 +13,7 @@
     <New id="ServerLog" class="java.io.PrintStream">
       <Arg>
         <New class="org.mortbay.util.RolloverFileOutputStream">
-          <Arg><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.stderrout.log</Arg>
+          <Arg><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.stderrout.log</Arg>
           <Arg type="boolean">false</Arg>
           <Arg type="int">90</Arg>
           <Arg><Call class="java.util.TimeZone" name="getTimeZone"><Arg>GMT</Arg></Call></Arg>

Modified: maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml?rev=642119&r1=642118&r2=642119&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml (original)
+++ maven/archiva/trunk/archiva-web/archiva-standalone/archiva-jetty/src/main/conf/jetty.xml Fri Mar 28 01:07:38 2008
@@ -294,7 +294,7 @@
     <Arg>jdbc/archiva</Arg>
     <Arg>
       <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName">../data/databases/archiva</Set>
+        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
         <Set name="user">sa</Set>
         <Set name="createDatabase">create</Set>
       </New>
@@ -305,7 +305,7 @@
     <Arg>jdbc/archivaShutdown</Arg>
     <Arg>
       <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName">../data/databases/archiva</Set>
+        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
         <Set name="user">sa</Set>
         <Set name="shutdownDatabase">shutdown</Set>
       </New>
@@ -318,7 +318,7 @@
     <Arg>jdbc/users</Arg>
     <Arg>
       <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName">../data/databases/users</Set>
+        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
         <Set name="user">sa</Set>
         <Set name="createDatabase">create</Set>
       </New>
@@ -329,7 +329,7 @@
     <Arg>jdbc/usersShutdown</Arg>
     <Arg>
       <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName">../data/databases/users</Set>
+        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
         <Set name="user">sa</Set>
         <Set name="shutdownDatabase">shutdown</Set>
       </New>