summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorWendy Smoak <wsmoak@apache.org>2011-05-05 14:42:00 +0000
committerWendy Smoak <wsmoak@apache.org>2011-05-05 14:42:00 +0000
commit480eaee429cc85a8dd3a52947254826857d674a3 (patch)
treeb50db4f0cbbf4f2d8173613c56760b5881cfb618 /archiva-modules
parent39ecffa0648868f849499bb4b685751540341e76 (diff)
downloadarchiva-480eaee429cc85a8dd3a52947254826857d674a3.tar.gz
archiva-480eaee429cc85a8dd3a52947254826857d674a3.zip
[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
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1099827 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-applet/pom.xml22
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/pom.xml140
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/application.xml (renamed from archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml)0
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml37
5 files changed, 200 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-applet/pom.xml b/archiva-modules/archiva-web/archiva-applet/pom.xml
index 5a317b861..efcc4cfdd 100644
--- a/archiva-modules/archiva-web/archiva-applet/pom.xml
+++ b/archiva-modules/archiva-web/archiva-applet/pom.xml
@@ -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>
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index c85383419..c6f498122 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -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>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/application.xml
index f8203dff0..f8203dff0 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/application.xml
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
index 0affdbc55..74d3413f5 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
@@ -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>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
new file mode 100644
index 000000000..b5275faa0
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
@@ -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>