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

Project-level plugin dependencies are in random order after merging

    XMLWordPrintableJSON

Details

    Description

      Parent POM snippet:

      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-class-loader</artifactId>
        <version>2.1-SNAPSHOT</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>e</artifactId>
            <version>0.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>a</artifactId>
            <version>0.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>d</artifactId>
            <version>0.1</version>
          </dependency>
        </dependencies>
      </plugin>
      

      Child POM snippet:

      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-class-loader</artifactId>
        <version>2.1-SNAPSHOT</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>c</artifactId>
            <version>0.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>a</artifactId>
            <version>0.2</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>b</artifactId>
            <version>0.1</version>
          </dependency>
        </dependencies>
      </plugin>
      

      Effective child POM:

      <plugin>
        <groupId>org.apache.maven.its.plugins</groupId>
        <artifactId>maven-it-plugin-class-loader</artifactId>
        <version>2.1-SNAPSHOT</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>e</artifactId>
            <version>0.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>a</artifactId>
            <version>0.2</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>d</artifactId>
            <version>0.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>c</artifactId>
            <version>0.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.its.mng3906</groupId>
            <artifactId>b</artifactId>
            <version>0.1</version>
          </dependency>
        </dependencies>
      </plugin>
      

      This should be synced with the handling of ordinary project dependencies, i.e.

      1. plugin dependencies of child POM first (in POM order)
      2. plugin dependencies of parent POM last (in POM order)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: