Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP

      Description

      This bug is similar to http://jira.codehaus.org/browse/MANTRUN-57;jsessionid=awtyLFBPEQN6vVmwu4 - the difference being the plugins are not correctly merged.

      In the parent's POM, the following was defined:

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-eclipse-plugin</artifactId>
              <configuration>
                <downloadSources>true</downloadSources>
                <additionalBuildcommands>
                  <buildcommand>
                    parentBuildCommand
                  </buildcommand>
                </additionalBuildcommands>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>

      in the child's POM, the following was defined.

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-eclipse-plugin</artifactId>
              <configuration>
                <additionalBuildcommands>
                  <buildcommand>
                    childBuildCommand
                  </buildcommand>
                </additionalBuildcommands>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>

      I expect the effective POM to look like this:

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-eclipse-plugin</artifactId>
              <configuration>
                <additionalBuildcommands>
                  <buildcommand>
                    parentBuildCommand
                  </buildcommand>
                  <buildcommand>
                    childBuildCommand
                  </buildcommand>
                </additionalBuildcommands>
                <downloadSources>true</downloadSources>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>

      Outside of the common problem of the <plugin> element being duplicated, here's the issue this bug is trying to address:
      In the effective pom, the the <downloadSources> element was correctly merged, however, the <buildCommand> element was not. It seems like the merging only correctly happens down to a given level.

      I noticed that http://jira.codehaus.org/browse/MNG-2297;jsessionid=awtyLFBPEQN6vVmwu4 has a patch attached, so this may be fixed in 2.0.5, I just wanted to raise the use case in case that patch did not address this specific problem.

      I'm attaching the POMs needed to reproduce the problem and the effective POM for the child.

      1. effective-child-pom.xml
        4 kB
        Allan Shoup
      2. test-poms.zip
        1 kB
        Allan Shoup

        Issue Links

          Activity

          Allan Shoup created issue -
          Jason van Zyl made changes -
          Field Original Value New Value
          Patch Submitted [Yes]
          John Casey made changes -
          Patch Submitted [Yes]
          Assignee John Casey [ jdcasey ]
          Description This bug is similar to http://jira.codehaus.org/browse/MANTRUN-57;jsessionid=awtyLFBPEQN6vVmwu4 - the difference being the plugins are not correctly merged.

          In the parent's POM, the following was defined:
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <downloadSources>true</downloadSources>
          <additionalBuildcommands>
          <buildcommand>
          parentBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>


          in the child's POM, the following was defined.
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <additionalBuildcommands>
          <buildcommand>
          childBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>

          I expect the effective POM to look like this:
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <additionalBuildcommands>
          <buildcommand>
          parentBuildCommand
          </buildcommand>
          <buildcommand>
          childBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          <downloadSources>true</downloadSources>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>

          Outside of the common problem of the <plugin> element being duplicated, here's the issue this bug is trying to address:
          In the effective pom, the the <downloadSources> element was correctly merged, however, the <buildCommand> element was not. It seems like the merging only correctly happens down to a given level.

          I noticed that http://jira.codehaus.org/browse/MNG-2297;jsessionid=awtyLFBPEQN6vVmwu4 has a patch attached, so this may be fixed in 2.0.5, I just wanted to raise the use case in case that patch did not address this specific problem.

          I'm attaching the POMs needed to reproduce the problem and the effective POM for the child.
          This bug is similar to http://jira.codehaus.org/browse/MANTRUN-57;jsessionid=awtyLFBPEQN6vVmwu4 - the difference being the plugins are not correctly merged.

          In the parent's POM, the following was defined:
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <downloadSources>true</downloadSources>
          <additionalBuildcommands>
          <buildcommand>
          parentBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>


          in the child's POM, the following was defined.
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <additionalBuildcommands>
          <buildcommand>
          childBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>

          I expect the effective POM to look like this:
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <additionalBuildcommands>
          <buildcommand>
          parentBuildCommand
          </buildcommand>
          <buildcommand>
          childBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          <downloadSources>true</downloadSources>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>

          Outside of the common problem of the <plugin> element being duplicated, here's the issue this bug is trying to address:
          In the effective pom, the the <downloadSources> element was correctly merged, however, the <buildCommand> element was not. It seems like the merging only correctly happens down to a given level.

          I noticed that http://jira.codehaus.org/browse/MNG-2297;jsessionid=awtyLFBPEQN6vVmwu4 has a patch attached, so this may be fixed in 2.0.5, I just wanted to raise the use case in case that patch did not address this specific problem.

          I'm attaching the POMs needed to reproduce the problem and the effective POM for the child.
          Priority Major [ 3 ]
          John Casey made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Brett Porter made changes -
          Fix Version/s 2.1-alpha-1 [ 13143 ]
          Priority Blocker [ 1 ]
          Benjamin Bentmann made changes -
          Link This issue is related to MNG-732 [ MNG-732 ]
          Benjamin Bentmann made changes -
          Link This issue relates to MNG-3836 [ MNG-3836 ]
          Benjamin Bentmann made changes -
          Fix Version/s 3.0-alpha-1 [ 13143 ]
          Fix Version/s 2.0.8 [ 13139 ]
          Paul Benedict made changes -
          Link This issue relates to MNG-4389 [ MNG-4389 ]
          Hervé Boutemy made changes -
          Description This bug is similar to http://jira.codehaus.org/browse/MANTRUN-57;jsessionid=awtyLFBPEQN6vVmwu4 - the difference being the plugins are not correctly merged.

          In the parent's POM, the following was defined:
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <downloadSources>true</downloadSources>
          <additionalBuildcommands>
          <buildcommand>
          parentBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>


          in the child's POM, the following was defined.
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <additionalBuildcommands>
          <buildcommand>
          childBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>

          I expect the effective POM to look like this:
          <build>
          <pluginManagement>
          <plugins>
          <plugin>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <additionalBuildcommands>
          <buildcommand>
          parentBuildCommand
          </buildcommand>
          <buildcommand>
          childBuildCommand
          </buildcommand>
          </additionalBuildcommands>
          <downloadSources>true</downloadSources>
          </configuration>
          </plugin>
          </plugins>
          </pluginManagement>
          </build>

          Outside of the common problem of the <plugin> element being duplicated, here's the issue this bug is trying to address:
          In the effective pom, the the <downloadSources> element was correctly merged, however, the <buildCommand> element was not. It seems like the merging only correctly happens down to a given level.

          I noticed that http://jira.codehaus.org/browse/MNG-2297;jsessionid=awtyLFBPEQN6vVmwu4 has a patch attached, so this may be fixed in 2.0.5, I just wanted to raise the use case in case that patch did not address this specific problem.

          I'm attaching the POMs needed to reproduce the problem and the effective POM for the child.
          This bug is similar to http://jira.codehaus.org/browse/MANTRUN-57;jsessionid=awtyLFBPEQN6vVmwu4 - the difference being the plugins are not correctly merged.

          In the parent's POM, the following was defined:
          {code:xml}<build>
            <pluginManagement>
              <plugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-eclipse-plugin</artifactId>
                  <configuration>
                    <downloadSources>true</downloadSources>
                    <additionalBuildcommands>
                      <buildcommand>
                        parentBuildCommand
                      </buildcommand>
                    </additionalBuildcommands>
                  </configuration>
                </plugin>
              </plugins>
            </pluginManagement>
          </build>{code}


          in the child's POM, the following was defined.
          {code:xml}<build>
            <pluginManagement>
              <plugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-eclipse-plugin</artifactId>
                  <configuration>
                    <additionalBuildcommands>
                      <buildcommand>
                        childBuildCommand
                      </buildcommand>
                    </additionalBuildcommands>
                  </configuration>
                </plugin>
              </plugins>
            </pluginManagement>
          </build>{code}

          I expect the effective POM to look like this:
          {code:xml}<build>
            <pluginManagement>
              <plugins>
                <plugin>
                  <artifactId>maven-eclipse-plugin</artifactId>
                  <configuration>
                    <additionalBuildcommands>
                      <buildcommand>
                        parentBuildCommand
                      </buildcommand>
                      <buildcommand>
                        childBuildCommand
                      </buildcommand>
                    </additionalBuildcommands>
                    <downloadSources>true</downloadSources>
                  </configuration>
                </plugin>
              </plugins>
            </pluginManagement>
          </build>{code}

          Outside of the common problem of the <plugin> element being duplicated, here's the issue this bug is trying to address:
          In the effective pom, the the <downloadSources> element was correctly merged, however, the <buildCommand> element was not. It seems like the merging only correctly happens down to a given level.

          I noticed that http://jira.codehaus.org/browse/MNG-2297;jsessionid=awtyLFBPEQN6vVmwu4 has a patch attached, so this may be fixed in 2.0.5, I just wanted to raise the use case in case that patch did not address this specific problem.

          I'm attaching the POMs needed to reproduce the problem and the effective POM for the child.
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Link This issue relates to MNGSITE-99 [ MNGSITE-99 ]
          Mark Thomas made changes -
          Workflow jira [ 12713160 ] Default workflow, editable Closed status [ 12755588 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Link This issue relates to MNGSITE-99 [ MNGSITE-99 ]
          Mark Thomas made changes -
          Workflow jira [ 12952963 ] Default workflow, editable Closed status [ 12990292 ]

            People

            • Assignee:
              John Casey
              Reporter:
              Allan Shoup
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development