Maven
  1. Maven
  2. MNG-1682

Plugins do not honor the correct extension when run as a part of a multiproject build

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Plugins and Lifecycle
    • Labels:
      None
    • Environment:
      Windows NT; JDK 1.5
    • Complexity:
      Intermediate
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      I have a plugin with a component.xml described here.

      I think the component.xml is correct - it certainly looks the
      same as the plexus examples.

      My project that uses this plugin works entirely correctly, unless it
      is a part of a multiproject build, in which case it uses the wrong
      extension. I don't know why this would be the case unless I've missed
      something?

      In same directory:
      W:\kms\dev\apps\kms>mvn install
      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building KMS Application Code
      [INFO] task-segment: [install]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [cargo2:uberwar]
      [INFO] [install:install]
      [INFO] Installing W:\1244 - Knowledge Management System
      (KMS)\dev\apps\kms\target\kms-2.0-SNAPSHOT.war to C:\Documents and
      Settings\nig
      el.magnay\.m2\repository\com\cswgroup\kms\kms\2.0-SNAPSHOT\kms-2.0-SNAPSHOT.war
      [INFO] ----------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ----------------------------------------------------------------------------
      [INFO] Total time: 1 minute 9 seconds
      [INFO] Finished at: Thu Nov 24 11:46:53 GMT 2005
      [INFO] Final Memory: 3M/6M
      [INFO] ----------------------------------------------------------------------------

      As a part of a multiproject:
      ....
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building KMS Application Code
      [INFO] task-segment: [install]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [cargo2:uberwar]
      [INFO] [install:install]
      [INFO] Installing W:\1244 - Knowledge Management System
      (KMS)\dev\apps\kms\target\kms-2.0-SNAPSHOT.war to C:\Documents and
      Settings\nig
      el.magnay\.m2\repository\com\cswgroup\kms\kms\2.0-SNAPSHOT\kms-2.0-SNAPSHOT.uberwar
      ....

      Config of plugin:
      <component-set>
      <components>
      <component>
      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
      <role-hint>uberwar</role-hint>
      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
      <configuration>
      <phases>
      <package>
      org.codehaus.cargo.maven2:cargo-maven2-plugin:uberwar
      </package>
      <install>org.apache.maven.plugins:maven-install-plugin:install</install>
      <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
      </phases>
      </configuration>
      </component>

      <component>
      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
      <role-hint>uberwar</role-hint>
      <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
      <configuration>
      <type>uberwar</type>
      <extension>war</extension>
      <packaging>uberwar</packaging>
      </configuration>
      </component>
      </components>
      </component-set>

      1. MNG-1682-ittest.patch
        6 kB
        Carlos Sanchez
      2. ReactorProblem.tar.gz
        10 kB
        Jochen Wiedmann

        Issue Links

          Activity

          Hide
          Brett Porter added a comment -

          possibly related

          Show
          Brett Porter added a comment - possibly related
          Hide
          Jochen Wiedmann added a comment -

          The attached project can be used to reproduce the problem. When "install" is invoked in the subproject, then the "assembly:assembly" goal is executed. This is not the case when "install" is invoked in the parent project.

          Show
          Jochen Wiedmann added a comment - The attached project can be used to reproduce the problem. When "install" is invoked in the subproject, then the "assembly:assembly" goal is executed. This is not the case when "install" is invoked in the parent project.
          Hide
          Carlos Sanchez added a comment -

          I tok the example code and converted to an it test for https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources and I can't replicate there the problem, when I run install in parent pom it runs the assembly.
          I tested 2.0.4 and 2.0.5RC

          Show
          Carlos Sanchez added a comment - I tok the example code and converted to an it test for https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources and I can't replicate there the problem, when I run install in parent pom it runs the assembly. I tested 2.0.4 and 2.0.5RC
          Hide
          John Conlon added a comment -

          Carlos -

          From the Feb 9 comment you posted on
          https://issues.apache.org/jira/browse/FELIX-198

          It appears you were able to duplicate this problem. If so, can we look forward to this issue being assigned?

          Show
          John Conlon added a comment - Carlos - From the Feb 9 comment you posted on https://issues.apache.org/jira/browse/FELIX-198 It appears you were able to duplicate this problem. If so, can we look forward to this issue being assigned?
          Hide
          Carlos Sanchez added a comment -

          replicated yes, but isolated and make an integration test is other thing

          Show
          Carlos Sanchez added a comment - replicated yes, but isolated and make an integration test is other thing
          Hide
          John Conlon added a comment -

          Okay, just as long as someone knows this issue is real and it is not totally ignored. Thanks for helping us out at Felix. - John

          Show
          John Conlon added a comment - Okay, just as long as someone knows this issue is real and it is not totally ignored. Thanks for helping us out at Felix. - John
          Hide
          Brett Porter added a comment -

          this might already be fixed in trunk, if not 2.0.7. Can anyone verify?

          Show
          Brett Porter added a comment - this might already be fixed in trunk, if not 2.0.7. Can anyone verify?
          Hide
          Jochen Wiedmann added a comment -

          Confirmed, Brett. My test project works fine with 2.0.7.

          Show
          Jochen Wiedmann added a comment - Confirmed, Brett. My test project works fine with 2.0.7.
          Hide
          Brett Porter added a comment -

          great!

          Show
          Brett Porter added a comment - great!

            People

            • Assignee:
              Unassigned
              Reporter:
              Nigel Magnay
            • Votes:
              30 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: