You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2016/12/02 04:03:05 UTC
[3/7] maven-surefire git commit: Add test using vintage engine
Add test using vintage engine
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/1ab033af
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/1ab033af
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/1ab033af
Branch: refs/heads/junit5
Commit: 1ab033afb89c1646c64e4b95ed184179c1670c62
Parents: 8995a28
Author: Benedikt Ritter <br...@apache.org>
Authored: Sun Oct 9 14:51:55 2016 +0200
Committer: Benedikt Ritter <br...@apache.org>
Committed: Sat Nov 19 14:02:10 2016 +0100
----------------------------------------------------------------------
.../maven/surefire/its/JUnit4VersionsIT.java | 19 +++++++--
.../src/test/resources/junit4/pom.xml | 44 +++++++++++++++++++-
2 files changed, 59 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/1ab033af/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4VersionsIT.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4VersionsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4VersionsIT.java
index bb216d3..eb7e41e 100644
--- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4VersionsIT.java
+++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4VersionsIT.java
@@ -83,6 +83,15 @@ public class JUnit4VersionsIT
}
@Test
+ public void test412M2()
+ throws Exception
+ {
+ assumeJavaVersion( JAVA_1_8 );
+
+ runJUnitTest( "4.12.0-M2" );
+ }
+
+ @Test
public void test500M2()
throws Exception
{
@@ -99,10 +108,14 @@ public class JUnit4VersionsIT
private String getProfile( String version )
{
- if ( version.startsWith( "4" ) )
+ if ( version.startsWith( "4.12" ) )
+ {
+ return "junit5-vintage";
+ }
+ else if ( version.startsWith( "5" ) )
{
- return "junit4";
+ return "junit5-jupiter";
}
- return "junit5";
+ return "junit4";
}
}
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/1ab033af/surefire-integration-tests/src/test/resources/junit4/pom.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit4/pom.xml b/surefire-integration-tests/src/test/resources/junit4/pom.xml
index 1dd57b0..d685f5b 100644
--- a/surefire-integration-tests/src/test/resources/junit4/pom.xml
+++ b/surefire-integration-tests/src/test/resources/junit4/pom.xml
@@ -60,7 +60,7 @@
</profile>
<profile>
- <id>junit5</id>
+ <id>junit5-jupiter</id>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -108,6 +108,48 @@
</plugins>
</build>
</profile>
+
+ <profile>
+ <id>junit5-vintage</id>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <java.version>1.8</java.version>
+ <junit.platform.version>1.0.0-M2</junit.platform.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-surefire-provider</artifactId>
+ <version>${junit.platform.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>