[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17069796#comment-17069796 ] Hudson commented on MNG-6261: - Build failed in Jenkins: Maven TLP » maven-studies » maven-metrics #4 See https://builds.apache.org/job/maven-box/job/maven-studies/job/maven-metrics/4/ > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.1 > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16782689#comment-16782689 ] Hudson commented on MNG-6261: - Build succeeded in Jenkins: Maven TLP » maven » MNG-6294 #12 See https://builds.apache.org/job/maven-box/job/maven/job/MNG-6294/12/ > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.1 > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16738790#comment-16738790 ] Hudson commented on MNG-6261: - Build failed in Jenkins: Maven TLP » maven » MNG-6069 #23 See https://builds.apache.org/job/maven-box/job/maven/job/MNG-6069/23/ > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.1 > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16735007#comment-16735007 ] Hudson commented on MNG-6261: - Build succeeded in Jenkins: Maven TLP » maven » MNG-5693 #7 See https://builds.apache.org/job/maven-box/job/maven/job/MNG-5693/7/ > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.1 > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16702848#comment-16702848 ] Dawid Weiss commented on MNG-6261: -- Thank you for fixing this. > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16702455#comment-16702455 ] Fabiano Cipriano de Oliveira commented on MNG-6261: --- Thank you all for your support > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16702364#comment-16702364 ] Hudson commented on MNG-6261: - Build succeeded in Jenkins: Maven TLP » maven » master #114 See https://builds.apache.org/job/maven-box/job/maven/job/master/114/ > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16702346#comment-16702346 ] Robert Scholte commented on MNG-6261: - Fixed in [e4e33f73b8f089e443a3bcc678f509bf0daffb15|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=e4e33f73b8f089e443a3bcc678f509bf0daffb15] Thanks for the patch! > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16702339#comment-16702339 ] ASF GitHub Bot commented on MNG-6261: - rfscholte closed pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java index 0ac45ee459..87146116de 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java @@ -852,10 +852,11 @@ private ModelData readParent( Model childModel, ModelSource childSource, ModelBu File pomFile = parentData.getModel().getPomFile(); if ( pomFile != null ) { +FileModelSource pomSource = new FileModelSource( pomFile ); ModelSource expectedParentSource = getParentPomFile( childModel, childSource ); if ( expectedParentSource == null || ( expectedParentSource instanceof ModelSource2 -&& !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) ) ) +&& !pomSource.equals( expectedParentSource ) ) ) { parentData = readParentExternally( childModel, request, problems ); } diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java index a2e1141769..f329eb2a3e 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java @@ -80,4 +80,27 @@ public URI getLocationURI() { return getFile().toURI(); } + +@Override +public boolean equals( Object obj ) +{ +if ( this == obj ) +{ +return true; +} + +if ( !( obj instanceof FileModelSource ) ) +{ +return false; +} +FileModelSource other = ( FileModelSource ) obj; +return getFile().equals( other.getFile() ); +} + +@Override +public int hashCode() +{ +return getFile().hashCode(); +} + } diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java new file mode 100644 index 00..9b0ecd9ddf --- /dev/null +++ b/maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java @@ -0,0 +1,75 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import java.io.File; +import java.io.IOException; +import static junit.framework.TestCase.assertFalse; +import static junit.framework.TestCase.assertTrue; +import org.apache.commons.lang3.SystemUtils; +import static org.junit.Assume.assumeTrue; +import org.junit.Test; + +/** + * Test that validate the solution of MNG-6261 issue + * + */ +public class FileModelSourceTest +{ + +/** + * Test of equals method, of class FileModelSource. + */ +@Test +public void testEquals() +throws Exception +{ +File tempFile = createTempFile( "pomTest" ); +FileModelSource instance = new FileModelSource( tempFile ); + +assertFalse( instance.equals( null ) ); +assertFalse( instance.equals( new Object() ) ); +assertTrue( instance.equals( instance ) ); +assertTrue(
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16701256#comment-16701256 ] ASF GitHub Bot commented on MNG-6261: - slachiewicz commented on issue #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#issuecomment-442282452 +1 And one more small testcase - should pass before/after patch `org.apache.maven.model.building.FileModelSource#getRelatedSource` - one use of normalize ``` @Test public void testDiffrentPaths () throws IOException { Path tempDirParent = Files.createTempDirectory( "FileModelSource-" ); Path subdir = Files.createDirectory( tempDirParent.resolve( "test" ) ); Path pomFile = Files.createTempFile(subdir, "myCustomPom-", ".xml" ); Path relativeFile = subdir.resolve( "../test/" + pomFile.getFileName() ); assertNotEquals( pomFile, relativeFile ); assertEquals( pomFile.normalize(), relativeFile.normalize()); assertNotEquals( pomFile.toFile(), relativeFile.toFile() ); assertNotEquals( pomFile.toFile().toURI(), relativeFile.toFile().toURI() ); assertEquals( pomFile.toFile().getCanonicalFile(), relativeFile.toFile().getCanonicalFile() ); assertEquals( pomFile.toFile().toURI().normalize(), relativeFile.toFile().toURI().normalize() ); FileModelSource instance = new FileModelSource( pomFile.toFile() ); assertNotEquals(instance, new FileModelSource( relativeFile.toFile() ) ); } } ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697596#comment-16697596 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r236030052 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,74 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import java.io.File; +import junit.framework.TestCase; +import static junit.framework.TestCase.assertFalse; +import static junit.framework.TestCase.assertTrue; +import org.apache.commons.lang3.SystemUtils; +import static org.junit.Assume.assumeTrue; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +/** + * + * @author fabiano Review comment: I see, I will change it This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697580#comment-16697580 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r236029100 ## File path: maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java ## @@ -80,4 +80,27 @@ public URI getLocationURI() { return getFile().toURI(); } + +@Override +public boolean equals( Object obj ) +{ +if ( this == obj ) +{ +return true; +} + +if ( ( obj == null ) || !( obj instanceof FileModelSource ) ) Review comment: You´re right this make code simpler, thank you This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697577#comment-16697577 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r236029078 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,74 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import java.io.File; +import junit.framework.TestCase; +import static junit.framework.TestCase.assertFalse; +import static junit.framework.TestCase.assertTrue; +import org.apache.commons.lang3.SystemUtils; +import static org.junit.Assume.assumeTrue; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +/** + * + * @author fabiano + */ +public class FileModelSourceTest +{ + +@Rule +public TemporaryFolder folder = new TemporaryFolder(); + +/** + * Test of equals method, of class FileModelSource. + */ +@Test +public void testEquals() +throws Exception +{ +File tempFile = File.createTempFile( "pomTest-", ".xml" ); Review comment: Make sense, thanks. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16694258#comment-16694258 ] ASF GitHub Bot commented on MNG-6261: - judby commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r235257910 ## File path: maven-model-builder/src/main/java/org/apache/maven/model/building/FileModelSource.java ## @@ -80,4 +80,27 @@ public URI getLocationURI() { return getFile().toURI(); } + +@Override +public boolean equals( Object obj ) +{ +if ( this == obj ) +{ +return true; +} + +if ( ( obj == null ) || !( obj instanceof FileModelSource ) ) Review comment: Compare with null not necessary since `null instanceof FileModelSource` is `false` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16693969#comment-16693969 ] ASF GitHub Bot commented on MNG-6261: - eolivelli commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r235222701 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,74 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import java.io.File; +import junit.framework.TestCase; +import static junit.framework.TestCase.assertFalse; +import static junit.framework.TestCase.assertTrue; +import org.apache.commons.lang3.SystemUtils; +import static org.junit.Assume.assumeTrue; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +/** + * + * @author fabiano Review comment: I think this comment should be fixed, removing the author and adding a minimal description This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16693970#comment-16693970 ] ASF GitHub Bot commented on MNG-6261: - eolivelli commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r235223001 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,74 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import java.io.File; +import junit.framework.TestCase; +import static junit.framework.TestCase.assertFalse; +import static junit.framework.TestCase.assertTrue; +import org.apache.commons.lang3.SystemUtils; +import static org.junit.Assume.assumeTrue; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +/** + * + * @author fabiano + */ +public class FileModelSourceTest +{ + +@Rule +public TemporaryFolder folder = new TemporaryFolder(); + +/** + * Test of equals method, of class FileModelSource. + */ +@Test +public void testEquals() +throws Exception +{ +File tempFile = File.createTempFile( "pomTest-", ".xml" ); Review comment: If you are using TemporaryFolder why are you using also File.createTempFile? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16692426#comment-16692426 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano commented on issue #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#issuecomment-440080853 > > > Looks also good according to https://builds.apache.org/job/maven-box/job/maven/job/MNG-6261/ > Can you add yourself as contributor to the pom.xml and squash the commits? Done. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16692244#comment-16692244 ] ASF GitHub Bot commented on MNG-6261: - rfscholte commented on issue #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#issuecomment-440035852 Looks also good according to https://builds.apache.org/job/maven-box/job/maven/job/MNG-6261/ Can you add yourself as contributor to the pom.xml and squash the commits? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16691137#comment-16691137 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r234469978 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,52 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.File; +import junit.framework.TestCase; + +/** + * + * @author fabiano + */ +public class FileModelSourceTest +extends TestCase +{ + +public FileModelSourceTest() { +} + +/** + * Test of equals method, of class FileModelSource. + */ +public void testEquals() +throws Exception +{ +File tempFile = File.createTempFile("pomTest-", ".xml"); +tempFile.deleteOnExit(); +FileModelSource instance = new FileModelSource( tempFile ); + +assertFalse( instance.equals( null ) ); +assertFalse( instance.equals( new Object() ) ); +assertTrue( instance.equals( instance ) ); +assertTrue( instance.equals( new FileModelSource( tempFile ) ) ); +} + Review comment: This seems simpler, thanks. I added the test case in the original unit test This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690972#comment-16690972 ] ASF GitHub Bot commented on MNG-6261: - rfscholte commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r234453641 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,52 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.File; +import junit.framework.TestCase; + +/** + * + * @author fabiano + */ +public class FileModelSourceTest +extends TestCase +{ + +public FileModelSourceTest() { +} + +/** + * Test of equals method, of class FileModelSource. + */ +public void testEquals() +throws Exception +{ +File tempFile = File.createTempFile("pomTest-", ".xml"); +tempFile.deleteOnExit(); +FileModelSource instance = new FileModelSource( tempFile ); + +assertFalse( instance.equals( null ) ); +assertFalse( instance.equals( new Object() ) ); +assertTrue( instance.equals( instance ) ); +assertTrue( instance.equals( new FileModelSource( tempFile ) ) ); +} + Review comment: Hmm, the original unittest was already very usefull. I would expected an extra testmethod in it, something like public void windowsPaths() throws Exception { assumeThat( SystemUtils.IS_OS_WINDOWS ); // here compare uppercase and lowercase paths } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690686#comment-16690686 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r234419551 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,52 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.File; +import junit.framework.TestCase; + +/** + * + * @author fabiano + */ +public class FileModelSourceTest +extends TestCase +{ + +public FileModelSourceTest() { +} + +/** + * Test of equals method, of class FileModelSource. + */ +public void testEquals() +throws Exception +{ +File tempFile = File.createTempFile("pomTest-", ".xml"); +tempFile.deleteOnExit(); +FileModelSource instance = new FileModelSource( tempFile ); + +assertFalse( instance.equals( null ) ); +assertFalse( instance.equals( new Object() ) ); +assertTrue( instance.equals( instance ) ); +assertTrue( instance.equals( new FileModelSource( tempFile ) ) ); +} + Review comment: I did a test case for windows path like you mention This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690684#comment-16690684 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r234419499 ## File path: maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java ## @@ -852,10 +852,11 @@ private ModelData readParent( Model childModel, ModelSource childSource, ModelBu File pomFile = parentData.getModel().getPomFile(); if ( pomFile != null ) { +FileModelSource pomFileModel = new FileModelSource( pomFile ); ModelSource expectedParentSource = getParentPomFile( childModel, childSource ); if ( expectedParentSource == null || ( expectedParentSource instanceof ModelSource2 -&& !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) ) ) +&& !pomFileModel.equals( expectedParentSource ) ) ) Review comment: changed This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690581#comment-16690581 ] Robert Scholte commented on MNG-6261: - Almost there. In this case the unittest should be good enough. An explicit IT could be nice but is not necessary here. > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690579#comment-16690579 ] ASF GitHub Bot commented on MNG-6261: - rfscholte commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r234410239 ## File path: maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java ## @@ -0,0 +1,52 @@ +package org.apache.maven.model.building; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.File; +import junit.framework.TestCase; + +/** + * + * @author fabiano + */ +public class FileModelSourceTest +extends TestCase +{ + +public FileModelSourceTest() { +} + +/** + * Test of equals method, of class FileModelSource. + */ +public void testEquals() +throws Exception +{ +File tempFile = File.createTempFile("pomTest-", ".xml"); +tempFile.deleteOnExit(); +FileModelSource instance = new FileModelSource( tempFile ); + +assertFalse( instance.equals( null ) ); +assertFalse( instance.equals( new Object() ) ); +assertTrue( instance.equals( instance ) ); +assertTrue( instance.equals( new FileModelSource( tempFile ) ) ); +} + Review comment: There's no test here that reflects MNG-6261, that is comparing files with a lowercase and uppercase (which should be the same on Windows). You can use Junit4 Annotations here if you like, makes it easier to do assumptions. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690578#comment-16690578 ] ASF GitHub Bot commented on MNG-6261: - rfscholte commented on a change in pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192#discussion_r234410160 ## File path: maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java ## @@ -852,10 +852,11 @@ private ModelData readParent( Model childModel, ModelSource childSource, ModelBu File pomFile = parentData.getModel().getPomFile(); if ( pomFile != null ) { +FileModelSource pomFileModel = new FileModelSource( pomFile ); ModelSource expectedParentSource = getParentPomFile( childModel, childSource ); if ( expectedParentSource == null || ( expectedParentSource instanceof ModelSource2 -&& !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) ) ) +&& !pomFileModel.equals( expectedParentSource ) ) ) Review comment: At first the comparison looked weird, i.e. comparing a Model with a Source. The comparison is good, just need to improve the name of the variables. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690569#comment-16690569 ] Fabiano Cipriano de Oliveira commented on MNG-6261: --- Robert I did the changes that you suggest in the PR. I verified that MNG-6503 is fixed with this patch too. Maybe a integration test to confirm this ? > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690568#comment-16690568 ] ASF GitHub Bot commented on MNG-6261: - fabcipriano opened a new pull request #192: [MNG-6261] - using java File api to compare URL: https://github.com/apache/maven/pull/192 Following this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[MNG-XXX] - Fixes bug in ApproximateQuantiles`, where you replace `MNG-XXX` with the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] You have run the [Core IT][core-its] successfully. If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). [core-its]: https://maven.apache.org/core-its/core-it-suite/ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570830#comment-16570830 ] Robert Scholte commented on MNG-6261: - I think the cleanest fix is to wrap pomFile in a {{FileModelSource}} and do an {{equals()}} with {{expectedParentSource}}. This also means that it is easy to unittest , verify all combinations of drive letters with FileModelSource.equals(). Hence I marked it as for-the-grabs. Now waiting for somebody to pick this up. > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16569572#comment-16569572 ] Dawid Weiss commented on MNG-6261: -- Thanks Robert. > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16569494#comment-16569494 ] Hudson commented on MNG-6261: - Build succeeded in Jenkins: Maven TLP » maven-remote-resources-plugin » MRRESOURCES-103 #23 See https://builds.apache.org/job/maven-box/job/maven-remote-resources-plugin/job/MRRESOURCES-103/23/ > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16569474#comment-16569474 ] Robert Scholte commented on MNG-6261: - Comparisson is done in org.apache.maven.model.building.DefaultModelBuilder.readParent(), and the following code now returns {{false}} when there's a difference between the drive letter: {code} else { /* * NOTE: This is a sanity check of the cache hit. If the cached parent POM was locally resolved, the * child's should point at that parent, too. If it doesn't, we ignore the cache and * resolve externally, to mimic the behavior if the cache didn't exist in the first place. Otherwise, * the cache would obscure a bad POM. */ File pomFile = parentData.getModel().getPomFile(); if ( pomFile != null ) { ModelSource expectedParentSource = getParentPomFile( childModel, childSource ); if ( expectedParentSource instanceof ModelSource2 && !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) ) { parentData = readParentExternally( childModel, request, problems ); } } } {code} > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Assignee: Robert Scholte >Priority: Minor > Labels: up-for-grabs > Fix For: 3.6.x-candidate > > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16521298#comment-16521298 ] Michael Osipov commented on MNG-6261: - The entire file handling needs to be changed for `Path`. > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104877#comment-16104877 ] Dawid Weiss commented on MNG-6261: -- One more comment - to get the 'different' drive letter on windows you have to sweat a bit (use {{/d}} switch to enforce full path change): {code} # switch to c drive (or a different drive) > c: # switch to lowercase d drive: > cd /d d:\ # switch to uppercase D drive: > cd /d D:\ {code} > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104866#comment-16104866 ] Dawid Weiss commented on MNG-6261: -- And I now know where the problem is. Try this, Robert: open up cmd and switch to another drive: {noformat} > d: {noformat} Note the drive's path should be case-sensitive (so lowercase in this example). I don't know how or why Windows does it, but if you type (the first time): {noformat} > D: {noformat} it'll be upper-case cwd. Now, try to run 'mvn validate' on the project I attached as the repro. In one of these windows the build will succeed, in the other it'll fail. The problem was fairly easy from there on. I noticed that the failing build attempts to resolve certain POMs that should have been in the build's reactor: {code} [DEBUG] Could not find metadata com.carrotsearch.lingo4g:lingo4g-public:1.6.0-SNAPSHOT/maven-metadata.xml in local (E:\bamboo-home-3\.m2\AGENT-2752517\repository) {code} this was odd (and not present in the successfull build). So I dug down and dumped some stack traces to see how this happens. Turns out the problem is this fragment in {{DefaultModelBuilder}}: {code} /* * NOTE: This is a sanity check of the cache hit. If the cached parent POM was locally resolved, the * child's should point at that parent, too. If it doesn't, we ignore the cache and * resolve externally, to mimic the behavior if the cache didn't exist in the first place. Otherwise, * the cache would obscure a bad POM. */ File pomFile = parentData.getModel().getPomFile(); if ( pomFile != null ) { ModelSource expectedParentSource = getParentPomFile( childModel, childSource ); if ( expectedParentSource instanceof ModelSource2 && !pomFile.toURI().equals( ( (ModelSource2) expectedParentSource ).getLocationURI() ) ) { parentData = readParentExternally( childModel, request, problems ); } } {code} Looks innocent, but those location URIs on Windows give me a false positive on the drive letter, for example: {code} file:/d:/_tmp/repro/lingo4g-public/pom.xml file:/D:/_tmp/repro/lingo4g-public/pom.xml {code} One of these is relative and is resolved using {{getAbsoluteFile}} which (I believe, didn't check) uses an upper-case drive letter. The other is resolved based on the cwd. The ideal solution and fix for this would be to use NIO2's utilities ({{Files.isSameFile}} for comparing {{Path}} instances. The filesystem provider knows whether the filesystem is case sensitive or not. But even with {{File}} instances resolving canonical File instances and using {{File.compareTo(File)}} would be a better solution than comparing URIs. A patch here is trivial (although exact solution is probably dependent on the variant chosen, as I mentioned), so I don't include a patch. > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Attachments: capture-6.png, repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > {noformat} > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > {noformat} > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MNG-6261) Relative parent POM resolution failing in 3.5.0 with complex multimodule builds
[ https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16103139#comment-16103139 ] Dawid Weiss commented on MNG-6261: -- An additional element of difficulty: the fail behavior is not deterministic with respect to where the project resides in the path. I have the same (identical) git repo in two different locations (drives on Windows) and one passes with 3.5.0, while the other fails. > Relative parent POM resolution failing in 3.5.0 with complex multimodule > builds > --- > > Key: MNG-6261 > URL: https://issues.apache.org/jira/browse/MNG-6261 > Project: Maven > Issue Type: Bug >Affects Versions: 3.5.0 >Reporter: Dawid Weiss >Priority: Minor > Attachments: repro.zip > > > In my effort to upgrade an existing (fairly complex) Maven build to Java > 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when > the project's modules are resolved: > > mvn validate > [FATAL] Non-resolvable parent POM for > com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find > artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and > 'parent.relativePath' points at wrong local POM @ line 5, column 11 > ... > (and many follow). > This build has a correct pom parent-structure (a tree), but is fairly complex > -- the submodule hierarchy is not aligned with parent-child pom hierarchy > (it's best to look at the repro code to understand how it's structured). > However, it's been working correctly with all prior Maven versions and I > wonder if it's a regression bug or maybe underspecified Maven requirement > (that should be enforced with a warning and not lead to this odd runtime > message). -- This message was sent by Atlassian JIRA (v6.4.14#64029)