Executions do not pick up configurations per execution element
--------------------------------------------------------------
Key: MNG-3823
URL: http://jira.codehaus.org/browse/MNG-3823
Project: Maven 2
Issue Type: Bug
Components: Plugins and Lifecycle
Reporter: Chris Pall
This POM should deploy to either a single tomcat site or two tomcat sites based
on the existance of a parameter passed to maven. The plugins are not loading
the configuration per execution. This example is created from the tapestry
quickstart archetype, and can be substituted as a pom.xml for it for testing
purposes.
Running with these settings:
{quote}
mvn -Dtomcat_url=http://localhost:8082/manager
-Dtomcat2_url=http://localhost:8083/manager -B -Dmaven.test.skip=true -s
"C:\Documents and Settings\cpall\.m2\settings.xml" tomcat:deploy
{quote}
{quote}
I get the following output:
[INFO] Building jar: C:\java\workspace\test\target\test\WEB-INF\lib\test.jar
[INFO] Webapp assembled in[140 msecs]
[INFO] Building war: C:\java\workspace\test\target\test.war
[INFO] [statemgmt:end-fork]
[INFO] Ending forked execution [fork id: 2011511686]
[INFO] [tomcat:deploy]
[INFO] Deploying war to http://localhost:8080/test
{quote}
Here is the pom.xml I used to generate the issue:
{code:xml}
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>com.testing</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>test Tapestry 5 Application</name>
<dependencies>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-core</artifactId>
<version>${tapestry-release-version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.1</version>
<classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>tomcat_server</id>
<activation>
<property>
<name>!tomcat2_url</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<executions>
<execution>
<configuration>
<server>server1</server>
<url>${tomcat_url}</url>
<path>/test</path>
<update>true</update>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>tomcat2_server</id>
<activation>
<property>
<name>tomcat2_url</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<executions>
<execution>
<id>first</id>
<configuration>
<server>server1</server>
<url>${tomcat_url}</url>
<path>/test</path>
<update>true</update>
</configuration>
</execution>
<execution>
<id>second</id>
<configuration>
<server>server2</server>
<url>${tomcat2_url}</url>
<path>/test</path>
<update>true</update>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<finalName>test</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<optimize>true</optimize>
</configuration>
</plugin>
<!--
This changes the WAR file packaging so that
what would normally go
into WEB-INF/classes is instead packaged as
WEB-INF/lib/test.jar.
This is necessary for Tapestry to be able to
search for page and
component classes at startup. Only certain
application servers
require this configuration, please see the
documentation at the
Tapestry 5 project page
(http://tapestry.apache.org/tapestry5/).
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>true</archiveClasses>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-component-report</artifactId>
<version>${tapestry-release-version}</version>
<configuration>
<rootPackage>com.testing.test</rootPackage>
</configuration>
</plugin>
</plugins>
</reporting>
<repositories>
<repository>
<id>tapestry-snapshots</id>
<url>http://tapestry.formos.com/maven-snapshot-repository/</url>
</repository>
<repository>
<id>codehaus.snapshots</id>
<url>http://snapshots.repository.codehaus.org</url>
</repository>
<repository>
<id>OpenQA_Release</id>
<name>OpenQA Release Repository</name>
<url>http://archiva.openqa.org/repository/releases/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>tapestry-snapshots</id>
<url>http://tapestry.formos.com/maven-snapshot-repository/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<tapestry-release-version>5.0.15</tapestry-release-version>
</properties>
</project>
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira