[MNG-2199] Support version ranges in parent elements o Updated the ITs to correctly detect parent resolution failures. Maven does not fail the build when it cannot resolve a parent but instead logs a warning message. The ITs never checked the log to contain the warning messages but instead asserted the build to fail when a parent cannot be resolved. The only Maven version supporting parent version ranges is Maven 3.2.2 due to this. o Deprecated an incorrect test case for local parent resolution. Maven ignored the '<version>' in '<parent>' elements for local parent resolution. The core has been updated across various versions to eliminate any differences between local and remote parent resolution. When local parent resolution had been updated to match remote parent resolution, an existing IT started to fail testing incorrect behaviour. As soon as the '<parent>' is referenced using a version range, the '<version>' element in the project becomes mandatory and does no longer support using an expression any more. This has been that way for remote parent resolution from day one. It has never been supported to inherit a version from a parent when referencing that parent using a version range intentionally. o Updated to account for updated error messages.
Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/161fefad Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/161fefad Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/161fefad Branch: refs/heads/MNG-2199 Commit: 161fefad14748c4f8b4f16dc5ed097f1c5fa3f4c Parents: 7e5b365 Author: Christian Schulte <schu...@apache.org> Authored: Sat Dec 12 19:25:15 2015 +0100 Committer: Christian Schulte <schu...@apache.org> Committed: Wed Jan 25 23:21:02 2017 +0100 ---------------------------------------------------------------------- .../apache/maven/it/IntegrationTestSuite.java | 2 + ...mng2199DeprecatedParentVersionRangeTest.java | 65 +++++++ ...MavenITmng2199ParentVersionRange350Test.java | 187 +++++++++++++++++++ .../MavenITmng2199ParentVersionRangeTest.java | 90 ++++----- .../expression-local/child/pom.xml | 12 ++ .../expression-local/pom.xml | 10 + .../inherited-local/child/pom.xml | 11 ++ .../inherited-local/pom.xml | 10 + .../invalid-local/child/pom.xml | 12 ++ .../invalid-local/pom.xml | 10 + .../local-fallback-to-remote/child/pom.xml | 18 ++ .../local-fallback-to-remote/pom.xml | 8 + .../valid-local/child/pom.xml | 11 ++ .../valid-local/pom.xml | 10 + 14 files changed, 414 insertions(+), 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index 5536620..8006799 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -121,6 +121,8 @@ public class IntegrationTestSuite suite.addTestSuite( MavenITmng5663NestedImportScopePomResolutionTest.class ); suite.addTestSuite( MavenITmng2562Timestamp322Test.class ); suite.addTestSuite( MavenITmng2199ParentVersionRangeTest.class ); + suite.addTestSuite( MavenITmng2199ParentVersionRange350Test.class ); + suite.addTestSuite( MavenITmnv2199DeprecatedParentVersionRangeTest.class ); suite.addTestSuite( MavenITmng5640LifecycleParticipantAfterSessionEnd.class ); suite.addTestSuite( MavenITmng5639ImportScopePomResolutionTest.class ); suite.addTestSuite( MavenITmng5608ProfileActivationWarningTest.class ); http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199DeprecatedParentVersionRangeTest.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199DeprecatedParentVersionRangeTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199DeprecatedParentVersionRangeTest.java new file mode 100644 index 0000000..91dae0e --- /dev/null +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199DeprecatedParentVersionRangeTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2014 The Apache Software Foundation. + * + * Licensed 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. + */ +package org.apache.maven.it; + +import java.io.File; +import org.apache.maven.it.util.ResourceExtractor; + +public class MavenITmng2199DeprecatedParentVersionRangeTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng2199DeprecatedParentVersionRangeTest() + { + // Not sure about 3.2.2. That is the first version with support + // for remote parent version ranges. Local parent resolution hasn't + // changed in any way in that release and has been kept that way + // up to 3.3.4 then again reviewed in 3.3.6 and finally fixed + // in 3.5.0 to behave the same way remote parent resolution behaves. + super( "[3.2.2,3.5)" ); + } + + public void testBrokenProjectSilentlyProcessedUpToVerify() + throws Exception + { + // This test isn't actually testing anything version range related. + // The project this test is run with cannot be installed or deployed. + // The local parent resolution has been made consistent to the remote + // parent resolution as of 3.5. This leads to such broken projects + // from not being supported anymore. + Verifier verifier = null; + File testDir = ResourceExtractor.simpleExtractResources( getClass(), + "/mng-2199-parent-version-range/local-parent" ); + + try + { + verifier = newVerifier( testDir.getAbsolutePath(), "remote" ); + verifier.addCliOption( "-U" ); + verifier.setAutoclean( false ); + + verifier.executeGoal( "verify" ); + verifier.verifyErrorFreeLog(); + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + } + } + +} http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRange350Test.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRange350Test.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRange350Test.java new file mode 100644 index 0000000..b158632 --- /dev/null +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRange350Test.java @@ -0,0 +1,187 @@ +/* + * Copyright 2014 The Apache Software Foundation. + * + * Licensed 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. + */ +package org.apache.maven.it; + +import java.io.File; +import java.util.List; +import java.util.regex.Pattern; +import org.apache.maven.it.util.ResourceExtractor; + +public class MavenITmng2199ParentVersionRange350Test + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng2199ParentVersionRange350Test() + { + super( "[3.5.0,)" ); + } + + public void testValidLocalParentVersionRange() + throws Exception + { + Verifier verifier = null; + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/valid-local/child" ); + + try + { + verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.executeGoal( "verify" ); + verifier.verifyErrorFreeLog(); + + final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); + assertFalse( "Unxpected error message found.", + indexOf( lines, ".*Failed to build parent project.*" ) >= 0 ); + + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + } + } + + public void testInvalidLocalParentVersionRange() + throws Exception + { + // Fallback to remote resolution not tested here. Remote parent expected to not be available anywhere. + Verifier verifier = null; + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/invalid-local/child" ); + + try + { + verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.executeGoal( "verify" ); + verifier.verifyErrorFreeLog(); + + final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); + assertTrue( "Expected error message not found.", + indexOf( lines, ".*Failed to build parent project.*" ) >= 0 ); + + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + } + } + + public void testInvalidLocalParentVersionRangeFallingBackToRemote() + throws Exception + { + Verifier verifier = null; + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/local-fallback-to-remote/child" ); + + try + { + verifier = newVerifier( testDir.getAbsolutePath(), "remote" ); + verifier.executeGoal( "verify" ); + verifier.verifyErrorFreeLog(); + + final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); + assertFalse( "Unxpected error message found.", + indexOf( lines, ".*Failed to build parent project.*" ) >= 0 ); + + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + } + } + + public void testValidLocalParentVersionRangeInvalidVersionExpression() + throws Exception + { + Verifier verifier = null; + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/expression-local/child" ); + + try + { + verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.executeGoal( "verify" ); + fail( "Expected 'VerificationException' not thrown." ); + } + catch ( final VerificationException e ) + { + assertNotNull( verifier ); + final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); + int msg = indexOf( lines, ".*Version must be a constant.*org.apache.maven.its.mng2199:expression.*" ); + assertTrue( "Expected error message not found.", msg >= 0 ); + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + } + } + + public void testValidLocalParentVersionRangeInvalidVersionInheritance() + throws Exception + { + Verifier verifier = null; + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/inherited-local/child" ); + + try + { + verifier = newVerifier( testDir.getAbsolutePath() ); + verifier.executeGoal( "verify" ); + fail( "Expected 'VerificationException' not thrown." ); + } + catch ( final VerificationException e ) + { + assertNotNull( verifier ); + final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); + int msg = indexOf( lines, ".*Version must be a constant.*org.apache.maven.its.mng2199:inherited.*" ); + assertTrue( "Expected error message not found.", msg >= 0 ); + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + } + } + + private static int indexOf( final List<String> logLines, final String regex ) + { + final Pattern pattern = Pattern.compile( regex ); + + for ( int i = 0, l0 = logLines.size(); i < l0; i++ ) + { + if ( pattern.matcher( logLines.get( i ) ).matches() ) + { + return i; + } + } + + return -1; + } + +} http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRangeTest.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRangeTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRangeTest.java index 16ac91c..085ce56 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRangeTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2199ParentVersionRangeTest.java @@ -33,7 +33,9 @@ public class MavenITmng2199ParentVersionRangeTest throws Exception { Verifier verifier = null; - File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2199-parent-version-range/valid-inclusive-upper-bound" ); + File testDir = + ResourceExtractor.simpleExtractResources( getClass(), + "/mng-2199-parent-version-range/valid-inclusive-upper-bound" ); try { @@ -43,10 +45,18 @@ public class MavenITmng2199ParentVersionRangeTest verifier.executeGoal( "verify" ); verifier.verifyErrorFreeLog(); + + final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); + assertFalse( "Unxpected error message found.", + indexOf( lines, ".*Failed to build parent project.*" ) >= 0 ); + } finally { - verifier.resetStreams(); + if ( verifier != null ) + { + verifier.resetStreams(); + } } } @@ -54,7 +64,8 @@ public class MavenITmng2199ParentVersionRangeTest throws Exception { Verifier verifier = null; - File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2199-parent-version-range/valid-exclusive-upper-bound" ); + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/valid-exclusive-upper-bound" ); try { @@ -64,10 +75,18 @@ public class MavenITmng2199ParentVersionRangeTest verifier.executeGoal( "verify" ); verifier.verifyErrorFreeLog(); + + final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); + assertFalse( "Unxpected error message found.", + indexOf( lines, ".*Failed to build parent project.*" ) >= 0 ); + } finally { - verifier.resetStreams(); + if ( verifier != null ) + { + verifier.resetStreams(); + } } } @@ -87,13 +106,18 @@ public class MavenITmng2199ParentVersionRangeTest } catch ( final VerificationException e ) { + assertNotNull( verifier ); final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); - int msg = indexOf( lines, ".*The requested version range.*does not specify an upper bound.*" ); - assertTrue( "Expected error message not found.", msg >= 0 ); + assertTrue( "Expected error message not found.", + indexOf( lines, ".*(parent)? version range.*does not specify an upper bound.*" ) >= 0 ); + } finally { - verifier.resetStreams(); + if ( verifier != null ) + { + verifier.resetStreams(); + } } } @@ -101,8 +125,8 @@ public class MavenITmng2199ParentVersionRangeTest throws Exception { Verifier verifier = null; - File testDir = - ResourceExtractor.simpleExtractResources( getClass(), "/mng-2199-parent-version-range/expression" ); + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/expression" ); try { @@ -114,16 +138,17 @@ public class MavenITmng2199ParentVersionRangeTest } catch ( final VerificationException e ) { + assertNotNull( verifier ); final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); - int msg = - indexOf( lines, - ".*Version must be a constant @ org.apache.maven.its.mng2199:expression:\\$\\{project.parent.version\\}.*" ); - + int msg = indexOf( lines, ".*Version must be a constant.*org.apache.maven.its.mng2199:expression.*" ); assertTrue( "Expected error message not found.", msg >= 0 ); } finally { - verifier.resetStreams(); + if ( verifier != null ) + { + verifier.resetStreams(); + } } } @@ -131,8 +156,8 @@ public class MavenITmng2199ParentVersionRangeTest throws Exception { Verifier verifier = null; - File testDir = - ResourceExtractor.simpleExtractResources( getClass(), "/mng-2199-parent-version-range/inherited" ); + File testDir = ResourceExtractor.simpleExtractResources( + getClass(), "/mng-2199-parent-version-range/inherited" ); try { @@ -144,37 +169,17 @@ public class MavenITmng2199ParentVersionRangeTest } catch ( final VerificationException e ) { + assertNotNull( verifier ); final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false ); - int msg = - indexOf( lines, - ".*Version must be a constant @ org.apache.maven.its.mng2199:inherited:\\[unknown-version\\].*" ); - + int msg = indexOf( lines, ".*Version must be a constant.*org.apache.maven.its.mng2199:inherited.*" ); assertTrue( "Expected error message not found.", msg >= 0 ); } finally { - verifier.resetStreams(); - } - } - - public void testValidLocalParentVersionRange() - throws Exception - { - Verifier verifier = null; - File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2199-parent-version-range/local-parent" ); - - try - { - verifier = newVerifier( testDir.getAbsolutePath(), "remote" ); - verifier.addCliOption( "-U" ); - verifier.setAutoclean( false ); - - verifier.executeGoal( "verify" ); - verifier.verifyErrorFreeLog(); - } - finally - { - verifier.resetStreams(); + if ( verifier != null ) + { + verifier.resetStreams(); + } } } @@ -192,4 +197,5 @@ public class MavenITmng2199ParentVersionRangeTest return -1; } + } http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/child/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/child/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/child/pom.xml new file mode 100644 index 0000000..39a2210 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/child/pom.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <parent> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <version>[1,2]</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>expression</artifactId> + <!-- Must not use expressions, when using version ranges. --> + <version>${project.parent.version}</version> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/pom.xml new file mode 100644 index 0000000..dfa12d6 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/expression-local/pom.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <version>1</version> + <packaging>pom</packaging> + <name>Maven Integration Test :: MNG-2199 :: Invalid Local Version Expression</name> + <description>Verifies that the build fails when using a parent version range in combination with a version expression for local parent resolution.</description> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/child/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/child/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/child/pom.xml new file mode 100644 index 0000000..9d54edd --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/child/pom.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <parent> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <version>[1,2]</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>inherited</artifactId> + <!-- Must not inherit version, when using version ranges. --> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/pom.xml new file mode 100644 index 0000000..bcf66bf --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/inherited-local/pom.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <version>1</version> + <packaging>pom</packaging> + <name>Maven Integration Test :: MNG-2199 :: Invalid Local Version Inheritance</name> + <description>Verifies that the build fails when using a parent version range in combination with an inherited version.</description> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/child/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/child/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/child/pom.xml new file mode 100644 index 0000000..d9498d5 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/child/pom.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <parent> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <!-- Not available anywhere. Not on disk, not in repository. --> + <version>[2,3]</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>invalid</artifactId> + <version>1</version> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/pom.xml new file mode 100644 index 0000000..4e646fc --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/invalid-local/pom.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <version>1</version> + <packaging>pom</packaging> + <name>Maven Integration Test :: MNG-2199 :: Invalid Local Parent Version</name> + <description>Verifies that the build fails when using a parent version range not matching what is on disk (fallback to remote is not tested here - the parent does not exist anywhere but on disk).</description> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/child/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/child/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/child/pom.xml new file mode 100644 index 0000000..346df47 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/child/pom.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache</groupId> + <artifactId>apache</artifactId> + <!-- Not found on disk, but available remotely. --> + <version>[1,15)</version> + </parent> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>valid</artifactId> + <version>1</version> + <packaging>pom</packaging> + + <name>Maven Integration Test :: MNG-2199 :: Valid POM</name> + <description>Verifies that the build succeeds by falling back to remote parent resolution when the local parent does not mach the range.</description> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/pom.xml new file mode 100644 index 0000000..fa4eb52 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/local-fallback-to-remote/pom.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache</groupId> + <artifactId>apache</artifactId> + <version>DOES NOT EXIST</version> + <packaging>pom</packaging> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/child/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/child/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/child/pom.xml new file mode 100644 index 0000000..e61f908 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/child/pom.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <parent> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <version>[1,2]</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>valid</artifactId> + <version>3.4.5</version> +</project> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/161fefad/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/pom.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/pom.xml b/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/pom.xml new file mode 100644 index 0000000..559f3ae --- /dev/null +++ b/core-it-suite/src/test/resources/mng-2199-parent-version-range/valid-local/pom.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.its.mng2199</groupId> + <artifactId>local-parent</artifactId> + <version>1</version> + <packaging>pom</packaging> + <name>Maven Integration Test :: MNG-2199 :: Valid Local Parent Version Range</name> + <description>Verifies that the build succeeds when using a parent version range for local parent resolution.</description> +</project>