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

[regression] Goals inherited from parent are lost when merging with child execution

    XMLWordPrintableJSON

Details

    Description

      Parent POM snippet:

      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-a</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>parent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      

      Child POM snippet:

      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-a</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>child</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      

      Effective child POM in Maven 2.x:

      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-a</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>child</goal>
              <goal>parent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      

      i.e. both the goal from the child and the goal from the parent (in that order) will be executed. In Maven 3.x however, only the child's goal is present.

      Attachments

        Activity

          People

            sisbell Britton Isbell
            bentmann Benjamin Bentmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: