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

Incorrect resolution of ${project.groupId} for POM imports with different groupIds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.1.1
    • None
    • None

    Description

      In the attached project find a sample which causes Maven to fail when resolving POM imports. The property ${project.groupId} is resolved incorrectly when

      1. the imported modules have a different groupId
      2. the imported POMs come from a submodule where one submodule containing a BOM POM has another groupId

      The groupIds of all other POM imports are changed to the groupId of the third BOM.

      Console output:

      $ mvn install
      [INFO] Scanning for projects...
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]
      [ERROR]   The project com.mycompany.myproject.submodule:other-extension:1.0-SNAPSHOT (C:\dev\myproject\other-extension\pom.xml) has 2 errors
      [ERROR]     Non-resolvable import POM: Failure to find com.mycompany.myproject.submodule:bom-1:pom:1.0-SNAPSHOT in http://repository-build.coremedia.com/nexus/content/repositories/snapshots.licenses/ was cached in the local repository, resolution will not be reattempted until the update interval of coremedia.internal.licenses has elapsed or updates are forced @ com.mycompany.myproject:myroot:1.0-SNAPSHOT, C:\dev\myproject\pom.xml, line 19, column 19 -> [Help 2]
      [ERROR]     Non-resolvable import POM: Failure to find com.mycompany.myproject.submodule:bom-2:pom:1.0-SNAPSHOT in http://repository-build.coremedia.com/nexus/content/repositories/snapshots.licenses/ was cached in the local repository, resolution will not be reattempted until the update interval of coremedia.internal.licenses has elapsed or updates are forced @ com.mycompany.myproject:myroot:1.0-SNAPSHOT, C:\dev\myproject\pom.xml, line 26, column 19 -> [Help 2]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
      

      Attachments

        1. myproject.zip
          5 kB
          Daniel Strassenburg

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              dstrasse Daniel Strassenburg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: