Ian Dunbar created MNG-6359:
-------------------------------

             Summary: Non-resolvable parent POM with gitbash (MINGW64_NT-10.0)
                 Key: MNG-6359
                 URL: https://issues.apache.org/jira/browse/MNG-6359
             Project: Maven
          Issue Type: Bug
          Components: POM
    Affects Versions: 3.5.2, 3.5.0
         Environment: Run from gitbash
GNU bash, version 4.4.12(1)-release (x86_64-pc-msys)

Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 
2017-10-18T08:58:13+01:00)
Maven home: C:\Program Files\Apache\maven
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_161\jre
Default locale: en_IE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

            Reporter: Ian Dunbar
         Attachments: mm.zip

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}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to