Please add that comment in the test or it'll get lost in time...

On 20/09/2008, at 2:33 AM, [EMAIL PROTECTED] wrote:

Author: sisbell
Date: Fri Sep 19 09:33:53 2008
New Revision: 697144

URL: http://svn.apache.org/viewvc?rev=697144&view=rev
Log:
IT0103: Change in behavior for Maven 3.0 - build should fail if it can't find a child pom's parent pom within build or repo.

Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/ test/java/org/apache/maven/integrationtests/MavenIT0103Test.java

Modified: maven/core-integration-testing/trunk/core-integration- tests/src/test/java/org/apache/maven/integrationtests/ MavenIT0103Test.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0103Test.java?rev=697144&r1=697143&r2=697144&view=diff
= = = = = = = = ====================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/ test/java/org/apache/maven/integrationtests/MavenIT0103Test.java (original) +++ maven/core-integration-testing/trunk/core-integration-tests/src/ test/java/org/apache/maven/integrationtests/MavenIT0103Test.java Fri Sep 19 09:33:53 2008
@@ -1,6 +1,7 @@
package org.apache.maven.integrationtests;

import org.apache.maven.it.Verifier;
+import org.apache.maven.it.VerificationException;
import org.apache.maven.it.util.ResourceExtractor;

import java.io.File;
@@ -19,10 +20,28 @@
    {
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0103" );
        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "package" );
-        verifier.verifyErrorFreeLog();
-        verifier.resetStreams();

+
+        if ( matchesVersionRange( "(2.0.9, 2.99.99)" ) )
+        {
+            verifier.executeGoal( "package" );
+            verifier.verifyErrorFreeLog();
+            verifier.resetStreams();
+        }
+        else
+        {
+            try
+            {
+                verifier.executeGoal( "package" );
+            }
+            catch ( VerificationException e )
+            {
+                verifier.verifyTextInLog( "java.io.IOException" );
+                verifier.resetStreams();
+                return;
+            }
+ throw new VerificationException( "Build should have failed with java.io.IOException" );
+        }
    }
}




--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to