Author: brett
Date: Tue Oct 5 08:28:29 2010
New Revision: 1004571
URL: http://svn.apache.org/viewvc?rev=1004571&view=rev
Log:
adjust Surefire integration tests to be able to run against different versions
of TestNG. Default remains 5.7.
Modified:
maven/surefire/trunk/surefire-integration-tests/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethod/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethodFailure/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-execute-error/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-listener-reporter/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path
with spaces/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-twoTestCaseSuite/pom.xml
Modified: maven/surefire/trunk/surefire-integration-tests/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/pom.xml Tue Oct 5 08:28:29
2010
@@ -145,6 +145,10 @@
<value>${project.version}</value>
</property>
<property>
+ <name>testng.version</name>
+ <value>${testng.version}</value>
+ </property>
+ <property>
<name>maven.home</name>
<value>${maven.home}</value>
</property>
@@ -172,6 +176,10 @@
<value>${project.version}</value>
</property>
<property>
+ <name>testng.version</name>
+ <value>${testng.version}</value>
+ </property>
+ <property>
<name>maven.home</name>
<value>${maven.home}</value>
</property>
@@ -220,5 +228,6 @@
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<it.settings.showPasswords>false</it.settings.showPasswords>
+ <testng.version>5.7</testng.version>
</properties>
</project>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java
Tue Oct 5 08:28:29 2010
@@ -20,6 +20,10 @@ package org.apache.maven.surefire.its;
*/
import junit.framework.TestCase;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
+import
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
@@ -37,10 +41,31 @@ public abstract class AbstractSurefireIn
{
private String surefireVersion = System.getProperty( "surefire.version" );
+ private String testNgVersion = System.getProperty( "testng.version" );
+
protected ArrayList getInitialGoals()
{
ArrayList goals = new ArrayList();
goals.add( "-Dsurefire.version=" + surefireVersion );
+
+ if ( testNgVersion != null )
+ {
+ goals.add( "-DtestNgVersion=" + testNgVersion );
+
+ ArtifactVersion v = new DefaultArtifactVersion( testNgVersion );
+ try
+ {
+ if ( VersionRange.createFromVersionSpec( "(,5.13)"
).containsVersion( v ) )
+ {
+ goals.add( "-DtestNgClassifier=jdk15" );
+ }
+ }
+ catch ( InvalidVersionSpecificationException e )
+ {
+ throw new RuntimeException( e.getMessage(), e );
+ }
+ }
+
return goals;
}
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
Tue Oct 5 08:28:29 2010
@@ -26,7 +26,9 @@ import java.io.File;
import java.util.List;
/**
- * Basic suite test using all known versions of TestNG
+ * Basic suite test using all known versions of TestNG. Used for regression
testing Surefire against old versions.
+ * To check new versions of TestNG work with current versions of Surefire,
instead run the full test suite with
+ * -Dtestng.version=5.14.2 (for example)
*
* @author <a href="mailto:[email protected]">Dan Fabulich</a>
*/
@@ -37,7 +39,7 @@ public class CheckTestNgVersionsIT
public void test47()
throws Exception
{
- runTestNgTest( "4.7" );
+ runTestNgTest( "4.7", "jdk15" );
}
// DGF SUREFIRE-375 + MAVENUPLOAD-1024
@@ -46,48 +48,114 @@ public class CheckTestNgVersionsIT
public void XXXtest50()
throws Exception
{
- runTestNgTest( "5.0" );
+ runTestNgTest( "5.0", "jdk15" );
}
public void XXXtest501()
throws Exception
{
- runTestNgTest( "5.0.1" );
+ runTestNgTest( "5.0.1", "jdk15" );
}
public void test502()
throws Exception
{
- runTestNgTest( "5.0.2" );
+ runTestNgTest( "5.0.2", "jdk15" );
}
public void test51()
throws Exception
{
- runTestNgTest( "5.1" );
+ runTestNgTest( "5.1", "jdk15" );
}
public void test55()
throws Exception
{
- runTestNgTest( "5.5" );
+ runTestNgTest( "5.5", "jdk15" );
}
public void test56()
throws Exception
{
- runTestNgTest( "5.6" );
+ runTestNgTest( "5.6", "jdk15" );
}
public void test57()
throws Exception
{
- runTestNgTest( "5.7" );
+ runTestNgTest( "5.7", "jdk15" );
+ }
+
+ public void test58()
+ throws Exception
+ {
+ runTestNgTest( "5.8", "jdk15" );
+ }
+
+ public void test59()
+ throws Exception
+ {
+ runTestNgTest( "5.9", "jdk15" );
+ }
+
+ public void test510()
+ throws Exception
+ {
+ runTestNgTest( "5.10", "jdk15" );
+ }
+
+ public void test511()
+ throws Exception
+ {
+ runTestNgTest( "5.11", "jdk15" );
+ }
+
+ public void test512()
+ throws Exception
+ {
+ runTestNgTest( "5.12.1" );
+ }
+
+ public void test513()
+ throws Exception
+ {
+ runTestNgTest( "5.13" );
+ }
+
+ public void test5131()
+ throws Exception
+ {
+ runTestNgTest( "5.13.1" );
+ }
+
+ public void test514()
+ throws Exception
+ {
+ runTestNgTest( "5.14" );
+ }
+
+ public void test5141()
+ throws Exception
+ {
+ runTestNgTest( "5.14.1" );
+ }
+
+ public void test5142()
+ throws Exception
+ {
+ runTestNgTest( "5.14.2" );
}
public void runTestNgTest( String version )
throws Exception
{
+ runTestNgTest( version, null );
+ }
+
+ public void runTestNgTest( String version, String classifier )
+ throws Exception
+ {
File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/testng-simple" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
@@ -96,6 +164,12 @@ public class CheckTestNgVersionsIT
// DGF we have to pass in the version as a command line argument
// and NOT as a system property; otherwise our setting will be ignored
arguments.add( "-DtestNgVersion=" + version );
+
+ if ( classifier != null )
+ {
+ arguments.add( "-DtestNgClassifier=" + classifier );
+ }
+
executeGoals( verifier, arguments );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,20 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG failure after suite</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
<testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethod/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethod/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethod/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethod/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,20 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG @BeforeMethod annotation</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
<testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethodFailure/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethodFailure/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethodFailure/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-beforeMethodFailure/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,20 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG failure in @BeforeMethod annotation</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
<testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-execute-error/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-execute-error/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-execute-error/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-execute-error/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,6 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>Test proper output from forked execution in case of uncatched error
during suite run</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <properties>
+ <testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -49,14 +84,4 @@
</plugins>
</build>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.7</version>
- <scope>test</scope>
- <classifier>jdk15</classifier>
- </dependency>
- </dependencies>
-
</project>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,15 +28,40 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG group/parallel thread tests</name>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.7</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <properties>
+ <testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
+ </properties>
<build>
<plugins>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,6 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG and Junit Together</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <properties>
+ <testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -35,13 +70,6 @@
<version>3.8.1</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.7</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-listener-reporter/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-listener-reporter/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-listener-reporter/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-listener-reporter/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,20 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG listener and reporter test</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
<testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path
with spaces/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path%20with%20spaces/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path
with spaces/pom.xml (original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path
with spaces/pom.xml Tue Oct 5 08:28:29 2010
@@ -28,20 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG test in a path with spaces</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
<testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,27 +28,55 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG simple test</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ <exclusions>
+ <exclusion>
+ <!-- NOTE: Deliberaty excluding junit to enforce TestNG only
tests, cf. SUREFIRE-642 -->
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <exclusions>
+ <exclusion>
+ <!-- NOTE: Deliberaty excluding junit to enforce TestNG only
tests, cf. SUREFIRE-642 -->
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
<testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <!-- NOTE: Deliberaty excluding junit to enforce TestNG only tests,
cf. SUREFIRE-642 -->
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,20 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG Suite XML File</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
- <testNgVersion>5.7</testNgVersion>
+ <testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
Modified:
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-twoTestCaseSuite/pom.xml
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-twoTestCaseSuite/pom.xml?rev=1004571&r1=1004570&r2=1004571&view=diff
==============================================================================
---
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-twoTestCaseSuite/pom.xml
(original)
+++
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-twoTestCaseSuite/pom.xml
Tue Oct 5 08:28:29 2010
@@ -28,20 +28,41 @@
<version>1.0-SNAPSHOT</version>
<name>TestNG Suite XML with two test cases</name>
+ <profiles>
+ <profile>
+ <id>testng-old</id>
+ <activation>
+ <property><name>testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ <classifier>${testNgClassifier}</classifier>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>testng-new</id>
+ <activation>
+ <property><name>!testNgClassifier</name></property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testNgVersion}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
<properties>
<testNgVersion>5.7</testNgVersion>
+ <testNgClassifier>jdk15</testNgClassifier>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testNgVersion}</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>