You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2014/07/19 17:58:16 UTC
git commit: Creation of an integration test for MNG-5663.
Repository: maven-integration-testing
Updated Branches:
refs/heads/master 2b72b2cab -> 3d11f6c31
Creation of an integration test for MNG-5663.
The test was for a regression introduced with Maven 3.2.2 that prevents
nested import scope POMs from being resolved.
Signed-off-by: Jason van Zyl <ja...@tesla.io>
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/3d11f6c3
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/3d11f6c3
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/3d11f6c3
Branch: refs/heads/master
Commit: 3d11f6c31eb014b8297beffc112fa8426d9e1971
Parents: 2b72b2c
Author: markdingram <ma...@gmail.com>
Authored: Sat Jul 19 08:30:56 2014 +0100
Committer: Jason van Zyl <ja...@tesla.io>
Committed: Sat Jul 19 11:41:58 2014 -0400
----------------------------------------------------------------------
.gitignore | 2 +-
.../apache/maven/it/IntegrationTestSuite.java | 3 +-
...enITmng5639ImportScopePomResolutionTest.java | 2 +-
...g5663NestedImportScopePomResolutionTest.java | 67 +++++++++++++++++++
.../test/resources/bootstrap/group-6/pom.xml | 14 ++++
.../pom-template.xml | 61 +++++++++++++++++
.../apache/maven/its/mng5663/a/0.1/a-0.1.pom | 41 ++++++++++++
.../apache/maven/its/mng5663/b/0.1/b-0.1.pom | 39 +++++++++++
.../apache/maven/its/mng5663/c/0.1/c-0.1.jar | Bin 0 -> 1934 bytes
.../apache/maven/its/mng5663/c/0.1/c-0.1.pom | 30 +++++++++
.../settings-template.xml | 43 ++++++++++++
11 files changed, 299 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 9e4d917..fa65a79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
.svn
target
-repo
+/repo
.project
.classpath
.settings
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/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 a7e6cc8..38d888f 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
@@ -105,7 +105,8 @@ public class IntegrationTestSuite
// Tests that don't run stable and need to be fixed
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
-
+
+ suite.addTestSuite( MavenITmng5663NestedImportScopePomResolutionTest.class );
suite.addTestSuite( MavenITmng2562Timestamp322Test.class );
suite.addTestSuite( MavenITmng2199ParentVersionRangeTest.class );
suite.addTestSuite( MavenITmng5640LifecycleParticipantAfterSessionEnd.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5639ImportScopePomResolutionTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5639ImportScopePomResolutionTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5639ImportScopePomResolutionTest.java
index e2b3dd0..b9603a8 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5639ImportScopePomResolutionTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5639ImportScopePomResolutionTest.java
@@ -36,7 +36,7 @@ public class MavenITmng5639ImportScopePomResolutionTest
public MavenITmng5639ImportScopePomResolutionTest()
{
- super( "(3.2.2,)" );
+ super( "[3.2.2,)" );
}
public void testitMNG5639()
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5663NestedImportScopePomResolutionTest.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5663NestedImportScopePomResolutionTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5663NestedImportScopePomResolutionTest.java
new file mode 100644
index 0000000..9acfd20
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5663NestedImportScopePomResolutionTest.java
@@ -0,0 +1,67 @@
+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.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-5663">MNG-5663</a>:
+ *
+ * The test POM references an import scope POM, which also has a dependency on an import scope POM.
+ *
+ * The 2nd import scope POM is found in a repository that is only defined in the test POM. The test confirms
+ * that dependencies are successfully resolved for this setup.
+ *
+ */
+public class MavenITmng5663NestedImportScopePomResolutionTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng5663NestedImportScopePomResolutionTest()
+ {
+ super( "[3.0.4,3.2.2),(3.2.2,)" );
+ }
+
+ public void testitMNG5639()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5663-nested-import-scope-pom-resolution");
+
+ Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.deleteArtifacts( "org.apache.maven.its.mng5663" );
+
+ verifier.filterFile( "pom-template.xml", "pom.xml", "UTF-8", verifier.newDefaultFilterProperties() );
+ verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
+ verifier.addCliOption( "--settings" );
+ verifier.addCliOption( "settings.xml" );
+
+ verifier.executeGoal( "install" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ verifier.assertArtifactPresent( "org.apache.maven.its.mng5663", "c", "0.1", "jar" );
+
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/resources/bootstrap/group-6/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/bootstrap/group-6/pom.xml b/core-it-suite/src/test/resources/bootstrap/group-6/pom.xml
index 453cba4..a161e04 100644
--- a/core-it-suite/src/test/resources/bootstrap/group-6/pom.xml
+++ b/core-it-suite/src/test/resources/bootstrap/group-6/pom.xml
@@ -74,5 +74,19 @@ under the License.
<version>3.2</version>
<scope>runtime</scope>
</dependency>
+ <!-- IT MNG-5663 maven-resources -->
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <scope>runtime</scope>
+ </dependency>
+ <!-- IT MNG-5663 maven-compiler -->
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml
new file mode 100644
index 0000000..ccd5b27
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/pom-template.xml
@@ -0,0 +1,61 @@
+<?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.mng5663</groupId>
+ <artifactId>test</artifactId>
+ <version>0.1</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-5663</name>
+ <description>
+ Checks that an import POM that declares a transitive dependency that is located in a repository
+ defined is this POM can be resolved successfully.
+ </description>
+
+ <repositories>
+ <repository>
+ <id>repo2</id>
+ <url>@baseurl@/repo2</url>
+ </repository>
+ </repositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5663</groupId>
+ <artifactId>a</artifactId>
+ <version>0.1</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5663</groupId>
+ <artifactId>c</artifactId>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo/org/apache/maven/its/mng5663/a/0.1/a-0.1.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo/org/apache/maven/its/mng5663/a/0.1/a-0.1.pom b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo/org/apache/maven/its/mng5663/a/0.1/a-0.1.pom
new file mode 100644
index 0000000..d1a58fb
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo/org/apache/maven/its/mng5663/a/0.1/a-0.1.pom
@@ -0,0 +1,41 @@
+<?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.mng5663</groupId>
+ <artifactId>a</artifactId>
+ <version>0.1</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5663</groupId>
+ <artifactId>b</artifactId>
+ <version>0.1</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/b/0.1/b-0.1.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/b/0.1/b-0.1.pom b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/b/0.1/b-0.1.pom
new file mode 100644
index 0000000..2b39792
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/b/0.1/b-0.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.mng5663</groupId>
+ <artifactId>b</artifactId>
+ <version>0.1</version>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.mng5663</groupId>
+ <artifactId>c</artifactId>
+ <version>0.1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.jar
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.jar b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.jar
new file mode 100644
index 0000000..fb66329
Binary files /dev/null and b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.jar differ
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.pom
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.pom b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.pom
new file mode 100644
index 0000000..76d70d1
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/repo2/org/apache/maven/its/mng5663/c/0.1/c-0.1.pom
@@ -0,0 +1,30 @@
+<?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.mng5663</groupId>
+ <artifactId>c</artifactId>
+ <version>0.1</version>
+ <packaging>jar</packaging>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/3d11f6c3/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/settings-template.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/settings-template.xml b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/settings-template.xml
new file mode 100644
index 0000000..c985d1a
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5663-nested-import-scope-pom-resolution/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>