Repository: maven-integration-testing
Updated Branches:
  refs/heads/master 11806ae81 -> 1797b9ec1


[MNG-6330] Parents relativePath not verified anymore


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/1797b9ec
Tree: 
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/1797b9ec
Diff: 
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/1797b9ec

Branch: refs/heads/master
Commit: 1797b9ec156cffbb1bd17e731afea5850bbde1a6
Parents: 11806ae
Author: rfscholte <[email protected]>
Authored: Fri Dec 29 10:42:01 2017 +0100
Committer: rfscholte <[email protected]>
Committed: Fri Dec 29 10:42:32 2017 +0100

----------------------------------------------------------------------
 core-it-suite/pom.xml                           |  2 +-
 .../apache/maven/it/IntegrationTestSuite.java   |  1 +
 .../maven/it/MavenITmng6330RelativePath.java    | 59 ++++++++++++++++++++
 .../resources/mng-6330-relative-path/pom.xml    | 31 ++++++++++
 .../sub/subproject2/pom.xml                     | 28 ++++++++++
 .../mng-6330-relative-path/subproject1/pom.xml  | 30 ++++++++++
 6 files changed, 150 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1797b9ec/core-it-suite/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/pom.xml b/core-it-suite/pom.xml
index 8cfb3cb..e1c484d 100644
--- a/core-it-suite/pom.xml
+++ b/core-it-suite/pom.xml
@@ -88,7 +88,7 @@ under the License.
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.8.2</version>
+      <version>4.12</version>
       <!-- NOTE: Use compile scope for transitivity. -->
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1797b9ec/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 f7a06ff..c8bced7 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( MavenITmng6330RelativePath.class );
         suite.addTestSuite( MavenITmng6240PluginExtensionAetherProvider.class 
);
         suite.addTestSuite( MavenITmng6223FindBasedir.class );
         suite.addTestSuite( MavenITmng6189SiteReportPluginsWarningTest.class );

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1797b9ec/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6330RelativePath.java
----------------------------------------------------------------------
diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6330RelativePath.java
 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6330RelativePath.java
new file mode 100644
index 0000000..7adf2cd
--- /dev/null
+++ 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6330RelativePath.java
@@ -0,0 +1,59 @@
+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 static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.containsString;
+
+import java.io.File;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * MNG-6030 reintroduced ReactorModelCache, but this ignores invalid 
relativePaths of parents
+ * 
+ * @author Robert Scholte
+ */
+public class MavenITmng6330RelativePath
+    extends AbstractMavenIntegrationTestCase
+{
+    public MavenITmng6330RelativePath()
+    {
+        super( "(,3.5.0),(3.5.2,)" );
+    }
+    
+    public void testRelativePath() throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-6330-relative-path" );
+        
+        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.setForkJvm( true );
+
+        try
+        {
+            verifier.executeGoal( "validate");
+            fail( "Should fail due to non-resolvable parent" );
+        }
+        catch ( VerificationException e )
+        {
+            assertThat( e.getMessage(), containsString("Non-resolvable parent 
POM") );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1797b9ec/core-it-suite/src/test/resources/mng-6330-relative-path/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-6330-relative-path/pom.xml 
b/core-it-suite/src/test/resources/mng-6330-relative-path/pom.xml
new file mode 100644
index 0000000..d4552d9
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-6330-relative-path/pom.xml
@@ -0,0 +1,31 @@
+<!--
+  ~ 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.mng6330</groupId>
+  <artifactId>project</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>subproject1</module> <!-- caches parent -->
+    <module>sub/subproject2</module>
+  </modules>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1797b9ec/core-it-suite/src/test/resources/mng-6330-relative-path/sub/subproject2/pom.xml
----------------------------------------------------------------------
diff --git 
a/core-it-suite/src/test/resources/mng-6330-relative-path/sub/subproject2/pom.xml
 
b/core-it-suite/src/test/resources/mng-6330-relative-path/sub/subproject2/pom.xml
new file mode 100644
index 0000000..038cb79
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-6330-relative-path/sub/subproject2/pom.xml
@@ -0,0 +1,28 @@
+<!--
+  ~ 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.mng6330</groupId>
+    <artifactId>project</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>subproject2</artifactId>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/1797b9ec/core-it-suite/src/test/resources/mng-6330-relative-path/subproject1/pom.xml
----------------------------------------------------------------------
diff --git 
a/core-it-suite/src/test/resources/mng-6330-relative-path/subproject1/pom.xml 
b/core-it-suite/src/test/resources/mng-6330-relative-path/subproject1/pom.xml
new file mode 100644
index 0000000..25a98d8
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-6330-relative-path/subproject1/pom.xml
@@ -0,0 +1,30 @@
+<!--
+  ~ 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.mng6330</groupId>
+    <artifactId>project</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>subproject1</artifactId>
+  <version>2.0-SNAPSHOT</version>
+</project>

Reply via email to