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

Non-resolvable parent POM with gitbash (MINGW64_NT-10.0)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 3.5.0, 3.5.2
    • None
    • POM
    • None

    Description

      The attached multimodule example fails to build when run from gitbash on windows 10. I've derived it from this example https://github.com/jamesward/maven-multi-module-example but modified to match my scenario.

      It works fine from CMD shell on the same machine with the same Apache Maven install. It's only with gitbash that the issue occurs. I see that the mvn launcher has specific sections for mingw derived shells like gitbash, so possibly something is wrong there.

       

      The issue occurs when the project has no artifacts yet in .m2 repo. So please remove .m2/repository/com/jamesward prior to testing.

      The transition from working to non-working in gitbash is with the addition of the parent section in the toplevel pom.xml, so there seems to be something wrong with the parent resolution in the toplevel when run from gitbash

      Steps:

      • remove .m2/repository/com/jamesward
      • unzip the example
      • run gitbash in that folder
      • mvn clean install
      • fails to build
      • change to cmd.exe
      • mvn clean install
      • builds correctly

      Error log:

       

      [INFO] Scanning for projects...
      [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [FATAL] Non-resolvable parent POM for com.jamesward:core:1.0-SNAPSHOT: Could not find artifact com.jamesward:parent:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13
      [FATAL] Non-resolvable parent POM for com.jamesward:app:[unknown-version]: Could not find artifact com.jamesward:parent:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13
      {{ @}}
      [ERROR] The build could not read 2 projects -> [Help 1]
      [ERROR]
      [ERROR] The project com.jamesward:core:1.0-SNAPSHOT (C:\mm\core\pom.xml) has 1 error
      [ERROR] Non-resolvable parent POM for com.jamesward:core:1.0-SNAPSHOT: Could not find artifact com.jamesward:parent:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
      [ERROR]
      [ERROR] The project com.jamesward:app:[unknown-version] (C:\mm\app\pom.xml) has 1 error
      [ERROR] Non-resolvable parent POM for com.jamesward:app:[unknown-version]: Could not find artifact com.jamesward:parent:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [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
      [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

      Attachments

        1. mm.zip
          5 kB
          Ian Dunbar

        Activity

          People

            Unassigned Unassigned
            iand Ian Dunbar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: