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:03 UTC
[1/7] maven-surefire git commit: Remove unused property
Repository: maven-surefire
Updated Branches:
refs/heads/junit5 da9281412 -> e4a5247a7
Remove unused property
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/108538ba
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/108538ba
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/108538ba
Branch: refs/heads/junit5
Commit: 108538bae9fd5957aea47135f232ac2529167ff8
Parents: da92814
Author: Benedikt Ritter <br...@apache.org>
Authored: Sun Oct 9 14:30:49 2016 +0200
Committer: Benedikt Ritter <br...@apache.org>
Committed: Sat Nov 19 14:02:02 2016 +0100
----------------------------------------------------------------------
surefire-integration-tests/src/test/resources/junit4/pom.xml | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/108538ba/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 3d1f971..c10d8e9 100644
--- a/surefire-integration-tests/src/test/resources/junit4/pom.xml
+++ b/surefire-integration-tests/src/test/resources/junit4/pom.xml
@@ -28,11 +28,6 @@
<version>1.0-SNAPSHOT</version>
<name>Test for JUnit 4</name>
-
- <properties>
- <junitVersion>4.4</junitVersion>
- </properties>
-
<dependencies>
<dependency>
<groupId>junit</groupId>
[5/7] maven-surefire git commit: Sure one test among JUnit 4 and
JUnit 5
Posted by ti...@apache.org.
Sure one test among JUnit 4 and JUnit 5
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/a50c823b
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/a50c823b
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/a50c823b
Branch: refs/heads/junit5
Commit: a50c823baba16f0bc5e4b7c08993d1bf706ce1dc
Parents: 81f3dda
Author: Benedikt Ritter <br...@apache.org>
Authored: Mon Oct 10 19:04:24 2016 +0200
Committer: Benedikt Ritter <br...@apache.org>
Committed: Sat Nov 19 14:02:17 2016 +0100
----------------------------------------------------------------------
.../src/test/resources/junit4/pom.xml | 24 +++++---
.../junit4/src/test/java/junit5/JUnit5Test.java | 65 ++++++++++++++++++++
2 files changed, 81 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a50c823b/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 f277ceb..57e66b8 100644
--- a/surefire-integration-tests/src/test/resources/junit4/pom.xml
+++ b/surefire-integration-tests/src/test/resources/junit4/pom.xml
@@ -28,14 +28,28 @@
<version>1.0-SNAPSHOT</version>
<name>Test for JUnit 4</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <version>5.0.0-M2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
</plugins>
@@ -45,10 +59,6 @@
<profile>
<id>junit4</id>
- <properties>
- <java.version>1.5</java.version>
- </properties>
-
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -74,7 +84,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <java.version>1.8</java.version>
<junit.jupiter.version>5.0.0-M2</junit.jupiter.version>
<junit.vintage.version>4.12.0-M2</junit.vintage.version>
<junit.platform.version>1.0.0-M2</junit.platform.version>
@@ -111,7 +120,6 @@
<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>
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a50c823b/surefire-integration-tests/src/test/resources/junit4/src/test/java/junit5/JUnit5Test.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/junit4/src/test/java/junit5/JUnit5Test.java b/surefire-integration-tests/src/test/resources/junit4/src/test/java/junit5/JUnit5Test.java
new file mode 100644
index 0000000..558546d
--- /dev/null
+++ b/surefire-integration-tests/src/test/resources/junit4/src/test/java/junit5/JUnit5Test.java
@@ -0,0 +1,65 @@
+package junit5;
+
+/*
+ * 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.
+ */
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+
+/**
+ * A test using the JUnit 5 API, which should be executed by JUnit jupiter enigne
+ */
+public class JUnit5Test
+{
+
+ private boolean setUpCalled;
+
+ private static boolean tearDownCalled;
+
+ @BeforeEach
+ public void setUp()
+ {
+ setUpCalled = true;
+ System.out.println( "Called setUp" );
+ }
+
+ @AfterEach
+ public void tearDown()
+ {
+ tearDownCalled = true;
+ System.out.println( "Called tearDown" );
+ }
+
+ @Test
+ public void testSetUp()
+ {
+ Assertions.assertTrue( setUpCalled, "setUp was not called" );
+ }
+
+ @AfterAll
+ public static void oneTimeTearDown()
+ {
+ Assertions.assertTrue( tearDownCalled, "tearDown was not called" );
+ }
+
+}
[4/7] maven-surefire git commit: Move share compiler configuration
among projects
Posted by ti...@apache.org.
Move share compiler configuration among projects
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/81f3dda5
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/81f3dda5
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/81f3dda5
Branch: refs/heads/junit5
Commit: 81f3dda52af9805a46bab2e608c62ed1b0e6b9fd
Parents: 1ab033a
Author: Benedikt Ritter <br...@apache.org>
Authored: Sun Oct 9 15:32:10 2016 +0200
Committer: Benedikt Ritter <br...@apache.org>
Committed: Sat Nov 19 14:02:13 2016 +0100
----------------------------------------------------------------------
.../src/test/resources/junit4/pom.xml | 46 ++++++++------------
1 file changed, 18 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/81f3dda5/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 d685f5b..f277ceb 100644
--- a/surefire-integration-tests/src/test/resources/junit4/pom.xml
+++ b/surefire-integration-tests/src/test/resources/junit4/pom.xml
@@ -28,9 +28,27 @@
<version>1.0-SNAPSHOT</version>
<name>Test for JUnit 4</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
<profile>
<id>junit4</id>
+
+ <properties>
+ <java.version>1.5</java.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -44,14 +62,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
@@ -77,24 +87,11 @@
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- <version>${junit.vintage.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>
@@ -130,13 +127,6 @@
<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>
[6/7] maven-surefire git commit: Introduce JUnitVersion enum for
configuring tests for different junit versions
Posted by ti...@apache.org.
Introduce JUnitVersion enum for configuring tests for different junit versions
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/31b55924
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/31b55924
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/31b55924
Branch: refs/heads/junit5
Commit: 31b55924060c9b8994a28761c8d8722a6f1d491c
Parents: a50c823
Author: Benedikt Ritter <br...@apache.org>
Authored: Mon Oct 10 19:27:26 2016 +0200
Committer: Benedikt Ritter <br...@apache.org>
Committed: Sat Nov 19 14:02:19 2016 +0100
----------------------------------------------------------------------
.../maven/surefire/its/JUnit4VersionsIT.java | 92 +++++++++-----------
.../apache/maven/surefire/its/JUnitVersion.java | 78 +++++++++++++++++
2 files changed, 118 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/31b55924/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 eb7e41e..2df3b1c 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
@@ -29,10 +29,26 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_10;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_11;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_12;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_8;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_8_1;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_8_2;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_9;
import static org.junit.runners.Parameterized.*;
-import static org.apache.commons.lang3.JavaVersion.JAVA_1_8;
-import static org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersion;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_0;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_1;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_2;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_3;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_3_1;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_4;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_5;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_6;
+import static org.apache.maven.surefire.its.JUnitVersion.JUNIT_4_7;
+import static org.apache.maven.surefire.its.JUnitVersion.JUPITER_5_0_0_M2;
+import static org.apache.maven.surefire.its.JUnitVersion.VINTAGE_4_12_0_M2;
/**
* Basic suite test using all known versions of JUnit 4.x
@@ -48,31 +64,33 @@ public class JUnit4VersionsIT
public static Collection<Object[]> junitVersions()
{
return Arrays.asList( new Object[][] {
- { "4.0" },
- { "4.1" },
- { "4.2" },
- { "4.3" },
- { "4.3.1" },
- { "4.4" },
- { "4.5" },
- { "4.6" },
- { "4.7" },
- { "4.8" },
- { "4.8.1" },
- { "4.8.2" },
- { "4.9" },
- { "4.10" },
- { "4.11" },
- { "4.12" }
+ { JUNIT_4_0 },
+ { JUNIT_4_1 },
+ { JUNIT_4_2 },
+ { JUNIT_4_3 },
+ { JUNIT_4_3_1 },
+ { JUNIT_4_4 },
+ { JUNIT_4_5 },
+ { JUNIT_4_6 },
+ { JUNIT_4_7 },
+ { JUNIT_4_8 },
+ { JUNIT_4_8_1 },
+ { JUNIT_4_8_2 },
+ { JUNIT_4_9 },
+ { JUNIT_4_10 },
+ { JUNIT_4_11 },
+ { JUNIT_4_12 },
+ { VINTAGE_4_12_0_M2 },
+ { JUPITER_5_0_0_M2 }
} );
}
@Parameter
- public String version;
+ public JUnitVersion version;
private SurefireLauncher unpack()
{
- return unpack( "/junit4", version );
+ return unpack( "/junit4", version.toString() );
}
@Test
@@ -82,40 +100,10 @@ public class JUnit4VersionsIT
runJUnitTest( version );
}
- @Test
- public void test412M2()
- throws Exception
- {
- assumeJavaVersion( JAVA_1_8 );
-
- runJUnitTest( "4.12.0-M2" );
- }
-
- @Test
- public void test500M2()
+ private void runJUnitTest( JUnitVersion version )
throws Exception
{
- assumeJavaVersion( JAVA_1_8 );
-
- runJUnitTest( "5.0.0-M2" );
+ version.configure( unpack() ).executeTest().verifyErrorFree( 1 );
}
- public void runJUnitTest( String version )
- throws Exception
- {
- unpack().setJUnitVersion( version ).activateProfile( getProfile( version ) ).executeTest().verifyErrorFree( 1 );
- }
-
- private String getProfile( String version )
- {
- if ( version.startsWith( "4.12" ) )
- {
- return "junit5-vintage";
- }
- else if ( version.startsWith( "5" ) )
- {
- return "junit5-jupiter";
- }
- return "junit4";
- }
}
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/31b55924/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnitVersion.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnitVersion.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnitVersion.java
new file mode 100644
index 0000000..0bdef4a
--- /dev/null
+++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnitVersion.java
@@ -0,0 +1,78 @@
+package org.apache.maven.surefire.its;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.surefire.its.fixture.SurefireLauncher;
+
+/**
+ * Enum listing all the JUnit version.
+ */
+public enum JUnitVersion {
+
+ JUNIT_4_0( "4.0" ),
+ JUNIT_4_1( "4.1" ),
+ JUNIT_4_2( "4.2" ),
+ JUNIT_4_3( "4.3" ),
+ JUNIT_4_3_1( "4.3.1" ),
+ JUNIT_4_4( "4.4" ),
+ JUNIT_4_5( "4.5" ),
+ JUNIT_4_6( "4.6" ),
+ JUNIT_4_7( "4.7" ),
+ JUNIT_4_8( "4.8" ),
+ JUNIT_4_8_1( "4.8.1" ),
+ JUNIT_4_8_2( "4.8.2" ),
+ JUNIT_4_9( "4.9" ),
+ JUNIT_4_10( "4.10" ),
+ JUNIT_4_11( "4.11" ),
+ JUNIT_4_12( "4.12" ),
+ VINTAGE_4_12_0_M2( "4.12.0-M2" )
+ {
+ @Override
+ public SurefireLauncher configure( SurefireLauncher launcher )
+ {
+ return super.configure( launcher ).activateProfile( "junit5-vintage" );
+ }
+ },
+ JUPITER_5_0_0_M2( "5.0.0-M2" )
+ {
+ @Override
+ public SurefireLauncher configure( SurefireLauncher launcher )
+ {
+ return super.configure( launcher ).activateProfile( "junit5-jupiter" );
+ }
+ };
+
+ private final String version;
+
+ JUnitVersion( String version )
+ {
+ this.version = version;
+ }
+
+ public SurefireLauncher configure( SurefireLauncher launcher )
+ {
+ return launcher.setJUnitVersion( version );
+ }
+
+ public String toString()
+ {
+ return version;
+ }
+}
[2/7] maven-surefire git commit: Reuse Junit4VersionsIT to also test
JUnit 5
Posted by ti...@apache.org.
Reuse Junit4VersionsIT to also test JUnit 5
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/8995a289
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/8995a289
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/8995a289
Branch: refs/heads/junit5
Commit: 8995a2894488d6ca3796f274498b1516cd2ed131
Parents: 108538b
Author: Benedikt Ritter <br...@apache.org>
Authored: Sun Oct 9 14:43:20 2016 +0200
Committer: Benedikt Ritter <br...@apache.org>
Committed: Sat Nov 19 14:02:07 2016 +0100
----------------------------------------------------------------------
.../maven/surefire/its/JUnit4VersionsIT.java | 23 +++-
.../src/test/resources/junit4/pom.xml | 108 ++++++++++++++-----
2 files changed, 104 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8995a289/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 8dd8f0c..bb216d3 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
@@ -31,6 +31,9 @@ import org.junit.runners.Parameterized.Parameter;
import static org.junit.runners.Parameterized.*;
+import static org.apache.commons.lang3.JavaVersion.JAVA_1_8;
+import static org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersion;
+
/**
* Basic suite test using all known versions of JUnit 4.x
*
@@ -79,9 +82,27 @@ public class JUnit4VersionsIT
runJUnitTest( version );
}
+ @Test
+ public void test500M2()
+ throws Exception
+ {
+ assumeJavaVersion( JAVA_1_8 );
+
+ runJUnitTest( "5.0.0-M2" );
+ }
+
public void runJUnitTest( String version )
throws Exception
{
- unpack().setJUnitVersion( version ).executeTest().verifyErrorFree( 1 );
+ unpack().setJUnitVersion( version ).activateProfile( getProfile( version ) ).executeTest().verifyErrorFree( 1 );
+ }
+
+ private String getProfile( String version )
+ {
+ if ( version.startsWith( "4" ) )
+ {
+ return "junit4";
+ }
+ return "junit5";
}
}
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8995a289/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 c10d8e9..1dd57b0 100644
--- a/surefire-integration-tests/src/test/resources/junit4/pom.xml
+++ b/surefire-integration-tests/src/test/resources/junit4/pom.xml
@@ -28,31 +28,87 @@
<version>1.0-SNAPSHOT</version>
<name>Test for JUnit 4</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${surefire.version}</version>
- </plugin>
- </plugins>
- </build>
+ <profiles>
+ <profile>
+ <id>junit4</id>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>junit5</id>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <java.version>1.8</java.version>
+ <junit.jupiter.version>5.0.0-M2</junit.jupiter.version>
+ <junit.vintage.version>4.12.0-M2</junit.vintage.version>
+ <junit.platform.version>1.0.0-M2</junit.platform.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <version>${junit.jupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>${junit.vintage.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>
+
</project>
[3/7] maven-surefire git commit: Add test using vintage engine
Posted by ti...@apache.org.
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>
[7/7] maven-surefire git commit: Move engines into plugin declaration
Posted by ti...@apache.org.
Move engines into plugin declaration
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/e4a5247a
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/e4a5247a
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/e4a5247a
Branch: refs/heads/junit5
Commit: e4a5247a74ad95d4b79c074402c959414dfa2732
Parents: 31b5592
Author: Benedikt Ritter <br...@apache.org>
Authored: Tue Nov 22 21:16:37 2016 +0100
Committer: Benedikt Ritter <br...@apache.org>
Committed: Tue Nov 22 21:16:37 2016 +0100
----------------------------------------------------------------------
.../maven/surefire/its/JUnit4VersionsIT.java | 10 +++----
.../src/test/resources/junit4/pom.xml | 29 +++++++-------------
2 files changed, 15 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/e4a5247a/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 2df3b1c..3d8eb1b 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
@@ -88,11 +88,6 @@ public class JUnit4VersionsIT
@Parameter
public JUnitVersion version;
- private SurefireLauncher unpack()
- {
- return unpack( "/junit4", version.toString() );
- }
-
@Test
public void testJunit()
throws Exception
@@ -106,4 +101,9 @@ public class JUnit4VersionsIT
version.configure( unpack() ).executeTest().verifyErrorFree( 1 );
}
+ private SurefireLauncher unpack()
+ {
+ return unpack( "/junit4", version.toString() );
+ }
+
}
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/e4a5247a/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 57e66b8..f107e65 100644
--- a/surefire-integration-tests/src/test/resources/junit4/pom.xml
+++ b/surefire-integration-tests/src/test/resources/junit4/pom.xml
@@ -89,15 +89,6 @@
<junit.platform.version>1.0.0-M2</junit.platform.version>
</properties>
- <dependencies>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <version>${junit.jupiter.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<build>
<plugins>
<plugin>
@@ -109,6 +100,11 @@
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <version>${junit.jupiter.version}</version>
+ </dependency>
</dependencies>
</plugin>
</plugins>
@@ -123,15 +119,6 @@
<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>
@@ -143,6 +130,11 @@
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
</dependencies>
</plugin>
</plugins>
@@ -150,5 +142,4 @@
</profile>
</profiles>
-
</project>