mirror of https://github.com/apache/archiva.git
[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
This commit is contained in:
parent
39ecffa064
commit
480eaee429
|
@ -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>
|
||||
|
|
|
@ -394,6 +394,33 @@
|
|||
</warSourceExcludes>
|
||||
</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>
|
||||
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
15
pom.xml
15
pom.xml
|
@ -134,12 +134,17 @@
|
|||
<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>
|
||||
</configuration>
|
||||
</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>
|
||||
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue