[ 
http://jira.codehaus.org/browse/MNG-4960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann updated MNG-4960:
-----------------------------------

    Attachment: MNG-4960.zip

Can you confirm that the attached demo project reproduces your issue upon 
invocation of {{mvn -pl sub-2 -am -rf sub-1 clean}} of? If not, could you 
please attach a minimal example project that can be used to reproduce the issue?

> Maven3 behaves differently than Maven2 when building a multi-module 
> enterprise project on command line
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-4960
>                 URL: http://jira.codehaus.org/browse/MNG-4960
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0, 3.0.1
>         Environment: Apache Maven 3.0.1 (r1038046; 2010-11-23 02:58:32-0800)
> Java version: 1.6.0_19
> OS name: Windows XP/Vista
>            Reporter: Sujit Kabbinahally
>         Attachments: Maven3 Command Line.zip, Maven3 Command Line.zip, 
> MNG-4960.zip
>
>
> As of now in Maven2 (2.2.1) we are able to build a multi-module enterprise 
> project as explained below and the same does not work in Maven3 (3.0.1) after 
> the migration. 
> Basically in the multi-module enterprise project, we build multiple ear's 
> with their own dependents and each one of these EAR's is built as its own 
> module by inheriting properties/attributes etc from the parent pom at the 
> base level of the whole project.
> In Maven2, the below command to accomplish the above explanation works as 
> expected when initiated from the ${project.basedir} of the main project.
> mvn -pl ear_module -am -rf first_dependent_module clean install -P <profileId>
> @ build time, the reactor lists the build order as shown below
>    1. first_dependent_module
>    2. second_dependent_module
>    3. ear_module
> Option '-rf' is used to NOT delete the target folder at the main 
> ${project.basedir} since we want to still keep the output from the build of 
> another EAR and its dependents.
> With Maven3, however, the reactor lists the build order as shown below:
>    1. first_dependent_module
>    2. second_dependent_module
> Maven3 ignores the argument (ear_module) set to '-pl' option to be also built 
> after its dependents have been.
>  
> This behavior can be made to work only if '-rf' option is removed from the 
> command and i.e. call 'mvn -pl ear_module -am clean install -P <profileId>' 
> which defeats the whole purpose of NOT deleting the 'target' folder under 
> under base ${project.basedir}.
> Attached doc has screen shots to display the behavior explained above for all 
> cases.

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

        

Reply via email to