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

Child pom doesn't use the plugin version specified in the parent pom plugin management

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.6.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have a parent pom file with the following inside the build tag:

              <pluginManagement>
                  <plugins>
                        ...
                      <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-surefire-plugin</artifactId>
                          <version>2.22.2</version>
                      </plugin>
                  </plugins>
              </pluginManagement>
      

      And I have a child pom (a direct child) that has the following in the build tag:

              <plugins>
                   ...
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-surefire-plugin</artifactId>
                  </plugin>
              </plugins>
      

      My expectation is that the build will use version 2.22.2 of the maven surefire plugin.

      Instead it runs using version 2.22.1. Only when I explicitly specify the version in the child pom, the build uses version 2.22.2.

      I think this is a bug, or at the very least VERY unintuitive behavior.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rikschaaf Rik Schaaf
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: