Repository: maven-integration-testing Updated Branches: refs/heads/master 9496c8d53 -> 3ffb28978
[MNG-6082] Introduction of model version 4.1.0. 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/6a30b47b Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/6a30b47b Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/6a30b47b Branch: refs/heads/master Commit: 6a30b47b7d8b79ae0cfbeb7829b329ba2913a0ca Parents: 9496c8d Author: Christian Schulte <[email protected]> Authored: Thu Aug 18 21:06:25 2016 +0200 Committer: Christian Schulte <[email protected]> Committed: Thu Aug 18 22:10:41 2016 +0200 ---------------------------------------------------------------------- .../apache/maven/it/IntegrationTestSuite.java | 1 + ...ncyManagementImportInterpolation410Test.java | 83 ++++++++++++++++++++ .../mng-4463/exclusive-upper-bound/pom.xml | 2 +- .../mng-4463/inclusive-upper-bound/pom.xml | 2 +- .../resources/mng-4463/no-upper-bound/pom.xml | 2 +- .../test/resources/mng-5527/relocations/pom.xml | 2 +- .../test/resources/mng-5600/exclusions/pom.xml | 2 +- .../mng-5971/inheritance/1/2/3/pom.xml | 2 +- .../resources/mng-5971/inheritance/1/2/pom.xml | 2 +- .../resources/mng-5971/inheritance/1/pom.xml | 2 +- .../test/resources/mng-5971/inheritance/pom.xml | 2 +- .../test/resources/mng-5971/override/pom.xml | 2 +- .../mng-5971/properties/1/2/3/4/pom.xml | 2 +- .../resources/mng-5971/properties/1/2/3/pom.xml | 2 +- .../resources/mng-5971/properties/1/2/pom.xml | 2 +- .../resources/mng-5971/properties/1/pom.xml | 2 +- .../test/resources/mng-5971/properties/pom.xml | 2 +- .../resources/mng-6079/parent-pom-4_1_0.xml | 49 ++++++++++++ .../src/test/resources/mng-6079/pom-4_1_0.xml | 69 ++++++++++++++++ 19 files changed, 217 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 3713aa7..1348817 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( MavenITmng6079DependencyManagementImportInterpolation410Test.class ); suite.addTestSuite( MavenITmng6049VersionRangeResultFilterExtensionTest.class ); suite.addTestSuite( MavenITmng5527DependencyManagementImportRelocationsTest.class ); suite.addTestSuite( MavenITmng5600DependencyManagementImportExclusionsTest.class ); http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolation410Test.java ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolation410Test.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolation410Test.java new file mode 100644 index 0000000..1262c9b --- /dev/null +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6079DependencyManagementImportInterpolation410Test.java @@ -0,0 +1,83 @@ +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 MavenITmng6079DependencyManagementImportInterpolation410Test + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng6079DependencyManagementImportInterpolation410Test() + { + super( "[3.4,)" ); + } + + 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.addCliOption( "-f" ); + verifier.addCliOption( "pom-4_1_0.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/6a30b47b/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 index 54404ac..cdb96d7 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng4463</groupId> <artifactId>test</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 0e91b01..3f36c6a 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng4463</groupId> <artifactId>test</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 53ec4e3..6b4f217 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng4463</groupId> <artifactId>test</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 822f1cf..f626481 100644 --- a/core-it-suite/src/test/resources/mng-5527/relocations/pom.xml +++ b/core-it-suite/src/test/resources/mng-5527/relocations/pom.xml @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng5527</groupId> <artifactId>0</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index dc06836..412ebcd 100644 --- a/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml +++ b/core-it-suite/src/test/resources/mng-5600/exclusions/pom.xml @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng5600</groupId> <artifactId>0</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 54a3f71..dafcf7a 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <parent> <groupId>org.apache.maven.its.mng5971</groupId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 76a1fdb..a820253 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <parent> <groupId>org.apache.maven.its.mng5971</groupId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 8f4cd52..73c5532 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <parent> <groupId>org.apache.maven.its.mng5971</groupId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 2614416..567f5f9 100644 --- a/core-it-suite/src/test/resources/mng-5971/inheritance/pom.xml +++ b/core-it-suite/src/test/resources/mng-5971/inheritance/pom.xml @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng5971</groupId> <artifactId>0</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index fc5fb4c..024d22a 100644 --- a/core-it-suite/src/test/resources/mng-5971/override/pom.xml +++ b/core-it-suite/src/test/resources/mng-5971/override/pom.xml @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng5971</groupId> <artifactId>0</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index c60f6d0..a5eced1 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <parent> <groupId>org.apache.maven.its.mng5971</groupId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 501f191..0651192 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <parent> <groupId>org.apache.maven.its.mng5971</groupId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 5e0b727..f538db3 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <parent> <groupId>org.apache.maven.its.mng5971</groupId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index e374e88..7c1f8c6 100644 --- 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 @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <parent> <groupId>org.apache.maven.its.mng5971</groupId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/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 index 02f870e..a6f7388 100644 --- a/core-it-suite/src/test/resources/mng-5971/properties/pom.xml +++ b/core-it-suite/src/test/resources/mng-5971/properties/pom.xml @@ -20,7 +20,7 @@ under the License. --> <project> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.1.0</modelVersion> <groupId>org.apache.maven.its.mng5971</groupId> <artifactId>0</artifactId> http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/6a30b47b/core-it-suite/src/test/resources/mng-6079/parent-pom-4_1_0.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-6079/parent-pom-4_1_0.xml b/core-it-suite/src/test/resources/mng-6079/parent-pom-4_1_0.xml new file mode 100644 index 0000000..46b8337 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6079/parent-pom-4_1_0.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.1.0</modelVersion> + <groupId>org.apache.maven.its.mng6079</groupId> + <artifactId>parent-4_1_0</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/6a30b47b/core-it-suite/src/test/resources/mng-6079/pom-4_1_0.xml ---------------------------------------------------------------------- diff --git a/core-it-suite/src/test/resources/mng-6079/pom-4_1_0.xml b/core-it-suite/src/test/resources/mng-6079/pom-4_1_0.xml new file mode 100644 index 0000000..794f059 --- /dev/null +++ b/core-it-suite/src/test/resources/mng-6079/pom-4_1_0.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-4_1_0</artifactId> + <version>1.0-SNAPSHOT</version> + <relativePath>parent-pom-4_1_0.xml</relativePath> + </parent> + + <modelVersion>4.1.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>
