You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sujit Kabbinahally (JIRA)" <ji...@codehaus.org> on 2011/01/05 20:39:57 UTC

[jira] Updated: (MNG-4960) Maven3 behaves differently than Maven2 when building a multi-module enterprise project on command line

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

Sujit Kabbinahally updated MNG-4960:
------------------------------------

    Attachment: Maven3 Command Line.zip

Please ignore the initial attachment as the comments in it are wrong and use this instead.
Thanks

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