Issue Details (XML | Word | Printable)

Key: MNG-3293
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Paudi Moriarty
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 2

Activating more than one profile with the same build plugin results in only one execution

Created: 20/Nov/07 04:49 AM   Updated: 12/Jun/08 07:52 PM
Component/s: Plugins and Lifecycle, Profiles
Affects Version/s: 2.0.7
Fix Version/s: 2.0.x

Time Tracking:
Not Specified


 Description  « Hide
For example:
It is possible to activate both of these profiles (mvn -Dtest1=true -Dtest2=true help:active-profiles lists both profile1 and profile2) however only profile2 is run (test1 activated is not echoed)
<profile>
<id>profile1</id>
<activation>
<property>
<name>test1</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>test1 activated</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>profile2</id>
<activation>
<property>
<name>test2</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>test2 activated</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

Just a guess, but it looks like the executions are not being merged, rather the definition of the second plugin overwrites the first.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.