Author: jdcasey
Date: Thu Jul  3 09:07:47 2008
New Revision: 673730

URL: http://svn.apache.org/viewvc?rev=673730&view=rev
Log:
[MNG-2068] Adding an integration-test to verify that this is fixed (I've also 
verified that it fails in 2.0.4 and 2.0.6, but does not fail in 2.0.7+).

Added:
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2068ReactorRelativeParentsTest.java
   (with props)
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/pom.xml
   (with props)
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/pom.xml
   (with props)
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/pom.xml
   (with props)
Modified:
    
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java

Modified: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java?rev=673730&r1=673729&r2=673730&view=diff
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java
 (original)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java
 Thu Jul  3 09:07:47 2008
@@ -101,6 +101,7 @@
         suite.addTestSuite( MavenITmng2254PomEncodingTest.class );
         suite.addTestSuite( MavenITmng2234ActiveProfilesFromSettingsTest.class 
);
         suite.addTestSuite( MavenITmng2123VersionRangeDependencyTest.class );
+        suite.addTestSuite( MavenITmng2068ReactorRelativeParentsTest.class );
         suite.addTestSuite( 
MavenITmng2045testJarDependenciesBrokenInReactorTest.class );
         suite.addTestSuite( MavenITmng1493NonStandardModulePomNames.class );
         suite.addTestSuite( MavenITmng1491ReactorArtifactIdCollision.class );

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2068ReactorRelativeParentsTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2068ReactorRelativeParentsTest.java?rev=673730&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2068ReactorRelativeParentsTest.java
 (added)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2068ReactorRelativeParentsTest.java
 Thu Jul  3 09:07:47 2008
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+package org.apache.maven.integrationtests;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import 
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * This is a test set for <a 
href="http://jira.codehaus.org/browse/MNG-2068";>MNG-2068</a>.
+ *
+ * Verify that a multimodule build, built from the middle node in an 
inheritance hierarchy,
+ * can find all parent POMs necessary to build each project in the reactor 
using ONLY the
+ * relativePath from the parent specification (in this case, the implied one 
of '../pom.xml').
+ * 
+ * @author jdcasey
+ * 
+ */
+public class MavenITmng2068ReactorRelativeParentsTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public MavenITmng2068ReactorRelativeParentsTest()
+        throws InvalidVersionSpecificationException
+    {
+        super( "(2.0.6,)" ); // only test in 2.0.7+
+    }
+
+    public void testitMNG2068 ()
+        throws Exception
+    {
+        // The testdir is computed from the location of this
+        // file.
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-2068-reactorRelativeParents" );
+        File projectDir = new File( testDir, "frameworks" );
+
+        Verifier verifier;
+
+        /*
+         * We must first make sure that any artifact created
+         * by this test has been removed from the local
+         * repository. Failing to do this could cause
+         * unstable test results. Fortunately, the verifier
+         * makes it easy to do this.
+         */
+        verifier = new Verifier( projectDir.getAbsolutePath() );
+
+        verifier.deleteArtifact( "samplegroup", "master", "0.0.1", "pom" );
+        verifier.deleteArtifact( "samplegroup", "frameworks", "0.0.1", "pom" );
+        verifier.deleteArtifact( "samplegroup", "core", "1.0.0", "pom" );
+
+        verifier.executeGoal( "validate" );
+
+        /*
+         * This is the simplest way to check a build
+         * succeeded. It is also the simplest way to create
+         * an IT test: make the build pass when the test
+         * should pass, and make the build fail when the
+         * test should fail. There are other methods
+         * supported by the verifier. They can be seen here:
+         * http://maven.apache.org/shared/maven-verifier/apidocs/index.html
+         */
+        verifier.verifyErrorFreeLog();
+
+        /*
+         * Reset the streams before executing the verifier
+         * again.
+         */
+        verifier.resetStreams();
+    }
+}

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2068ReactorRelativeParentsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2068ReactorRelativeParentsTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/pom.xml?rev=673730&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/pom.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/pom.xml
 Thu Jul  3 09:07:47 2008
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+       <parent>
+               <groupId>samplegroup</groupId>
+               <artifactId>frameworks</artifactId>
+               <version>0.0.1</version>
+       </parent>
+       <groupId>samplegroup</groupId>
+       <artifactId>core</artifactId>
+       <name>core</name>
+       <version>1.0.0</version>
+</project>

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/core/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/pom.xml?rev=673730&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/pom.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/pom.xml
 Thu Jul  3 09:07:47 2008
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+       <parent>
+               <groupId>samplegroup</groupId>
+               <artifactId>master</artifactId>
+               <version>0.0.1</version>
+       </parent>
+       <groupId>samplegroup</groupId>
+       <artifactId>frameworks</artifactId>
+       <version>0.0.1</version>
+       <name>frameworks</name>
+       <packaging>pom</packaging>
+       <modules>
+               <module>core</module>
+       </modules>
+</project>
\ No newline at end of file

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/frameworks/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/pom.xml?rev=673730&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/pom.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/pom.xml
 Thu Jul  3 09:07:47 2008
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>samplegroup</groupId>
+       <artifactId>master</artifactId>
+       <version>0.0.1</version>
+       <name>master</name>
+       <packaging>pom</packaging>
+       <modules>
+               <module>frameworks</module>
+       </modules>
+</project>

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-2068-reactorRelativeParents/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"


Reply via email to