[ http://jira.codehaus.org/browse/MNG-786?page=comments#action_47504 ] 

Dan Tran commented on MNG-786:
------------------------------

I understand why it builds and clean both since ${user.name} always available 
in system properties.  My case a little different


<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.maven.it</groupId>
  <artifactId>maven-core-it0075-root</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <modules>
    <module>sub1</module>
  </modules>

  <profiles>
    <profile>
      <id>include-sub2</id>
      <activation>
        <property><name>trigger</name></property>
      </activation>

      <modules>
        <module>sub2</module>
      </modules>
    </profile>
  </profiles>
</project>


so m2 install -Dtrigger=anything would build both sub1 and sub2

however

m2 clean:clean -Dtrigger=anything only clean sub1



> clean:clean goal ignores profile settings
> -----------------------------------------
>
>          Key: MNG-786
>          URL: http://jira.codehaus.org/browse/MNG-786
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Versions: 2.0-beta-1
>  Environment: XP
>     Reporter: Dan Tran
>     Assignee: John Casey
>      Fix For: 2.0-beta-3

>
> Original Estimate: 3 hours
>        Time Spent: 30 minutes
>         Remaining: 0 minutes
>
> I am using pom.xml 's Profiles to dynamically inject addition modules into my 
> a parent pom.  It works
> However m2 clean:clean ignores the profile setting and not step into the 
> desired sub project to do the clean.
> Here is the pom.xml.  Appropriate module is injected based on -Dplatform=xyz
> <project xmlns="http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
>   <modelVersion>4.0.0</modelVersion>
>   
>   <parent>
>     <groupId>phoenix</groupId>
>     <artifactId>web-connectors-parent</artifactId>
>     <version>7.0-SNAPSHOT</version>
>   </parent>
>   <packaging>pom</packaging>
>   <groupId>phoenix</groupId>
>   <artifactId>modiiop-connectors-parent</artifactId>
>   <name>ModIIOP Connectors Parent</name>
>   <profiles>
>   
>     <profile>
>       <id>add-windows-86-module</id>
>       <activation>
>         <property>
>           <name>platform</name>
>           <value>windows-x86</value>
>         </property>
>       </activation>
>       <modules>
>         <module>windows-x86</module>
>       </modules>
>     </profile>
>     <profile>
>       <id>add-redhat-x86-r3-module</id>
>       <activation>
>         <property>
>           <name>platform</name>
>           <value>redhat-x86-r3</value>
>         </property>
>       </activation>
>       <modules>
>         <module>redhat-x86-r3</module>
>       </modules>
>     </profile>
>     
>     <profile>
>       <id>add-aix-ppc-module</id>
>       <activation>
>         <property>
>           <name>platform</name>
>           <value>aix-ppc</value>
>         </property>
>       </activation>
>       <modules>
>         <module>aix-ppc</module>
>       </modules>
>     </profile>
>     
>   </profiles>
> </project>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to