Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4960

[regression] Make-like reactor mode does not build selected project when resuming from one of its prerequisites

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0, 3.0.1
    • 3.0.2
    • Command Line
    • None
    • Apache Maven 3.0.1 (r1038046; 2010-11-23 02:58:32-0800)
      Java version: 1.6.0_19
      OS name: Windows XP/Vista

    Description

      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.

      Attachments

        1. Maven3 Command Line.zip
          545 kB
          Sujit Kabbinahally
        2. Maven3 Command Line.zip
          545 kB
          Sujit Kabbinahally
        3. MNG-4960_SK.zip
          7 kB
          Sujit Kabbinahally
        4. MNG-4960.zip
          2 kB
          Benjamin Bentmann

        Activity

          People

            bentmann Benjamin Bentmann
            kabbin Sujit Kabbinahally
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: