You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sc...@apache.org on 2017/02/04 02:46:35 UTC
[1/7] maven-integration-testing git commit: [MNG-6146] Several small
stylistic and spelling improvements to code and documentation [Forced
Update!]
Repository: maven-integration-testing
Updated Branches:
refs/heads/DEPMGMT-INCLUDE 88c15286d -> e83493fad (forced update)
[MNG-6146] Several small stylistic and spelling improvements to code and documentation
Use the proper term for char U+002D (-) hyphen(-minus) instead of dash
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/0bd43956
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/0bd43956
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/0bd43956
Branch: refs/heads/DEPMGMT-INCLUDE
Commit: 0bd439560d067dabf0a1cf39fd598b3115b450e9
Parents: 92a11a9
Author: Michael Osipov <mi...@apache.org>
Authored: Thu Feb 2 10:46:16 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Thu Feb 2 10:46:32 2017 +0100
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 2 +-
...enITmng3268MultipleDashPCommandLineTest.java | 63 --------------------
...ITmng3268MultipleHyphenPCommandLineTest.java | 63 ++++++++++++++++++++
.../MavenITmng3545ProfileDeactivationTest.java | 2 +-
4 files changed, 65 insertions(+), 65 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/0bd43956/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 a91eeb0..c9b5ace 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
@@ -499,7 +499,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng3284UsingCachedPluginsTest.class );
suite.addTestSuite( MavenITmng3271DefaultReportsSuppressionTest.class );
suite.addTestSuite( MavenITmng3221InfiniteForkingTest.class );
- suite.addTestSuite( MavenITmng3268MultipleDashPCommandLineTest.class );
+ suite.addTestSuite( MavenITmng3268MultipleHyphenPCommandLineTest.class );
suite.addTestSuite( MavenITmng3259DepsDroppedInMultiModuleBuildTest.class );
suite.addTestSuite( MavenITmng3220ImportScopeTest.class );
suite.addTestSuite( MavenITmng3217InterPluginDependencyTest.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/0bd43956/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleDashPCommandLineTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleDashPCommandLineTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleDashPCommandLineTest.java
deleted file mode 100644
index d97b33e..0000000
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleDashPCommandLineTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.apache.maven.it;
-
-/*
- * 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 org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.ResourceExtractor;
-
-import java.io.File;
-
-/**
- * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3268">MNG-3268</a>.
- *
- * @version $Id$
- */
-public class MavenITmng3268MultipleDashPCommandLineTest
- extends AbstractMavenIntegrationTestCase
-{
-
- public MavenITmng3268MultipleDashPCommandLineTest()
- {
- super( "(2.0.9,)" );
- }
-
- public void testMultipleProfileParams()
- throws Exception
- {
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3268" );
-
- Verifier verifier;
-
- verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
-
- verifier.addCliOption( "-Pprofile1,profile2" );
- verifier.addCliOption( "-Pprofile3" );
- verifier.addCliOption( "-P profile4" );
- verifier.executeGoal( "package" );
-
- verifier.verifyErrorFreeLog();
- verifier.assertFilePresent( "target/profile1/touch.txt" );
- verifier.assertFilePresent( "target/profile2/touch.txt" );
- verifier.assertFilePresent( "target/profile3/touch.txt" );
- verifier.assertFilePresent( "target/profile4/touch.txt" );
- verifier.resetStreams();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/0bd43956/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleHyphenPCommandLineTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleHyphenPCommandLineTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleHyphenPCommandLineTest.java
new file mode 100644
index 0000000..1237c1e
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3268MultipleHyphenPCommandLineTest.java
@@ -0,0 +1,63 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-3268">MNG-3268</a>.
+ *
+ * @version $Id$
+ */
+public class MavenITmng3268MultipleHyphenPCommandLineTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng3268MultipleDashPCommandLineTest()
+ {
+ super( "(2.0.9,)" );
+ }
+
+ public void testMultipleProfileParams()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3268" );
+
+ Verifier verifier;
+
+ verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
+
+ verifier.addCliOption( "-Pprofile1,profile2" );
+ verifier.addCliOption( "-Pprofile3" );
+ verifier.addCliOption( "-P profile4" );
+ verifier.executeGoal( "package" );
+
+ verifier.verifyErrorFreeLog();
+ verifier.assertFilePresent( "target/profile1/touch.txt" );
+ verifier.assertFilePresent( "target/profile2/touch.txt" );
+ verifier.assertFilePresent( "target/profile3/touch.txt" );
+ verifier.assertFilePresent( "target/profile4/touch.txt" );
+ verifier.resetStreams();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/0bd43956/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3545ProfileDeactivationTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3545ProfileDeactivationTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3545ProfileDeactivationTest.java
index 9317194..2b65780 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3545ProfileDeactivationTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3545ProfileDeactivationTest.java
@@ -68,7 +68,7 @@ public class MavenITmng3545ProfileDeactivationTest
* Test command line deactivation of active by default profiles.
*
*/
- public void testDeactivateDefaultProfilesDash()
+ public void testDeactivateDefaultProfilesHyphen()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3545" );
[2/7] maven-integration-testing git commit: [MNG-2199] Support
version ranges in parent elements
Posted by sc...@apache.org.
[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/6818c452
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/6818c452
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/6818c452
Branch: refs/heads/DEPMGMT-INCLUDE
Commit: 6818c45265834b3917a3d75edb918d07a73bacdb
Parents: 0bd4395
Author: Christian Schulte <sc...@apache.org>
Authored: Sat Dec 12 19:25:15 2015 +0100
Committer: Christian Schulte <sc...@apache.org>
Committed: Sat Feb 4 03:25:14 2017 +0100
----------------------------------------------------------------------
.../MavenITmng2199ParentVersionRangeTest.java | 247 +++++++++++++++++--
.../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 +
11 files changed, 335 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6818c452/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..2496d38 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
@@ -32,8 +32,11 @@ public class MavenITmng2199ParentVersionRangeTest
public void testValidParentVersionRangeWithInclusiveUpperBound()
throws Exception
{
+ failingMavenVersions( "(3.2.2,3.5.0)" );
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,18 +46,31 @@ public class MavenITmng2199ParentVersionRangeTest
verifier.executeGoal( "verify" );
verifier.verifyErrorFreeLog();
+
+ // All Maven versions not supporting remote parent version ranges will log a warning message whenever
+ // building a parent fails. The build succeeds without any parent. If that warning message appears in the
+ // log, parent resolution failed.
+ 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();
+ }
}
}
public void testValidParentVersionRangeWithExclusiveUpperBound()
throws Exception
{
+ failingMavenVersions( "(3.2.2,3.5.0)" );
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,14 +80,25 @@ public class MavenITmng2199ParentVersionRangeTest
verifier.executeGoal( "verify" );
verifier.verifyErrorFreeLog();
+
+ // All Maven versions not supporting remote parent version ranges will log a warning message whenever
+ // building a parent fails. The build succeeds without any parent. If that warning message appears in the
+ // log, parent resolution failed.
+ 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();
+ }
}
}
- public void testInvalidParentVersionRange()
+ public void testInvalidParentVersionRangeWithoutUpperBound()
throws Exception
{
Verifier verifier = null;
@@ -87,13 +114,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 +133,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 +146,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 +164,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,24 +177,186 @@ 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();
+ if ( verifier != null )
+ {
+ verifier.resetStreams();
+ }
}
}
public void testValidLocalParentVersionRange()
throws Exception
{
+ failingMavenVersions( "(,3.3.0),(3.3.9,3.5.0)" );
Verifier verifier = null;
- File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2199-parent-version-range/local-parent" );
+ File testDir = ResourceExtractor.simpleExtractResources(
+ getClass(), "/mng-2199-parent-version-range/valid-local/child" );
+
+ try
+ {
+ verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "verify" );
+ verifier.verifyErrorFreeLog();
+
+ // All Maven versions not supporting remote parent version ranges will log a warning message whenever
+ // building a parent fails. The build succeeds without any parent. If that warning message appears in the
+ // log, parent resolution failed. For this test, this really just tests the project on disk getting tested
+ // is not corrupt. It's expected to find the local parent and not fall back to remote resolution. If it
+ // falls back to remote resolution, this just catches the test project to be broken.
+ 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
+ {
+ failingMavenVersions( "[3.3.0,3.3.9)" );
+ // 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" );
+ 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,
+ ".*Non-resolvable parent POM org.apache.maven.its.mng2199:local-parent:\\[2,3\\].*" );
+ assertTrue( "Expected error message not found.", msg >= 0 );
+ }
+ finally
+ {
+ if ( verifier != null )
+ {
+ verifier.resetStreams();
+ }
+ }
+ }
+
+ public void testInvalidLocalParentVersionRangeFallingBackToRemote()
+ throws Exception
+ {
+ failingMavenVersions( "[3.3.9]" );
+ 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();
+
+ // All Maven versions not supporting remote parent version ranges will log a warning message whenever
+ // building a parent fails. The build succeeds without any parent. If that warning message appears in the
+ // log, parent resolution failed. For this test, local parent resolution falls back to remote parent
+ // resolution with a version range in use. If the warning message is in the logs, that remote parent
+ // resolution failed unexpectedly.
+ 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
+ {
+ failingMavenVersions( "(,3.3.0),[3.3.0,3.3.9],(3.3.9,3.5.0)" );
+ 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
+ {
+ failingMavenVersions( "(,3.3.0),[3.3.0,3.3.9],(3.3.9,3.5.0)" );
+ 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();
+ }
+ }
+ }
+
+ public void testBrokenProjectSilentlyProcessedUpToVerify()
+ throws Exception
+ {
+ failingMavenVersions( "(,3.3.0),(3.3.9,)" );
+ // This test isn't actually testing anything version range related.
+ Verifier verifier = null;
+ File testDir =
+ ResourceExtractor.simpleExtractResources( getClass(), "/mng-2199-parent-version-range/local-parent" );
try
{
@@ -174,7 +369,10 @@ public class MavenITmng2199ParentVersionRangeTest
}
finally
{
- verifier.resetStreams();
+ if ( verifier != null )
+ {
+ verifier.resetStreams();
+ }
}
}
@@ -192,4 +390,5 @@ public class MavenITmng2199ParentVersionRangeTest
return -1;
}
+
}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6818c452/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/6818c452/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/6818c452/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/6818c452/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/6818c452/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/6818c452/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/6818c452/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/6818c452/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/6818c452/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/6818c452/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>
[6/7] maven-integration-testing git commit: [MNG-5971] Imported
dependencies should be available to inheritance processing
Posted by sc...@apache.org.
[MNG-5971] Imported dependencies should be available to inheritance processing
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/9023e71b
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/9023e71b
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/9023e71b
Branch: refs/heads/DEPMGMT-INCLUDE
Commit: 9023e71ba5902443ce0f6b84efe7b37079d1add9
Parents: eb239c9
Author: Christian Schulte <sc...@apache.org>
Authored: Sat Feb 20 14:42:20 2016 +0100
Committer: Christian Schulte <sc...@apache.org>
Committed: Sat Feb 4 03:46:21 2017 +0100
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 1 +
...venITmng5971HierarchicalImportScopeTest.java | 204 +++++++++++++++++++
.../test/resources/mng-5971/conflict/pom.xml | 100 +++++++++
.../mng-5971/include-properties/1/2/3/4/pom.xml | 47 +++++
.../mng-5971/include-properties/1/2/3/pom.xml | 51 +++++
.../mng-5971/include-properties/1/2/pom.xml | 50 +++++
.../mng-5971/include-properties/1/pom.xml | 50 +++++
.../mng-5971/include-properties/pom.xml | 80 ++++++++
.../mng-5971/inheritance/1/2/3/pom.xml | 46 +++++
.../resources/mng-5971/inheritance/1/2/pom.xml | 49 +++++
.../resources/mng-5971/inheritance/1/pom.xml | 49 +++++
.../test/resources/mng-5971/inheritance/pom.xml | 79 +++++++
.../test/resources/mng-5971/override/pom.xml | 87 ++++++++
.../mng-5971/properties/1/2/3/4/pom.xml | 47 +++++
.../resources/mng-5971/properties/1/2/3/pom.xml | 51 +++++
.../resources/mng-5971/properties/1/2/pom.xml | 50 +++++
.../resources/mng-5971/properties/1/pom.xml | 50 +++++
.../test/resources/mng-5971/properties/pom.xml | 80 ++++++++
.../its/mng5971/dependency/0/dependency-0.jar | Bin 0 -> 341 bytes
.../its/mng5971/dependency/0/dependency-0.pom | 27 +++
.../its/mng5971/dependency/1/dependency-1.jar | Bin 0 -> 341 bytes
.../its/mng5971/dependency/1/dependency-1.pom | 27 +++
.../its/mng5971/dependency/2/dependency-2.jar | Bin 0 -> 341 bytes
.../its/mng5971/dependency/2/dependency-2.pom | 27 +++
.../its/mng5971/dependency/3/dependency-3.jar | Bin 0 -> 341 bytes
.../its/mng5971/dependency/3/dependency-3.pom | 27 +++
.../maven/its/mng5971/import/0/import-0.pom | 39 ++++
.../maven/its/mng5971/import/1/import-1.pom | 39 ++++
.../maven/its/mng5971/import/2/import-2.pom | 39 ++++
.../maven/its/mng5971/import/3/import-3.pom | 39 ++++
.../resources/mng-5971/settings-template.xml | 43 ++++
31 files changed, 1478 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/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 25b8906..0855d33 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
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng5971HierarchicalImportScopeTest.class );
suite.addTestSuite( MavenITmng5600DependencyManagementImportExclusionsTest.class );
suite.addTestSuite( MavenITmng5527DependencyManagementImportRelocationsTest.class );
suite.addTestSuite( MavenITmng4463DependencyManagementImportVersionRanges.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5971HierarchicalImportScopeTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5971HierarchicalImportScopeTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5971HierarchicalImportScopeTest.java
new file mode 100644
index 0000000..1bba9cd
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5971HierarchicalImportScopeTest.java
@@ -0,0 +1,204 @@
+package org.apache.maven.it;
+
+/*
+ * 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.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import org.apache.maven.it.util.ResourceExtractor;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * [MNG-5971] Imported dependencies should be available to inheritance processing.
+ *
+ * @author Christian Schulte
+ */
+public class MavenITmng5971HierarchicalImportScopeTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng5971HierarchicalImportScopeTest()
+ {
+ super( "[3.6.0,)" );
+ }
+
+ public void testInheritanceProcessing()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5971/inheritance" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final List<String> dependencies0 = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies0, "org.apache.maven.its.mng5971:dependency:jar:0" ) );
+
+ final List<String> dependencies1 = verifier.loadLines( "1/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies1, "org.apache.maven.its.mng5971:dependency:jar:1" ) );
+
+ final List<String> dependencies2 = verifier.loadLines( "1/2/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies2, "org.apache.maven.its.mng5971:dependency:jar:2" ) );
+
+ final List<String> dependencies3 = verifier.loadLines( "1/2/3/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies3, "org.apache.maven.its.mng5971:dependency:jar:3" ) );
+ }
+
+ public void testOverrideProcessing()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5971/override" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final List<String> dependencies = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies, "org.apache.maven.its.mng5971:dependency:jar:3" ) );
+ }
+
+ public void testConflictResolution()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5971/conflict" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final List<String> dependencies = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies, "org.apache.maven.its.mng5971:dependency:jar:3" ) );
+ }
+
+ public void testInheritanceProcessingWithProjectBasedProperties()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5971/properties" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final List<String> dependencies0 = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies0, "org.apache.maven.its.mng5971:dependency:jar:0" ) );
+
+ final List<String> dependencies1 = verifier.loadLines( "1/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies1, "org.apache.maven.its.mng5971:dependency:jar:1" ) );
+
+ final List<String> dependencies2 = verifier.loadLines( "1/2/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies2, "org.apache.maven.its.mng5971:dependency:jar:2" ) );
+
+ final List<String> dependencies3 = verifier.loadLines( "1/2/3/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies3, "org.apache.maven.its.mng5971:dependency:jar:3" ) );
+
+ final List<String> dependencies4 = verifier.loadLines( "1/2/3/4/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies4, "org.apache.maven.its.mng5971:dependency:jar:3" ) );
+ }
+
+ public void testIncludeInheritanceProcessingWithProjectBasedProperties()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5971/include-properties" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final List<String> dependencies0 = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies0, "org.apache.maven.its.mng5971:dependency:jar:0" ) );
+
+ final List<String> dependencies1 = verifier.loadLines( "1/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies1, "org.apache.maven.its.mng5971:dependency:jar:1" ) );
+
+ final List<String> dependencies2 = verifier.loadLines( "1/2/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies2, "org.apache.maven.its.mng5971:dependency:jar:2" ) );
+
+ final List<String> dependencies3 = verifier.loadLines( "1/2/3/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies3, "org.apache.maven.its.mng5971:dependency:jar:3" ) );
+
+ final List<String> dependencies4 = verifier.loadLines( "1/2/3/4/target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies4, "org.apache.maven.its.mng5971:dependency:jar:3" ) );
+ }
+
+ private static boolean contains( final List<String> lines, final String pattern )
+ {
+ for ( int i = 0, l0 = lines.size(); i < l0; i++ )
+ {
+ if ( lines.get( i ).contains( pattern ) )
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/conflict/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/conflict/pom.xml b/core-it-suite/src/test/resources/mng-5971/conflict/pom.xml
new file mode 100644
index 0000000..9df2c7d
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/conflict/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>20160220</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-5971</name>
+
+ <description>
+ Tests that imported dependencies will be overridden based on a first declaration wins strategy.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <!--
+ First declaration wins.
+ -->
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>3</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>2</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>1</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/4/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/4/pom.xml b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/4/pom.xml
new file mode 100644
index 0000000..50b7175
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/4/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>3</artifactId>
+ <version>3</version>
+ </parent>
+
+ <artifactId>4</artifactId>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <!-- Test for version inheritance. -->
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>include</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/pom.xml b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/pom.xml
new file mode 100644
index 0000000..42bccc8
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/3/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>2</artifactId>
+ <version>2</version>
+ </parent>
+
+ <artifactId>3</artifactId>
+ <version>3</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>include</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>4</module>
+ </modules>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/pom.xml b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/pom.xml
new file mode 100644
index 0000000..5b35e3a
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/include-properties/1/2/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>1</artifactId>
+ <version>1</version>
+ </parent>
+
+ <artifactId>2</artifactId>
+ <version>2</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>include</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>3</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/include-properties/1/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/include-properties/1/pom.xml b/core-it-suite/src/test/resources/mng-5971/include-properties/1/pom.xml
new file mode 100644
index 0000000..1f8f1a5
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/include-properties/1/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>0</version>
+ </parent>
+
+ <artifactId>1</artifactId>
+ <version>1</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>include</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>2</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/include-properties/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/include-properties/pom.xml b/core-it-suite/src/test/resources/mng-5971/include-properties/pom.xml
new file mode 100644
index 0000000..647cf5c
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/include-properties/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-5971</name>
+
+ <description>
+ Multi module project using dependency management include at each child level testing import are performed on each
+ level and overriden correctly when using inherited ${project.groupId} and ${project.version} expressions in
+ dependency management import declarations.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>dependency</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ </dependency>
+ </dependencies>
+
+ <modules>
+ <module>1</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/3/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/3/pom.xml b/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/3/pom.xml
new file mode 100644
index 0000000..d0bcbd9
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/3/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>2</artifactId>
+ <version>20160220</version>
+ </parent>
+
+ <artifactId>3</artifactId>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>3</version>
+ <type>pom</type>
+ <scope>include</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/pom.xml b/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/pom.xml
new file mode 100644
index 0000000..4797c68
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/inheritance/1/2/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>1</artifactId>
+ <version>20160220</version>
+ </parent>
+
+ <artifactId>2</artifactId>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>2</version>
+ <type>pom</type>
+ <scope>include</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>3</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/inheritance/1/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/inheritance/1/pom.xml b/core-it-suite/src/test/resources/mng-5971/inheritance/1/pom.xml
new file mode 100644
index 0000000..c7e3f9c
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/inheritance/1/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>20160220</version>
+ </parent>
+
+ <artifactId>1</artifactId>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>1</version>
+ <type>pom</type>
+ <scope>include</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>2</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/inheritance/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/inheritance/pom.xml b/core-it-suite/src/test/resources/mng-5971/inheritance/pom.xml
new file mode 100644
index 0000000..2614416
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/inheritance/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>20160220</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-5971</name>
+
+ <description>
+ Multi module project using dependency management import at each child level testing import are performed on each
+ level and overriden correctly.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>0</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ </dependency>
+ </dependencies>
+
+ <modules>
+ <module>1</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/override/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/override/pom.xml b/core-it-suite/src/test/resources/mng-5971/override/pom.xml
new file mode 100644
index 0000000..fc5fb4c
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/override/pom.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>20160220</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-5971</name>
+
+ <description>
+ Tests that imported dependencies will be overridden based on a first declaration wins strategy.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <!--
+ Imports the same dependency as below with a different version.
+ -->
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <!--
+ Direct declaration overrides what gets imported.
+ -->
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>3</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/4/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/4/pom.xml b/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/4/pom.xml
new file mode 100644
index 0000000..c60f6d0
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/4/pom.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>3</artifactId>
+ <version>3</version>
+ </parent>
+
+ <artifactId>4</artifactId>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <!-- Test for version inheritance. -->
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/pom.xml b/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/pom.xml
new file mode 100644
index 0000000..501f191
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/properties/1/2/3/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>2</artifactId>
+ <version>2</version>
+ </parent>
+
+ <artifactId>3</artifactId>
+ <version>3</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>4</module>
+ </modules>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/properties/1/2/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/properties/1/2/pom.xml b/core-it-suite/src/test/resources/mng-5971/properties/1/2/pom.xml
new file mode 100644
index 0000000..5e0b727
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/properties/1/2/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>1</artifactId>
+ <version>1</version>
+ </parent>
+
+ <artifactId>2</artifactId>
+ <version>2</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>3</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/properties/1/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/properties/1/pom.xml b/core-it-suite/src/test/resources/mng-5971/properties/1/pom.xml
new file mode 100644
index 0000000..e374e88
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/properties/1/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>0</version>
+ </parent>
+
+ <artifactId>1</artifactId>
+ <version>1</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>import</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>2</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/properties/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/properties/pom.xml b/core-it-suite/src/test/resources/mng-5971/properties/pom.xml
new file mode 100644
index 0000000..02f870e
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/properties/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>0</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-5971</name>
+
+ <description>
+ Multi module project using dependency management import at each child level testing import are performed on each
+ level and overriden correctly when using inherited ${project.groupId} and ${project.version} expressions in
+ dependency management import declarations.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>dependency</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ </dependency>
+ </dependencies>
+
+ <modules>
+ <module>1</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.jar
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.jar b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.jar
new file mode 100644
index 0000000..2f64208
Binary files /dev/null and b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.jar differ
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.pom
new file mode 100644
index 0000000..b9829ba
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/0/dependency-0.pom
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>0</version>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.jar
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.jar b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.jar
new file mode 100644
index 0000000..2f64208
Binary files /dev/null and b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.jar differ
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.pom
new file mode 100644
index 0000000..52e7cc3
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/1/dependency-1.pom
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>1</version>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.jar
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.jar b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.jar
new file mode 100644
index 0000000..2f64208
Binary files /dev/null and b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.jar differ
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.pom
new file mode 100644
index 0000000..ce89297
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/2/dependency-2.pom
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>2</version>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.jar
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.jar b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.jar
new file mode 100644
index 0000000..2f64208
Binary files /dev/null and b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.jar differ
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.pom
new file mode 100644
index 0000000..1ef1418
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/dependency/3/dependency-3.pom
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>3</version>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/0/import-0.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/0/import-0.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/0/import-0.pom
new file mode 100644
index 0000000..d0ff23f
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/0/import-0.pom
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>0</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/1/import-1.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/1/import-1.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/1/import-1.pom
new file mode 100644
index 0000000..7b6ddb5
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/1/import-1.pom
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>1</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/2/import-2.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/2/import-2.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/2/import-2.pom
new file mode 100644
index 0000000..4938b9f
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/2/import-2.pom
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>2</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>2</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/3/import-3.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/3/import-3.pom b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/3/import-3.pom
new file mode 100644
index 0000000..fa68b02
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/repo/org/apache/maven/its/mng5971/import/3/import-3.pom
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>import</artifactId>
+ <version>3</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5971</groupId>
+ <artifactId>dependency</artifactId>
+ <version>3</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/9023e71b/core-it-suite/src/test/resources/mng-5971/settings-template.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5971/settings-template.xml b/core-it-suite/src/test/resources/mng-5971/settings-template.xml
new file mode 100644
index 0000000..f22a7f3
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5971/settings-template.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>maven-core-it-repo</id>
+ <repositories>
+ <repository>
+ <id>maven-core-it</id>
+ <url>@baseurl@/../repo</url>
+ <releases>
+ <checksumPolicy>ignore</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+ </profiles>
+ <activeProfiles>
+ <activeProfile>maven-core-it-repo</activeProfile>
+ </activeProfiles>
+</settings>
[5/7] maven-integration-testing git commit: [MNG-4463] Dependency
management import should support version ranges.
Posted by sc...@apache.org.
[MNG-4463] Dependency management import should support version ranges.
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/6b7715a1
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/6b7715a1
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/6b7715a1
Branch: refs/heads/DEPMGMT-INCLUDE
Commit: 6b7715a12ca90a57c8c5ef79ac7592f6662a6816
Parents: 6818c45
Author: Christian Schulte <sc...@apache.org>
Authored: Sat Jan 30 20:21:33 2016 +0100
Committer: Christian Schulte <sc...@apache.org>
Committed: Sat Feb 4 03:45:49 2017 +0100
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 1 +
...DependencyManagementImportVersionRanges.java | 108 +++++++++++++++++++
.../mng-4463/exclusive-upper-bound/pom.xml | 76 +++++++++++++
.../mng-4463/inclusive-upper-bound/pom.xml | 76 +++++++++++++
.../resources/mng-4463/no-upper-bound/pom.xml | 54 ++++++++++
5 files changed, 315 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6b7715a1/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 c9b5ace..c1961ce 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
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng4463DependencyManagementImportVersionRanges.class );
suite.addTestSuite( MavenITmng5958LifecyclePhaseBinaryCompat.class );
suite.addTestSuite( MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.class );
suite.addTestSuite( MavenITmng5840ParentVersionRanges.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6b7715a1/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4463DependencyManagementImportVersionRanges.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4463DependencyManagementImportVersionRanges.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4463DependencyManagementImportVersionRanges.java
new file mode 100644
index 0000000..84c573c
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4463DependencyManagementImportVersionRanges.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2016 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;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Integration tests for <a href="https://issues.apache.org/jira/browse/MNG-4463">MNG-4463</a>.
+ *
+ * @author Christian Schulte
+ */
+public class MavenITmng4463DependencyManagementImportVersionRanges
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng4463DependencyManagementImportVersionRanges()
+ {
+ super( "[3.5.1,)" );
+ }
+
+ public void testInclusiveUpperBoundResolvesToHighestVersion()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4463/inclusive-upper-bound" );
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final List<String> artifacts = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( artifacts.toString(), artifacts.contains( "org.apache.maven:maven-plugin-api:jar:3.0" ) );
+ }
+
+ public void testExclusiveUpperBoundResolvesToHighestVersion()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4463/exclusive-upper-bound" );
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ List<String> artifacts = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( artifacts.toString(), artifacts.contains( "org.apache.maven:maven-plugin-api:jar:3.0" ) );
+ }
+
+ public void testFailureWithoutUpperBound()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4463/no-upper-bound" );
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
+
+ try
+ {
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.executeGoal( "validate" );
+ fail( "Expected 'VerificationException' not thrown." );
+ }
+ catch ( final VerificationException e )
+ {
+ final List<String> lines = verifier.loadFile( new File( testDir, "log.txt" ), false );
+ assertTrue( "Expected error message not found.",
+ indexOf( lines, ".*dependency version range.*does not specify an upper bound.*" ) >= 0 );
+ }
+ finally
+ {
+ 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/6b7715a1/core-it-suite/src/test/resources/mng-4463/exclusive-upper-bound/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-4463/exclusive-upper-bound/pom.xml b/core-it-suite/src/test/resources/mng-4463/exclusive-upper-bound/pom.xml
new file mode 100644
index 0000000..54404ac
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-4463/exclusive-upper-bound/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng4463</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-4463</name>
+ <description>
+ Tests that importing dependency management using version ranges
+ with exclusive upper bound resolves to the highest version.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven</artifactId>
+ <version>(,3.0.1)</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6b7715a1/core-it-suite/src/test/resources/mng-4463/inclusive-upper-bound/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-4463/inclusive-upper-bound/pom.xml b/core-it-suite/src/test/resources/mng-4463/inclusive-upper-bound/pom.xml
new file mode 100644
index 0000000..0e91b01
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-4463/inclusive-upper-bound/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng4463</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-4463</name>
+ <description>
+ Tests that importing dependency management using version ranges
+ with inclusive upper bound resolves to the highest version.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven</artifactId>
+ <version>(,3.0]</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6b7715a1/core-it-suite/src/test/resources/mng-4463/no-upper-bound/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-4463/no-upper-bound/pom.xml b/core-it-suite/src/test/resources/mng-4463/no-upper-bound/pom.xml
new file mode 100644
index 0000000..53ec4e3
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-4463/no-upper-bound/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng4463</groupId>
+ <artifactId>test</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-4463</name>
+ <description>
+ Tests that importing dependency management using version ranges
+ without upper bound fails.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven</artifactId>
+ <version>(3.0,)</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ </dependency>
+ </dependencies>
+</project>
[4/7] maven-integration-testing git commit: [MNG-5527] Dependency
management import should support relocations.
Posted by sc...@apache.org.
[MNG-5527] Dependency management import should support relocations.
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/f8df4167
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/f8df4167
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/f8df4167
Branch: refs/heads/DEPMGMT-INCLUDE
Commit: f8df4167f7d1c5827143d4c06ade4446fd932f0c
Parents: 6b7715a
Author: Christian Schulte <sc...@apache.org>
Authored: Wed Jun 22 17:41:42 2016 +0200
Committer: Christian Schulte <sc...@apache.org>
Committed: Sat Feb 4 03:45:49 2017 +0100
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 1 +
...pendencyManagementImportRelocationsTest.java | 74 ++++++++++++++++++++
.../test/resources/mng-5527/relocations/pom.xml | 72 +++++++++++++++++++
.../its/mng5527/relocated1/bom/0/bom-0.pom | 48 +++++++++++++
.../its/mng5527/relocated2/bom/0/bom-0.pom | 48 +++++++++++++
.../its/mng5527/relocated3/bom/0/bom-0.pom | 39 +++++++++++
.../resources/mng-5527/settings-template.xml | 43 ++++++++++++
7 files changed, 325 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/f8df4167/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 c1961ce..1e741c4 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
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng5527DependencyManagementImportRelocationsTest.class );
suite.addTestSuite( MavenITmng4463DependencyManagementImportVersionRanges.class );
suite.addTestSuite( MavenITmng5958LifecyclePhaseBinaryCompat.class );
suite.addTestSuite( MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/f8df4167/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5527DependencyManagementImportRelocationsTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5527DependencyManagementImportRelocationsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5527DependencyManagementImportRelocationsTest.java
new file mode 100644
index 0000000..aac31d3
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5527DependencyManagementImportRelocationsTest.java
@@ -0,0 +1,74 @@
+package org.apache.maven.it;
+
+/*
+ * 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.util.Arrays;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+import static junit.framework.Assert.assertEquals;
+
+/**
+ * [MNG-5527] Dependency management import should support relocations.
+ *
+ * @author Christian Schulte
+ */
+public class MavenITmng5527DependencyManagementImportRelocationsTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng5527DependencyManagementImportRelocationsTest()
+ {
+ super( "[3.5.1,)" );
+ }
+
+ public void testCanRelocateDependencyManagementImport()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5527/relocations" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ verifier.verifyTextInLog( "LEVEL_1" );
+ verifier.verifyTextInLog( "LEVEL_2" );
+
+ final Properties properties = verifier.loadProperties( "target/project.properties" );
+ assertEquals( "1", properties.getProperty( "project.dependencyManagement.dependencies" ) );
+ assertEquals( "group-id-to-import:artifact-id-to-import:jar",
+ properties.getProperty( "project.dependencyManagement.dependencies.0.managementKey" ) );
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/f8df4167/core-it-suite/src/test/resources/mng-5527/relocations/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5527/relocations/pom.xml b/core-it-suite/src/test/resources/mng-5527/relocations/pom.xml
new file mode 100644
index 0000000..822f1cf
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5527/relocations/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5527</groupId>
+ <artifactId>0</artifactId>
+ <version>2016062</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-5527</name>
+
+ <description>
+ Tests that dependency management import relocations are supported.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5527.relocated1</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-expression</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>eval</goal>
+ </goals>
+ <configuration>
+ <expressions>
+ <expression>project/dependencyManagement</expression>
+ </expressions>
+ <outputFile>${project.build.directory}/project.properties</outputFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/f8df4167/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated1/bom/0/bom-0.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated1/bom/0/bom-0.pom b/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated1/bom/0/bom-0.pom
new file mode 100644
index 0000000..9fd2234
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated1/bom/0/bom-0.pom
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5527.relocated1</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>level1-group-id-must-not-be-imported</groupId>
+ <artifactId>level1-artifact-id-must-not-be-imported</artifactId>
+ <version>level1-version-must-not-be-imported</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <distributionManagement>
+ <relocation>
+ <groupId>org.apache.maven.its.mng5527.relocated2</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <message>LEVEL_1</message>
+ </relocation>
+ </distributionManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/f8df4167/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated2/bom/0/bom-0.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated2/bom/0/bom-0.pom b/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated2/bom/0/bom-0.pom
new file mode 100644
index 0000000..cc5aa27
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated2/bom/0/bom-0.pom
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5527.relocated2</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>level2-group-id-must-not-be-imported</groupId>
+ <artifactId>level2-artifact-id-must-not-be-imported</artifactId>
+ <version>level2-version-must-not-be-imported</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <distributionManagement>
+ <relocation>
+ <groupId>org.apache.maven.its.mng5527.relocated3</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <message>LEVEL_2</message>
+ </relocation>
+ </distributionManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/f8df4167/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated3/bom/0/bom-0.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated3/bom/0/bom-0.pom b/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated3/bom/0/bom-0.pom
new file mode 100644
index 0000000..35c729e
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5527/repo/org/apache/maven/its/mng5527/relocated3/bom/0/bom-0.pom
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5527.relocated3</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>group-id-to-import</groupId>
+ <artifactId>artifact-id-to-import</artifactId>
+ <version>version-to-import</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/f8df4167/core-it-suite/src/test/resources/mng-5527/settings-template.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5527/settings-template.xml b/core-it-suite/src/test/resources/mng-5527/settings-template.xml
new file mode 100644
index 0000000..f22a7f3
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5527/settings-template.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>maven-core-it-repo</id>
+ <repositories>
+ <repository>
+ <id>maven-core-it</id>
+ <url>@baseurl@/../repo</url>
+ <releases>
+ <checksumPolicy>ignore</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+ </profiles>
+ <activeProfiles>
+ <activeProfile>maven-core-it-repo</activeProfile>
+ </activeProfiles>
+</settings>
[3/7] maven-integration-testing git commit: [MNG-5600] Dependency
management import should support exclusions.
Posted by sc...@apache.org.
[MNG-5600] Dependency management import should support exclusions.
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/eb239c98
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/eb239c98
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/eb239c98
Branch: refs/heads/DEPMGMT-INCLUDE
Commit: eb239c989f86278b13b6da7aab28569a89d2bd40
Parents: f8df416
Author: Christian Schulte <sc...@apache.org>
Authored: Sun Jun 19 17:18:51 2016 +0200
Committer: Christian Schulte <sc...@apache.org>
Committed: Sat Feb 4 03:45:49 2017 +0100
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 1 +
...ependencyManagementImportExclusionsTest.java | 82 +++++++++++++++++++
.../test/resources/mng-5600/exclusions/pom.xml | 84 ++++++++++++++++++++
.../apache/maven/its/mng5600/bom/0/bom-0.pom | 44 ++++++++++
.../resources/mng-5600/settings-template.xml | 43 ++++++++++
5 files changed, 254 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/eb239c98/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 1e741c4..25b8906 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
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng5600DependencyManagementImportExclusionsTest.class );
suite.addTestSuite( MavenITmng5527DependencyManagementImportRelocationsTest.class );
suite.addTestSuite( MavenITmng4463DependencyManagementImportVersionRanges.class );
suite.addTestSuite( MavenITmng5958LifecyclePhaseBinaryCompat.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/eb239c98/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5600DependencyManagementImportExclusionsTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5600DependencyManagementImportExclusionsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5600DependencyManagementImportExclusionsTest.java
new file mode 100644
index 0000000..fc2ef63
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5600DependencyManagementImportExclusionsTest.java
@@ -0,0 +1,82 @@
+package org.apache.maven.it;
+
+/*
+ * 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.util.Arrays;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+import static junit.framework.Assert.assertEquals;
+
+/**
+ * [MNG-5600] Dependency management import should support exclusions.
+ *
+ * @author Christian Schulte
+ */
+public class MavenITmng5600DependencyManagementImportExclusionsTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng5600DependencyManagementImportExclusionsTest()
+ {
+ super( "[3.5.1,)" );
+ }
+
+ public void testCanExcludeDependenciesFromImport()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5600/exclusions" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "../settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final Properties properties = verifier.loadProperties( "target/project.properties" );
+ assertEquals( "1", properties.getProperty( "project.dependencyManagement.dependencies" ) );
+ assertEquals( "commons-lang:commons-lang:jar",
+ properties.getProperty( "project.dependencyManagement.dependencies.0.managementKey" ) );
+
+ assertEquals( "2", properties.getProperty( "project.dependencyManagement.dependencies.0.exclusions" ) );
+ assertEquals( "commons-io",
+ properties.getProperty( "project.dependencyManagement.dependencies.0.exclusions.0.groupId" ) );
+
+ assertEquals( "commons-io",
+ properties.getProperty( "project.dependencyManagement.dependencies.0.exclusions.0.artifactId" ) );
+
+ assertEquals( "commons-logging",
+ properties.getProperty( "project.dependencyManagement.dependencies.0.exclusions.1.groupId" ) );
+
+ assertEquals( "commons-logging",
+ properties.getProperty( "project.dependencyManagement.dependencies.0.exclusions.1.artifactId" ) );
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/eb239c98/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml b/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml
new file mode 100644
index 0000000..dc06836
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5600</groupId>
+ <artifactId>0</artifactId>
+ <version>20160619</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-5600</name>
+
+ <description>
+ Tests that dependency management import exclusions are supported.
+ </description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5600</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ <exclusions>
+ <exclusion>
+ <!-- Exclude commons-io from BOM and from all imported dependencies. -->
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ <exclusion>
+ <!-- Exclude commons-logging from all imported dependencies. -->
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-expression</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>eval</goal>
+ </goals>
+ <configuration>
+ <expressions>
+ <expression>project/dependencyManagement</expression>
+ </expressions>
+ <outputFile>${project.build.directory}/project.properties</outputFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/eb239c98/core-it-suite/src/test/resources/mng-5600/repo/org/apache/maven/its/mng5600/bom/0/bom-0.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5600/repo/org/apache/maven/its/mng5600/bom/0/bom-0.pom b/core-it-suite/src/test/resources/mng-5600/repo/org/apache/maven/its/mng5600/bom/0/bom-0.pom
new file mode 100644
index 0000000..6598212
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5600/repo/org/apache/maven/its/mng5600/bom/0/bom-0.pom
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng5600</groupId>
+ <artifactId>bom</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/eb239c98/core-it-suite/src/test/resources/mng-5600/settings-template.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5600/settings-template.xml b/core-it-suite/src/test/resources/mng-5600/settings-template.xml
new file mode 100644
index 0000000..f22a7f3
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5600/settings-template.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>maven-core-it-repo</id>
+ <repositories>
+ <repository>
+ <id>maven-core-it</id>
+ <url>@baseurl@/../repo</url>
+ <releases>
+ <checksumPolicy>ignore</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+ </profiles>
+ <activeProfiles>
+ <activeProfile>maven-core-it-repo</activeProfile>
+ </activeProfiles>
+</settings>
[7/7] maven-integration-testing git commit: [MNG-6079] 3.4
regression: cannot override version of a dependencyManagement in a submodule
any more
Posted by sc...@apache.org.
[MNG-6079] 3.4 regression: cannot override version of a dependencyManagement in a submodule any more
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/e83493fa
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/e83493fa
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/e83493fa
Branch: refs/heads/DEPMGMT-INCLUDE
Commit: e83493fad35cae41f6467f78dd1f2bf159e2ff7e
Parents: 9023e71
Author: Christian Schulte <sc...@apache.org>
Authored: Sat Aug 13 02:04:02 2016 +0200
Committer: Christian Schulte <sc...@apache.org>
Committed: Sat Feb 4 03:46:21 2017 +0100
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 1 +
...ndencyManagementImportInterpolationTest.java | 81 ++++++++++++++++++++
.../src/test/resources/mng-6079/parent-pom.xml | 49 ++++++++++++
.../src/test/resources/mng-6079/pom.xml | 69 +++++++++++++++++
.../resources/mng-6079/settings-template.xml | 43 +++++++++++
5 files changed, 243 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/e83493fa/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 0855d33..ea34bf3 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
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng6079DependencyManagementImportInterpolationTest.class );
suite.addTestSuite( MavenITmng5971HierarchicalImportScopeTest.class );
suite.addTestSuite( MavenITmng5600DependencyManagementImportExclusionsTest.class );
suite.addTestSuite( MavenITmng5527DependencyManagementImportRelocationsTest.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/e83493fa/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolationTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolationTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolationTest.java
new file mode 100644
index 0000000..21ca3e4
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolationTest.java
@@ -0,0 +1,81 @@
+package org.apache.maven.it;
+
+/*
+ * 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.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * [MNG-6079] 3.4 regression: cannot override version of a dependencyManagement in a submodule any more
+ *
+ * @author Christian Schulte
+ */
+public class MavenITmng6079DependencyManagementImportInterpolationTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng6079DependencyManagementImportInterpolationTest()
+ {
+ super( "[2.0.9,)" );
+ }
+
+ public void testInheritanceProcessing()
+ throws Exception
+ {
+ final File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6079" );
+
+ final Verifier verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
+ verifier.setAutoclean( false );
+ verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8",
+ (Map) verifier.newDefaultFilterProperties() );
+
+ verifier.addCliOption( "-s" );
+ verifier.addCliOption( "settings.xml" );
+ verifier.executeGoals( Arrays.asList( new String[]
+ {
+ "clean", "verify"
+ } ) );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ final List<String> dependencies0 = verifier.loadLines( "target/compile.txt", "UTF-8" );
+ assertTrue( contains( dependencies0, "org.apache.maven.surefire:surefire-api:jar:2.12" ) );
+ }
+
+ private static boolean contains( final List<String> lines, final String pattern )
+ {
+ for ( int i = 0, l0 = lines.size(); i < l0; i++ )
+ {
+ if ( lines.get( i ).contains( pattern ) )
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/e83493fa/core-it-suite/src/test/resources/mng-6079/parent-pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-6079/parent-pom.xml b/core-it-suite/src/test/resources/mng-6079/parent-pom.xml
new file mode 100644
index 0000000..86cdcec
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-6079/parent-pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.its.mng6079</groupId>
+ <artifactId>parent</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <surefire.version>2.10</surefire.version>
+ </properties>
+
+ <!-- Import dependencies from surefire, especially surefire-api -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire</artifactId>
+ <version>${surefire.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/e83493fa/core-it-suite/src/test/resources/mng-6079/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-6079/pom.xml b/core-it-suite/src/test/resources/mng-6079/pom.xml
new file mode 100644
index 0000000..bc2e24d
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-6079/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.apache.maven.its.mng6079</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>parent-pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>jar</packaging>
+ <artifactId>submodule</artifactId>
+
+ <properties>
+ <surefire.version>2.12</surefire.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-dependency-resolution</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <compileArtifacts>target/compile.txt</compileArtifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/e83493fa/core-it-suite/src/test/resources/mng-6079/settings-template.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-6079/settings-template.xml b/core-it-suite/src/test/resources/mng-6079/settings-template.xml
new file mode 100644
index 0000000..f22a7f3
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-6079/settings-template.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>maven-core-it-repo</id>
+ <repositories>
+ <repository>
+ <id>maven-core-it</id>
+ <url>@baseurl@/../repo</url>
+ <releases>
+ <checksumPolicy>ignore</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+ </profiles>
+ <activeProfiles>
+ <activeProfile>maven-core-it-repo</activeProfile>
+ </activeProfiles>
+</settings>