You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paudi Moriarty (JIRA)" <ji...@codehaus.org> on 2007/11/20 11:50:57 UTC

[jira] Created: (MNG-3293) Activating more than one profile with the same build plugin results in only one execution

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

                 Key: MNG-3293
                 URL: http://jira.codehaus.org/browse/MNG-3293
             Project: Maven 2
          Issue Type: Bug
          Components: Plugins and Lifecycle, Profiles
    Affects Versions: 2.0.7
            Reporter: Paudi Moriarty


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.

-- 
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

        

[jira] Commented: (MNG-3293) Activating more than one profile with the same build plugin results in only one execution

Posted by "Juan M. Tula (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=180268#action_180268 ] 

Juan M. Tula commented on MNG-3293:
-----------------------------------

Thanks for the explanation, I don't know that is the expected behaviour.

> Activating more than one profile with the same build plugin results in only one execution
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-3293
>                 URL: http://jira.codehaus.org/browse/MNG-3293
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugins and Lifecycle, Profiles
>    Affects Versions: 2.0.7
>            Reporter: Paudi Moriarty
>            Assignee: Benjamin Bentmann
>
> 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)
> {code:xml}
> <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>
> {code}
> Just a guess, but it looks like the executions are not being merged, rather the definition of the second plugin overwrites the first.

-- 
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

        

[jira] Updated: (MNG-3293) Activating more than one profile with the same build plugin results in only one execution

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-3293:
-----------------------------------

    Description: 
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)
{code:xml}
<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>
{code}
Just a guess, but it looks like the executions are not being merged, rather the definition of the second plugin overwrites the first.

  was:
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.


> Activating more than one profile with the same build plugin results in only one execution
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-3293
>                 URL: http://jira.codehaus.org/browse/MNG-3293
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugins and Lifecycle, Profiles
>    Affects Versions: 2.0.7
>            Reporter: Paudi Moriarty
>             Fix For: 2.2.x
>
>
> 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)
> {code:xml}
> <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>
> {code}
> Just a guess, but it looks like the executions are not being merged, rather the definition of the second plugin overwrites the first.

-- 
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

        

[jira] Commented: (MNG-3293) Activating more than one profile with the same build plugin results in only one execution

Posted by "Juan M. Tula (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179348#action_179348 ] 

Juan M. Tula commented on MNG-3293:
-----------------------------------

I'm having same behaviour with 2.0.9 and 2.0.10.
Also, they doesn't work if they are specified in command line. 
I think it's very important to correct this issue, because it lowers greatly profiles power

> Activating more than one profile with the same build plugin results in only one execution
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-3293
>                 URL: http://jira.codehaus.org/browse/MNG-3293
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugins and Lifecycle, Profiles
>    Affects Versions: 2.0.7
>            Reporter: Paudi Moriarty
>             Fix For: 2.2.x
>
>
> 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.

-- 
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

        

[jira] Updated: (MNG-3293) Activating more than one profile with the same build plugin results in only one execution

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3293:
------------------------------

    Fix Version/s: 2.0.x

> Activating more than one profile with the same build plugin results in only one execution
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-3293
>                 URL: http://jira.codehaus.org/browse/MNG-3293
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugins and Lifecycle, Profiles
>    Affects Versions: 2.0.7
>            Reporter: Paudi Moriarty
>             Fix For: 2.0.x
>
>
> 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.

-- 
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

        

[jira] Closed: (MNG-3293) Activating more than one profile with the same build plugin results in only one execution

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-3293.
----------------------------------

         Assignee: Benjamin Bentmann
       Resolution: Not A Bug
    Fix Version/s:     (was: 2.2.x)

This works as designed. The two {{<execution>}} elements don't have an {{<id>}} so their identifiers default to {{default}} (cf. [Maven Model Spec|http://maven.apache.org/ref/current/maven-model/maven.html#class_execution]. It's the very purpose of these ids to enable merging of POM parts that have the same id.

If you want the profiles to have additive effects, just assign distinct ids to the executions.

> Activating more than one profile with the same build plugin results in only one execution
> -----------------------------------------------------------------------------------------
>
>                 Key: MNG-3293
>                 URL: http://jira.codehaus.org/browse/MNG-3293
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Plugins and Lifecycle, Profiles
>    Affects Versions: 2.0.7
>            Reporter: Paudi Moriarty
>            Assignee: Benjamin Bentmann
>
> 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)
> {code:xml}
> <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>
> {code}
> Just a guess, but it looks like the executions are not being merged, rather the definition of the second plugin overwrites the first.

-- 
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