You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2008/03/27 23:08:21 UTC
svn commit: r642000 - in
/maven/core-integration-testing/trunk/core-integration-tests/src/test:
java/org/apache/maven/integrationtests/MavenITmng3473PluginReportCrash.java
resources/mng-3473PluginReportCrash/pom.xml
Author: brianf
Date: Thu Mar 27 15:08:20 2008
New Revision: 642000
URL: http://svn.apache.org/viewvc?rev=642000&view=rev
Log:
enhanced the IT to validate both positive and negative expectations using 2.4 as failure and 2.4.1 as pass
Modified:
maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3473PluginReportCrash.java
maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3473PluginReportCrash/pom.xml
Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3473PluginReportCrash.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3473PluginReportCrash.java?rev=642000&r1=641999&r2=642000&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3473PluginReportCrash.java (original)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3473PluginReportCrash.java Thu Mar 27 15:08:20 2008
@@ -1,10 +1,14 @@
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.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
-import java.io.File;
-
/**
* Tests that the PluginDescriptor.getArtifacts() call returns all of the dependencies of the plugin,
* not just those that made it past the filter excluding Maven's core artifacts.
@@ -12,6 +16,11 @@
public class MavenITmng3473PluginReportCrash
extends AbstractMavenIntegrationTestCase
{
+ public MavenITmng3473PluginReportCrash()
+ throws InvalidVersionSpecificationException
+ {
+ super( "(2.0.8,)" ); // >2.0.8
+ }
public void testitMNG3473 ()
throws Exception
{
@@ -19,12 +28,34 @@
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+
verifier.executeGoal( "install" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
-
+
+ List cliOptions = new ArrayList();
+ cliOptions.add( "-Dplugin.version=2.4.1" );
+ verifier.setCliOptions( cliOptions );
+
+ //should succeed with 2.4.1
verifier.executeGoal( "site" );
verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ //should fail with 2.4
+ cliOptions.clear();
+ cliOptions.add( "-Dplugin.version=2.4" );
+ verifier.setCliOptions( cliOptions );
+
+ try
+ {
+ verifier.executeGoal( "site" );
+ }
+ catch (VerificationException e)
+ {
+ //expected this but don't require it cause some os's don't return the correct error code
+ }
+ verifier.verifyTextInLog( "org/apache/maven/doxia/module/site/manager/SiteModuleNotFoundException" );
verifier.resetStreams();
}
}
Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3473PluginReportCrash/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3473PluginReportCrash/pom.xml?rev=642000&r1=641999&r2=642000&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3473PluginReportCrash/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3473PluginReportCrash/pom.xml Thu Mar 27 15:08:20 2008
@@ -28,6 +28,7 @@
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<!--only fails with 2.4, not 2.3 or 2.4.1-->
+ <version>${plugin.version}</version>
</plugin>
</plugins>
</reporting>