Author: wsmoak
Date: Thu May  5 14:42:00 2011
New Revision: 1099827

URL: http://svn.apache.org/viewvc?rev=1099827&view=rev
Log:
[MRM-1472] Maven configuration to enable mvn -P dev tomcat:run from the top of 
the project.  Includes moving the application.xml file.  Submitted by: Olivier 
Lamy

Added:
    
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/application.xml
      - copied unchanged from r1099823, 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/
    
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
Removed:
    
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml
Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-applet/pom.xml
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/pom.xml
    
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
    archiva/trunk/pom.xml

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-applet/pom.xml
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-applet/pom.xml?rev=1099827&r1=1099826&r2=1099827&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-applet/pom.xml (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-applet/pom.xml Thu May  5 
14:42:00 2011
@@ -86,4 +86,26 @@
       </plugin>
     </plugins>
   </build>
+  <profiles>
+    <profile>
+      <id>dev</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-jar-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>jar-generate-for-dev</id>
+                <phase>compile</phase>
+                <goals>
+                  <goal>jar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/pom.xml
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/pom.xml?rev=1099827&r1=1099826&r2=1099827&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/pom.xml (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/pom.xml Thu May  5 
14:42:00 2011
@@ -395,6 +395,33 @@
         </configuration>
       </plugin>
       <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>tomcat-maven-plugin</artifactId>
+        <configuration>
+          <port>9091</port>
+          <path>/archiva</path>
+          
<contextFile>${basedir}/src/test/tomcat/tomcat-context-archiva.xml</contextFile>
+          <systemProperties>
+            <plexus.home>${basedir}/appserver-base</plexus.home>
+            <appserver.base>${basedir}/appserver-base</appserver.base>
+            
<appserver.home>${project.build.directory}/appserver-home</appserver.home>
+            
<derby.system.home>${basedir}/appserver-base/logs</derby.system.home>
+          </systemProperties>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>10.1.3.1</version>
+          </dependency>
+          <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+            <version>1.4</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>maven-jetty-plugin</artifactId>
         <version>${jetty.version}</version>
@@ -571,5 +598,118 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <!-- profile for tomcat plugin dev an log output in the console -->
+      <id>dev</id>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>override-log4j-with-console-output</id>
+                <phase>process-resources</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+
+                    <copy overwrite="true" 
file="${basedir}/src/test/resources/log4j.xml" 
todir="${basedir}/src/main/webapp/WEB-INF/classes" />
+
+                                                 <copy overwrite="true" 
file="${basedir}/src/test/resources/log4j.xml" 
todir="${project.build.directory}/classes" />
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <version>2.2</version>
+            <executions>
+              <execution>
+                <id>copy</id>
+                <phase>process-resources</phase>
+                <goals>
+                  <goal>copy</goal>
+                </goals>
+                <configuration>
+                  <skip>true</skip>
+                  <artifactItems>
+                    <artifactItem>
+                      <groupId>${project.groupId}</groupId>
+                      <artifactId>archiva-applet</artifactId>
+                      <version>${project.version}</version>
+                      <outputDirectory>src/main/webapp</outputDirectory>
+                      <destFileName>archiva-applet.jar</destFileName>
+                    </artifactItem>
+                  </artifactItems>
+                </configuration>
+              </execution>
+              <execution>
+                <id>unpack-redback-war</id>
+                <goals>
+                  <goal>unpack</goal>
+                </goals>
+                <phase>compile</phase>
+                <configuration>
+                  <artifactItems combine.self="override">
+                    <artifactItem>
+                      <groupId>org.codehaus.redback</groupId>
+                      <artifactId>redback-struts2-content</artifactId>
+                      <version>${redback.version}</version>
+                      <type>war</type>
+                      <overWrite>false</overWrite>
+                      
<outputDirectory>${basedir}/src/main/webapp</outputDirectory>
+                      <excludes>**/web.xml,lib</excludes>
+                    </artifactItem>
+                  </artifactItems>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+
+          <!--plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-resources-plugin</artifactId>
+            <version>2.5</version>
+            <executions>
+              <execution>
+                <id>copy-redback-resources</id>
+                <phase>compile</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                  <resources>
+                    <resource>
+                      
<directory>${basedir}/src/main/webapp/WEB-INF/classes</directory>
+                      <filtering>false</filtering>
+                      <includes>
+                        <include>struts-security.xml</include>
+                      </includes>
+                    </resource>
+                  </resources>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin-->
+        </plugins>
+      </build>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.archiva</groupId>
+          <artifactId>metadata-store-file</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.codehaus.redback</groupId>
+          <artifactId>redback-struts2-integration</artifactId>
+          <version>${redback.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
   </profiles>
 </project>

Modified: 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml?rev=1099827&r1=1099826&r2=1099827&view=diff
==============================================================================
--- 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
 (original)
+++ 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
 Thu May  5 14:42:00 2011
@@ -99,7 +99,7 @@
                <param-value>
                        classpath*:META-INF/plexus/components.xml
                        classpath*:META-INF/spring-context.xml
-                       /WEB-INF/classes/META-INF/plexus/application.xml
+                       /WEB-INF/application.xml
                        /WEB-INF/applicationContext.xml
                </param-value>
        </context-param>

Added: 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml?rev=1099827&view=auto
==============================================================================
--- 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
 (added)
+++ 
archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
 Thu May  5 14:42:00 2011
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+  <Context path="/continuum">
+    <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
+              username="sa"
+              password=""
+              driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+              
url="jdbc:derby:${catalina.base}/target/database/users;create=true"
+    />
+    <Resource name="jdbc/continuum" auth="Container" 
type="javax.sql.DataSource"
+              username="sa"
+              password=""
+              driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+              
url="jdbc:derby:${catalina.base}/target/database/continuum;create=true"
+    />
+    <Resource name="mail/Session" auth="Container"
+            type="javax.mail.Session"
+            mail.smtp.host="localhost"/>
+                
+</Context>

Modified: archiva/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/archiva/trunk/pom.xml?rev=1099827&r1=1099826&r2=1099827&view=diff
==============================================================================
--- archiva/trunk/pom.xml (original)
+++ archiva/trunk/pom.xml Thu May  5 14:42:00 2011
@@ -134,7 +134,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>2.0.2</version>
+          <version>2.3.2</version>
           <configuration>
             <source>1.5</source>
             <target>1.5</target>
@@ -142,6 +142,11 @@
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>2.4.1</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-remote-resources-plugin</artifactId>
           <version>1.0-beta-2</version>
         </plugin>
@@ -187,7 +192,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.8</version>
+          <version>2.8.1</version>
           <configuration>
             <redirectTestOutputToFile>true</redirectTestOutputToFile>
           </configuration>
@@ -203,6 +208,11 @@
           <artifactId>maven-site-plugin</artifactId>
           <version>2.1</version>
         </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>tomcat-maven-plugin</artifactId>
+          <version>1.1</version>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>
@@ -1194,6 +1204,7 @@
     <binder.version>0.9</binder.version>
     <spring.version>2.5.6</spring.version>
     <jackrabbit.version>2.2.5</jackrabbit.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>
   <profiles>
     <profile>


Reply via email to