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

detect self references in POM and fail fast

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.9
    • Fix Version/s: 3.5.2
    • Labels:
    • Environment:
      Oracle JDK 1.8.0_111 on Linux 4.8 x64

      Description

      Maven does not detect self references in a POM and tries to download the artifact it is about to build, which makes no sense and should result in an early error and abort of the build.

      E.g. sample POM:

          <groupId>org.my.acme</groupId>
          <artifactId>my-module</artifactId>
          <version>1.2.3</version>
          <dependencies>
              ...
              <dependency>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>my-module</artifactId>
                  <version>${project.version}</version>
              <dependency>
          <dependencies>
      

      Maven tries to download my-module.jar but obviously fails...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                khmarbaise Karl Heinz Marbaise
                Reporter:
                grexe Gregor B. Rosenauer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: