This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/master by this push:
     new 00567b96a Use newer version of surefire for itself testing, enable 
JUnit 5 in tests
00567b96a is described below

commit 00567b96a21aec9288870160022c917a91e33549
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Tue Mar 25 23:11:28 2025 +0100

    Use newer version of surefire for itself testing, enable JUnit 5 in tests
---
 maven-failsafe-plugin/pom.xml                      |   9 +-
 .../plugin/failsafe/IntegrationTestMojoTest.java   |  24 ++--
 .../maven/plugin/failsafe/JUnit4SuiteTest.java     |  44 -------
 .../failsafe/MarshallerUnmarshallerTest.java       |   8 +-
 .../maven/plugin/failsafe/RunResultTest.java       |  18 +--
 .../maven/plugin/failsafe/VerifyMojoTest.java      |  39 ++++---
 maven-surefire-common/pom.xml                      |  11 +-
 .../surefire/SurefireDependencyResolverTest.java   |   2 +
 .../org/apache/maven/surefire/JUnit4SuiteTest.java | 126 ---------------------
 maven-surefire-plugin/pom.xml                      |   7 +-
 maven-surefire-report-plugin/pom.xml               |  10 +-
 .../plugins/surefire/report/JUnit4SuiteTest.java   |  40 -------
 pom.xml                                            |   4 +-
 surefire-api/pom.xml                               |  10 +-
 .../java/org/apache/maven/JUnit4SuiteTest.java     |  83 --------------
 .../surefire/api/util/SureFireFileManagerTest.java |   6 +-
 surefire-booter/pom.xml                            |  10 +-
 .../maven/surefire/booter/JUnit4SuiteTest.java     |  51 ---------
 surefire-extensions-api/pom.xml                    |   9 +-
 .../extensions/CommandlineExecutorTest.java        |  18 +--
 .../surefire/extensions/JUnit4SuiteTest.java       |  35 ------
 surefire-grouper/pom.xml                           |   7 +-
 surefire-its/pom.xml                               |  20 ++--
 .../surefire/its/fixture/JUnit4SuiteTest.java      |  38 -------
 surefire-logger-api/pom.xml                        |  10 +-
 .../plugin/surefire/log/api/JUnit4SuiteTest.java   |  40 -------
 surefire-providers/common-java5/pom.xml            |   7 +-
 surefire-providers/common-junit3/pom.xml           |   3 +-
 surefire-providers/common-junit4/pom.xml           |   3 +-
 surefire-providers/common-junit48/pom.xml          |   3 +-
 surefire-providers/pom.xml                         |   2 +-
 surefire-providers/surefire-junit3/pom.xml         |   3 +-
 surefire-providers/surefire-junit4/pom.xml         |   3 +-
 surefire-providers/surefire-junit47/pom.xml        |   3 +-
 surefire-providers/surefire-testng-utils/pom.xml   |   3 +-
 surefire-providers/surefire-testng/pom.xml         |   1 +
 surefire-report-parser/pom.xml                     |  10 +-
 .../plugins/surefire/report/JUnit4SuiteTest.java   |  41 -------
 surefire-shadefire/pom.xml                         |   4 +-
 39 files changed, 147 insertions(+), 618 deletions(-)

diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml
index be4d2a70d..093f7cd8b 100644
--- a/maven-failsafe-plugin/pom.xml
+++ b/maven-failsafe-plugin/pom.xml
@@ -109,8 +109,8 @@
     </dependency>
 
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-api</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -151,16 +151,13 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
         </configuration>
         <dependencies>
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/IntegrationTestMojoTest.java
 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/IntegrationTestMojoTest.java
index 41ca92d82..648ab9e7c 100644
--- 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/IntegrationTestMojoTest.java
+++ 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/IntegrationTestMojoTest.java
@@ -25,8 +25,8 @@
 import org.apache.maven.artifact.DefaultArtifact;
 import 
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.project.MavenProject;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static 
org.apache.maven.artifact.versioning.VersionRange.createFromVersionSpec;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -36,11 +36,11 @@
 /**
  * @since 2.20
  */
-public class IntegrationTestMojoTest {
+class IntegrationTestMojoTest {
     private IntegrationTestMojo mojo;
 
-    @Before
-    public void init() throws InvalidVersionSpecificationException, 
IOException {
+    @BeforeEach
+    void init() throws InvalidVersionSpecificationException, IOException {
         Artifact artifact = new DefaultArtifact("g", "a", 
createFromVersionSpec("1.0"), "compile", "jar", "", null);
         artifact.setFile(new File("./target/tmp/a-1.0.jar"));
         new File("./target/tmp").mkdir();
@@ -52,14 +52,14 @@ public void init() throws 
InvalidVersionSpecificationException, IOException {
     }
 
     @Test
-    public void shouldBeJar() {
+    void shouldBeJar() {
         mojo.setDefaultClassesDirectory(new File("./target/classes"));
         File binaries = mojo.getMainBuildPath();
         assertThat(binaries.getName()).isEqualTo("a-1.0.jar");
     }
 
     @Test
-    public void shouldBeAnotherJar() {
+    void shouldBeAnotherJar() {
         mojo.setMainBuildPath(new File("./target/another-1.0.jar"));
         mojo.setDefaultClassesDirectory(new File("./target/classes"));
         File binaries = mojo.getMainBuildPath();
@@ -67,7 +67,7 @@ public void shouldBeAnotherJar() {
     }
 
     @Test
-    public void shouldBeClasses() {
+    void shouldBeClasses() {
         mojo.setMainBuildPath(new File("./target/classes"));
         mojo.setDefaultClassesDirectory(new File("./target/classes"));
         File binaries = mojo.getMainBuildPath();
@@ -75,24 +75,24 @@ public void shouldBeClasses() {
     }
 
     @Test
-    public void shouldGetNullEnv() {
+    void shouldGetNullEnv() {
         assertThat(mojo.getExcludedEnvironmentVariables()).hasSize(0);
     }
 
     @Test
-    public void shouldGetEnv() {
+    void shouldGetEnv() {
         mojo.setExcludedEnvironmentVariables(new String[] {"ABC", "KLM"});
         
assertThat(mojo.getExcludedEnvironmentVariables()).hasSize(2).contains("ABC", 
"KLM");
     }
 
     @Test
-    public void testShouldGetPropertyFile() {
+    void testShouldGetPropertyFile() {
         mojo.setSystemPropertiesFile(new File("testShouldGetPropertyFile"));
         assertThat(mojo.getSystemPropertiesFile()).isEqualTo(new 
File("testShouldGetPropertyFile"));
     }
 
     @Test
-    public void shouldHaveJUnit5EnginesFilter() {
+    void shouldHaveJUnit5EnginesFilter() {
         mojo.setIncludeJUnit5Engines(new String[] {"e1", "e2"});
         assertThat(mojo.getIncludeJUnit5Engines()).isEqualTo(new String[] 
{"e1", "e2"});
 
diff --git 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/JUnit4SuiteTest.java
 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/JUnit4SuiteTest.java
deleted file mode 100644
index d08f430d3..000000000
--- 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.plugin.failsafe;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 2.21.0
- */
-@SuiteClasses({
-    IntegrationTestMojoTest.class,
-    MarshallerUnmarshallerTest.class,
-    RunResultTest.class,
-    VerifyMojoTest.class
-})
-@RunWith(Suite.class)
-public class JUnit4SuiteTest {
-    public static Test suite() {
-        return new JUnit4TestAdapter(JUnit4SuiteTest.class);
-    }
-}
diff --git 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/MarshallerUnmarshallerTest.java
 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/MarshallerUnmarshallerTest.java
index 1872bda85..264240c88 100644
--- 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/MarshallerUnmarshallerTest.java
+++ 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/MarshallerUnmarshallerTest.java
@@ -23,16 +23,16 @@
 import org.apache.maven.plugin.failsafe.util.FailsafeSummaryXmlUtils;
 import org.apache.maven.surefire.api.suite.RunResult;
 import org.apache.maven.surefire.api.util.SureFireFileManager;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  *
  */
-public class MarshallerUnmarshallerTest {
+class MarshallerUnmarshallerTest {
     @Test
-    public void shouldUnmarshallExistingXmlFile() throws Exception {
+    void shouldUnmarshallExistingXmlFile() throws Exception {
         File xml = new 
File("target/test-classes/org/apache/maven/plugin/failsafe/failsafe-summary.xml");
         RunResult summary = FailsafeSummaryXmlUtils.toRunResult(xml);
 
@@ -56,7 +56,7 @@ public void shouldUnmarshallExistingXmlFile() throws 
Exception {
     }
 
     @Test
-    public void shouldMarshallAndUnmarshallSameXml() throws Exception {
+    void shouldMarshallAndUnmarshallSameXml() throws Exception {
         RunResult expected = new RunResult(
                 7,
                 1,
diff --git 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/RunResultTest.java
 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/RunResultTest.java
index 80d3eeaa4..29a2f3ebb 100644
--- 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/RunResultTest.java
+++ 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/RunResultTest.java
@@ -27,7 +27,7 @@
 import org.apache.maven.plugin.failsafe.util.FailsafeSummaryXmlUtils;
 import org.apache.maven.surefire.api.suite.RunResult;
 import org.apache.maven.surefire.api.util.SureFireFileManager;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -37,10 +37,10 @@
  * @since 2.20
  */
 @SuppressWarnings("checkstyle:magicnumber")
-public class RunResultTest {
+class RunResultTest {
 
     @Test
-    public void testAggregatedValues() {
+    void testAggregatedValues() {
         RunResult simple = getSimpleAggregate();
 
         assertThat(simple.getCompletedCount()).isEqualTo(20);
@@ -55,27 +55,27 @@ public void testAggregatedValues() {
     }
 
     @Test
-    public void testSerialization() throws Exception {
+    void testSerialization() throws Exception {
         writeReadCheck(getSimpleAggregate());
     }
 
     @Test
-    public void testFailures() throws Exception {
+    void testFailures() throws Exception {
         writeReadCheck(new RunResult(0, 1, 2, 3, "stacktraceHere", false));
     }
 
     @Test
-    public void testSkipped() throws Exception {
+    void testSkipped() throws Exception {
         writeReadCheck(new RunResult(3, 2, 1, 0, null, true));
     }
 
     @Test
-    public void testFlakes() throws Exception {
+    void testFlakes() throws Exception {
         writeReadCheck(new RunResult(3, 2, 1, 0, 2, null, true));
     }
 
     @Test
-    public void testLegacyDeserialization() throws Exception {
+    void testLegacyDeserialization() throws Exception {
         File legacySummary = SureFireFileManager.createTempFile("failsafe", 
"test");
         String legacyFailsafeSummaryXmlTemplate = "<?xml version=\"1.0\" 
encoding=\"UTF-8\"?>\n"
                 + "<failsafe-summary 
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
@@ -113,7 +113,7 @@ public void testLegacyDeserialization() throws Exception {
     }
 
     @Test
-    public void testAppendSerialization() throws Exception {
+    void testAppendSerialization() throws Exception {
         RunResult simpleAggregate = getSimpleAggregate();
         RunResult additional = new RunResult(2, 1, 2, 2, "msg " + ((char) 
0x0E01), true);
 
diff --git 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/VerifyMojoTest.java
 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/VerifyMojoTest.java
index 714ea6b25..7f042127f 100644
--- 
a/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/VerifyMojoTest.java
+++ 
b/maven-failsafe-plugin/src/test/java/org/apache/maven/plugin/failsafe/VerifyMojoTest.java
@@ -27,27 +27,27 @@
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 import org.slf4j.Logger;
 
+import static org.assertj.core.api.Assertions.assertThatCode;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-public class VerifyMojoTest {
+class VerifyMojoTest {
     private VerifyMojo mojo;
 
-    @Rule
-    public TemporaryFolder tempFolder = new TemporaryFolder();
+    @TempDir
+    private File tempFolder;
 
     private Logger logger = mock(Logger.class);
 
-    @Before
-    public void init() throws UnsupportedEncodingException {
+    @BeforeEach
+    void init() throws UnsupportedEncodingException {
         mojo = new VerifyMojo(logger);
-        mojo.setTestClassesDirectory(tempFolder.getRoot());
+        mojo.setTestClassesDirectory(tempFolder);
         mojo.setReportsDirectory(getTestBaseDir());
     }
 
@@ -71,26 +71,25 @@ private File getTestBaseDir() throws 
UnsupportedEncodingException {
         return new File(URLDecoder.decode(resource.getPath(), 
"UTF-8")).getAbsoluteFile();
     }
 
-    @Test(expected = MojoExecutionException.class)
-    public void executeForForkError()
-            throws MojoExecutionException, MojoFailureException, 
UnsupportedEncodingException {
+    @Test
+    void executeForForkError() throws UnsupportedEncodingException {
         setupExecuteMocks();
         mojo.setSummaryFile(new File(getTestBaseDir(), 
"failsafe-summary-booter-fork-error.xml"));
-        mojo.execute();
+
+        
assertThatCode(mojo::execute).isExactlyInstanceOf(MojoExecutionException.class);
     }
 
-    @Test(expected = MojoExecutionException.class)
-    public void executeForForkErrorTestFailureIgnore()
-            throws MojoExecutionException, MojoFailureException, 
UnsupportedEncodingException {
+    @Test
+    void executeForForkErrorTestFailureIgnore() throws 
UnsupportedEncodingException {
         setupExecuteMocks();
         mojo.setSummaryFile(new File(getTestBaseDir(), 
"failsafe-summary-booter-fork-error.xml"));
         mojo.setTestFailureIgnore(true);
-        mojo.execute();
+
+        
assertThatCode(mojo::execute).isExactlyInstanceOf(MojoExecutionException.class);
     }
 
     @Test
-    public void executeForPassingTests()
-            throws MojoExecutionException, MojoFailureException, 
UnsupportedEncodingException {
+    void executeForPassingTests() throws MojoExecutionException, 
MojoFailureException, UnsupportedEncodingException {
         setupExecuteMocks();
         mojo.setSummaryFile(new File(getTestBaseDir(), 
"failsafe-summary-success.xml"));
         mojo.execute();
diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml
index a221708a6..19ddb7b1c 100644
--- a/maven-surefire-common/pom.xml
+++ b/maven-surefire-common/pom.xml
@@ -133,6 +133,12 @@
       <scope>provided</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
+
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -201,9 +207,6 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <argLine>${jvm.args.tests}</argLine>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
           <systemPropertyVariables>
             
<jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
           </systemPropertyVariables>
@@ -212,8 +215,8 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireDependencyResolverTest.java
 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireDependencyResolverTest.java
index 60b942811..f39d431e1 100644
--- 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireDependencyResolverTest.java
+++ 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefireDependencyResolverTest.java
@@ -44,6 +44,7 @@
 import org.eclipse.aether.resolution.DependencyRequest;
 import org.eclipse.aether.resolution.DependencyResolutionException;
 import org.eclipse.aether.resolution.DependencyResult;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -105,6 +106,7 @@ public void shouldBeFailWithinRange() throws 
InvalidVersionSpecificationExceptio
     }
 
     @Test
+    @Ignore("old not executing tests - to review")
     public void testResolveArtifact()
             throws InvalidVersionSpecificationException, 
MojoExecutionException, DependencyResolutionException {
 
diff --git 
a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
 
b/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
deleted file mode 100644
index 316bc0407..000000000
--- 
a/maven-surefire-common/src/test/java/org/apache/maven/surefire/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.surefire;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.apache.maven.plugin.surefire.AbstractSurefireMojoJava7PlusTest;
-import 
org.apache.maven.plugin.surefire.AbstractSurefireMojoJunitCoreProvidersInfoTest;
-import org.apache.maven.plugin.surefire.AbstractSurefireMojoProvidersInfoTest;
-import org.apache.maven.plugin.surefire.AbstractSurefireMojoTest;
-import org.apache.maven.plugin.surefire.AbstractSurefireMojoToolchainsTest;
-import org.apache.maven.plugin.surefire.CommonReflectorTest;
-import org.apache.maven.plugin.surefire.MojoMocklessTest;
-import org.apache.maven.plugin.surefire.SurefireHelperTest;
-import org.apache.maven.plugin.surefire.SurefirePropertiesTest;
-import 
org.apache.maven.plugin.surefire.booterclient.BooterDeserializerProviderConfigurationTest;
-import 
org.apache.maven.plugin.surefire.booterclient.BooterDeserializerStartupConfigurationTest;
-import org.apache.maven.plugin.surefire.booterclient.ChecksumCalculatorTest;
-import 
org.apache.maven.plugin.surefire.booterclient.DefaultForkConfigurationTest;
-import org.apache.maven.plugin.surefire.booterclient.ForkConfigurationTest;
-import org.apache.maven.plugin.surefire.booterclient.ForkStarterTest;
-import org.apache.maven.plugin.surefire.booterclient.ForkingRunListenerTest;
-import 
org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfigurationTest;
-import 
org.apache.maven.plugin.surefire.booterclient.ModularClasspathForkConfigurationTest;
-import 
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestLessInputStreamBuilderTest;
-import 
org.apache.maven.plugin.surefire.booterclient.lazytestprovider.TestProvidingInputStreamTest;
-import org.apache.maven.plugin.surefire.booterclient.output.ForkClientTest;
-import 
org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumerTest;
-import org.apache.maven.plugin.surefire.extensions.ConsoleOutputReporterTest;
-import org.apache.maven.plugin.surefire.extensions.E2ETest;
-import org.apache.maven.plugin.surefire.extensions.EventConsumerThreadTest;
-import 
org.apache.maven.plugin.surefire.extensions.ForkedProcessEventNotifierTest;
-import org.apache.maven.plugin.surefire.extensions.StatelessReporterTest;
-import org.apache.maven.plugin.surefire.extensions.StreamFeederTest;
-import org.apache.maven.plugin.surefire.report.DefaultReporterFactoryTest;
-import org.apache.maven.plugin.surefire.report.StatelessXmlReporterTest;
-import org.apache.maven.plugin.surefire.report.TestSetStatsTest;
-import org.apache.maven.plugin.surefire.report.WrappedReportEntryTest;
-import org.apache.maven.plugin.surefire.runorder.RunEntryStatisticsMapTest;
-import org.apache.maven.plugin.surefire.util.DependenciesScannerTest;
-import org.apache.maven.plugin.surefire.util.DirectoryScannerTest;
-import org.apache.maven.plugin.surefire.util.ScannerUtilTest;
-import org.apache.maven.plugin.surefire.util.SpecificFileFilterTest;
-import org.apache.maven.surefire.extensions.ForkChannelTest;
-import org.apache.maven.surefire.extensions.StatelessTestsetInfoReporterTest;
-import org.apache.maven.surefire.report.FileReporterTest;
-import org.apache.maven.surefire.report.RunStatisticsTest;
-import org.apache.maven.surefire.spi.SPITest;
-import org.apache.maven.surefire.stream.EventDecoderTest;
-import org.apache.maven.surefire.util.RelocatorTest;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 2.19
- */
-public class JUnit4SuiteTest extends TestCase {
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        suite.addTestSuite(RelocatorTest.class);
-        suite.addTestSuite(RunStatisticsTest.class);
-        suite.addTestSuite(FileReporterTest.class);
-        
suite.addTestSuite(org.apache.maven.surefire.report.ConsoleOutputFileReporterTest.class);
-        suite.addTestSuite(SurefirePropertiesTest.class);
-        suite.addTestSuite(SpecificFileFilterTest.class);
-        suite.addTest(new JUnit4TestAdapter(DirectoryScannerTest.class));
-        suite.addTest(new JUnit4TestAdapter(DependenciesScannerTest.class));
-        suite.addTestSuite(RunEntryStatisticsMapTest.class);
-        suite.addTestSuite(WrappedReportEntryTest.class);
-        suite.addTestSuite(StatelessXmlReporterTest.class);
-        suite.addTestSuite(DefaultReporterFactoryTest.class);
-        suite.addTestSuite(ForkingRunListenerTest.class);
-        suite.addTest(new JUnit4TestAdapter(ForkConfigurationTest.class));
-        suite.addTestSuite(BooterDeserializerStartupConfigurationTest.class);
-        suite.addTestSuite(BooterDeserializerProviderConfigurationTest.class);
-        suite.addTest(new 
JUnit4TestAdapter(TestProvidingInputStreamTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(TestLessInputStreamBuilderTest.class));
-        suite.addTest(new JUnit4TestAdapter(SPITest.class));
-        suite.addTest(new JUnit4TestAdapter(SurefireHelperTest.class));
-        suite.addTest(new JUnit4TestAdapter(AbstractSurefireMojoTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(DefaultForkConfigurationTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(JarManifestForkConfigurationTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(ModularClasspathForkConfigurationTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(AbstractSurefireMojoJava7PlusTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(AbstractSurefireMojoToolchainsTest.class));
-        suite.addTest(new JUnit4TestAdapter(ScannerUtilTest.class));
-        suite.addTest(new JUnit4TestAdapter(MojoMocklessTest.class));
-        suite.addTest(new JUnit4TestAdapter(ForkClientTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(ForkedProcessEventNotifierTest.class));
-        suite.addTest(new JUnit4TestAdapter(ConsoleOutputReporterTest.class));
-        suite.addTest(new JUnit4TestAdapter(StatelessReporterTest.class));
-        suite.addTest(new JUnit4TestAdapter(TestSetStatsTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(StatelessTestsetInfoReporterTest.class));
-        suite.addTest(new JUnit4TestAdapter(CommonReflectorTest.class));
-        suite.addTest(new JUnit4TestAdapter(ForkStarterTest.class));
-        suite.addTest(new JUnit4TestAdapter(ForkChannelTest.class));
-        suite.addTest(new JUnit4TestAdapter(StreamFeederTest.class));
-        suite.addTest(new JUnit4TestAdapter(E2ETest.class));
-        suite.addTest(new JUnit4TestAdapter(ThreadedStreamConsumerTest.class));
-        suite.addTest(new JUnit4TestAdapter(EventDecoderTest.class));
-        suite.addTest(new JUnit4TestAdapter(EventConsumerThreadTest.class));
-        suite.addTest(new JUnit4TestAdapter(ChecksumCalculatorTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(AbstractSurefireMojoJunitCoreProvidersInfoTest.class));
-        suite.addTest(new 
JUnit4TestAdapter(AbstractSurefireMojoProvidersInfoTest.class));
-        return suite;
-    }
-}
diff --git a/maven-surefire-plugin/pom.xml b/maven-surefire-plugin/pom.xml
index 678c52b14..3f4e29c52 100644
--- a/maven-surefire-plugin/pom.xml
+++ b/maven-surefire-plugin/pom.xml
@@ -78,6 +78,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -111,8 +116,8 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/maven-surefire-report-plugin/pom.xml 
b/maven-surefire-report-plugin/pom.xml
index 7717d840c..1c72349a8 100644
--- a/maven-surefire-report-plugin/pom.xml
+++ b/maven-surefire-report-plugin/pom.xml
@@ -140,6 +140,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -216,9 +221,6 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
           <classpathDependencyExcludes>
             
<classpathDependencyExclude>org.fusesource.jansi:jansi</classpathDependencyExclude>
           </classpathDependencyExcludes>
@@ -227,8 +229,8 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git 
a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
 
b/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
deleted file mode 100644
index fc1eaefd3..000000000
--- 
a/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.plugins.surefire.report;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 3.0.0-M4
- */
-public class JUnit4SuiteTest extends TestCase {
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        suite.addTest(new JUnit4TestAdapter(Surefire597Test.class));
-        suite.addTest(new 
JUnit4TestAdapter(SurefireSchemaValidationTest.class));
-        suite.addTestSuite(SurefireReportTest.class);
-        return suite;
-    }
-}
diff --git a/pom.xml b/pom.xml
index 7dea3b184..91ea674ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -320,7 +320,7 @@
         </plugin>
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>3.5.0</version>
+          <version>3.5.2</version>
           <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
           <configuration>
             <!-- NOTE: Be sure to isolate the Surefire version under test from 
the version running the tests! -->
@@ -467,8 +467,8 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-report-plugin</artifactId>
-        <version>3.5.0</version>
         <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+        <version>3.5.2</version>
       </plugin>
     </plugins>
   </reporting>
diff --git a/surefire-api/pom.xml b/surefire-api/pom.xml
index a50acf64a..b8c4678b1 100644
--- a/surefire-api/pom.xml
+++ b/surefire-api/pom.xml
@@ -52,6 +52,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -90,16 +95,13 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
         </configuration>
         <dependencies>
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java 
b/surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java
deleted file mode 100644
index f67b4f0e9..000000000
--- a/surefire-api/src/test/java/org/apache/maven/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import org.apache.maven.surefire.SpecificTestClassFilterTest;
-import org.apache.maven.surefire.api.booter.ForkingRunListenerTest;
-import org.apache.maven.surefire.api.report.LegacyPojoStackTraceWriterTest;
-import org.apache.maven.surefire.api.runorder.ThreadedExecutionSchedulerTest;
-import org.apache.maven.surefire.api.stream.AbstractStreamDecoderTest;
-import org.apache.maven.surefire.api.stream.AbstractStreamEncoderTest;
-import org.apache.maven.surefire.api.suite.RunResultTest;
-import org.apache.maven.surefire.api.testset.FundamentalFilterTest;
-import org.apache.maven.surefire.api.testset.ResolvedTestTest;
-import org.apache.maven.surefire.api.testset.TestListResolverTest;
-import org.apache.maven.surefire.api.util.DefaultDirectoryScannerTest;
-import org.apache.maven.surefire.api.util.ReflectionUtilsTest;
-import org.apache.maven.surefire.api.util.RunOrderCalculatorTest;
-import org.apache.maven.surefire.api.util.RunOrderTest;
-import org.apache.maven.surefire.api.util.ScanResultTest;
-import org.apache.maven.surefire.api.util.TestsToRunTest;
-import org.apache.maven.surefire.api.util.internal.AsyncSocketTest;
-import org.apache.maven.surefire.api.util.internal.ChannelsReaderTest;
-import org.apache.maven.surefire.api.util.internal.ChannelsWriterTest;
-import org.apache.maven.surefire.api.util.internal.ConcurrencyUtilsTest;
-import org.apache.maven.surefire.api.util.internal.ImmutableMapTest;
-import org.apache.maven.surefire.api.util.internal.ObjectUtilsTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 2.19
- */
[email protected]({
-    ThreadedExecutionSchedulerTest.class,
-    ForkingRunListenerTest.class,
-    LegacyPojoStackTraceWriterTest.class,
-    RunResultTest.class,
-    ResolvedTestTest.class,
-    TestListResolverTest.class,
-    ConcurrencyUtilsTest.class,
-    DefaultDirectoryScannerTest.class,
-    RunOrderCalculatorTest.class,
-    RunOrderTest.class,
-    ScanResultTest.class,
-    TestsToRunTest.class,
-    SpecificTestClassFilterTest.class,
-    FundamentalFilterTest.class,
-    ImmutableMapTest.class,
-    ReflectionUtilsTest.class,
-    ChannelsReaderTest.class,
-    ChannelsWriterTest.class,
-    AsyncSocketTest.class,
-    AbstractStreamEncoderTest.class,
-    AbstractStreamDecoderTest.class,
-    ObjectUtilsTest.class
-})
-@RunWith(Suite.class)
-public class JUnit4SuiteTest {
-    public static Test suite() {
-        return new JUnit4TestAdapter(JUnit4SuiteTest.class);
-    }
-}
diff --git 
a/surefire-api/src/test/java/org/apache/maven/surefire/api/util/SureFireFileManagerTest.java
 
b/surefire-api/src/test/java/org/apache/maven/surefire/api/util/SureFireFileManagerTest.java
index 27c21e8a9..1dc0b600e 100644
--- 
a/surefire-api/src/test/java/org/apache/maven/surefire/api/util/SureFireFileManagerTest.java
+++ 
b/surefire-api/src/test/java/org/apache/maven/surefire/api/util/SureFireFileManagerTest.java
@@ -26,19 +26,21 @@
 import java.nio.file.attribute.PosixFilePermissions;
 import java.util.Set;
 
-import junit.framework.TestCase;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Unit test for the surefire instance of temp file manager.
  *
  * @author Markus Spann
  */
-public class SureFireFileManagerTest extends TestCase {
+public class SureFireFileManagerTest {
 
     @Test
+    @Ignore("old not executing tests - to review")
     public void testCreateTempFile() throws IOException {
 
         File tempFile = SureFireFileManager.createTempFile("sfprefix", 
"sfsuffix");
diff --git a/surefire-booter/pom.xml b/surefire-booter/pom.xml
index 9b3e5c1cf..b6001e8df 100644
--- a/surefire-booter/pom.xml
+++ b/surefire-booter/pom.xml
@@ -61,6 +61,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -127,16 +132,13 @@
           <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
           <useFile>true</useFile>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
         </configuration>
         <dependencies>
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git 
a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java
 
b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java
deleted file mode 100644
index 4881bb369..000000000
--- 
a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.surefire.booter;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.apache.maven.surefire.booter.spi.CommandChannelDecoderTest;
-import org.apache.maven.surefire.booter.spi.EventChannelEncoderTest;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 2.19
- */
-public class JUnit4SuiteTest extends TestCase {
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        suite.addTest(new JUnit4TestAdapter(CommandReaderTest.class));
-        suite.addTest(new JUnit4TestAdapter(PpidCheckerTest.class));
-        suite.addTest(new JUnit4TestAdapter(SystemUtilsTest.class));
-        suite.addTest(new JUnit4TestAdapter(IsolatedClassLoaderTest.class));
-        suite.addTest(new JUnit4TestAdapter(ForkedBooterTest.class));
-        suite.addTest(new JUnit4TestAdapter(ForkedBooterMockTest.class));
-        suite.addTest(new JUnit4TestAdapter(BooterDeserializerTest.class));
-        suite.addTestSuite(ClasspathTest.class);
-        suite.addTestSuite(PropertiesWrapperTest.class);
-        suite.addTest(new JUnit4TestAdapter(CommandChannelDecoderTest.class));
-        suite.addTest(new JUnit4TestAdapter(EventChannelEncoderTest.class));
-        suite.addTestSuite(SurefireReflectorTest.class);
-        return suite;
-    }
-}
diff --git a/surefire-extensions-api/pom.xml b/surefire-extensions-api/pom.xml
index 2daa13d1a..66e183f74 100644
--- a/surefire-extensions-api/pom.xml
+++ b/surefire-extensions-api/pom.xml
@@ -52,8 +52,8 @@
       <artifactId>surefire-shared-utils</artifactId>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-api</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -89,16 +89,13 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
         </configuration>
         <dependencies>
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git 
a/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java
 
b/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java
index 1443947df..d7d4946f9 100644
--- 
a/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java
+++ 
b/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/CommandlineExecutorTest.java
@@ -27,9 +27,9 @@
 import org.apache.maven.surefire.extensions.util.CountdownCloseable;
 import org.apache.maven.surefire.extensions.util.LineConsumerThread;
 import org.apache.maven.surefire.shared.utils.cli.Commandline;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.maven.surefire.shared.lang3.SystemUtils.IS_OS_WINDOWS;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -41,14 +41,14 @@
 /**
  *
  */
-public class CommandlineExecutorTest {
+class CommandlineExecutorTest {
     private CommandlineExecutor exec;
     private CommandlineStreams streams;
     private String baseDir;
     private LineConsumerThread out;
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeEach
+    void setUp() throws Exception {
         baseDir = System.getProperty("user.dir");
 
         delete(Paths.get(baseDir, "target", 
"CommandlineExecutorTest").toFile());
@@ -65,8 +65,8 @@ public void setUp() throws Exception {
         assertThat(createdFile).isTrue();
     }
 
-    @After
-    public void tearDown() throws Exception {
+    @AfterEach
+    void tearDown() throws Exception {
         if (out != null) {
             out.close();
         }
@@ -76,7 +76,7 @@ public void tearDown() throws Exception {
     }
 
     @Test
-    public void shouldExecuteNativeCommand() throws Exception {
+    void shouldExecuteNativeCommand() throws Exception {
         Closeable closer = mock(Closeable.class);
         Commandline cli = new Commandline(IS_OS_WINDOWS ? "dir" : "ls -la");
         cli.setWorkingDirectory(
diff --git 
a/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/JUnit4SuiteTest.java
 
b/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/JUnit4SuiteTest.java
deleted file mode 100644
index d17e9a664..000000000
--- 
a/surefire-extensions-api/src/test/java/org/apache/maven/plugin/surefire/extensions/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.plugin.surefire.extensions;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- *
- */
-public class JUnit4SuiteTest extends TestCase {
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        suite.addTest(new JUnit4TestAdapter(CommandlineExecutorTest.class));
-        return suite;
-    }
-}
diff --git a/surefire-grouper/pom.xml b/surefire-grouper/pom.xml
index f467faacf..0df4c447c 100644
--- a/surefire-grouper/pom.xml
+++ b/surefire-grouper/pom.xml
@@ -37,6 +37,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
@@ -85,8 +90,8 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-its/pom.xml b/surefire-its/pom.xml
index 20ec388d7..8770914ed 100644
--- a/surefire-its/pom.xml
+++ b/surefire-its/pom.xml
@@ -100,6 +100,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -147,7 +152,7 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <includes>
-            
<include>org/apache/maven/surefire/its/fixture/JUnit4SuiteTest.java</include>
+            <include>**/*Test.java</include>
           </includes>
           <systemPropertyVariables>
             
<maven.settings.file>${project.build.directory}/private/settings.xml</maven.settings.file>
@@ -157,8 +162,8 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
@@ -215,9 +220,6 @@
               <rerunFailingTestsCount>1</rerunFailingTestsCount>
               <perCoreThreadCount>false</perCoreThreadCount>
               <argLine>-server -Xmx64m -XX:+UseG1GC -XX:+TieredCompilation 
-XX:TieredStopAtLevel=1 -Djava.awt.headless=true 
-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
-              <includes>
-                <include>org/apache/**/*IT*.java</include>
-              </includes>
               <!-- Pass current surefire version to the main suite so that it 
-->
               <!-- can forward to all integration test projects. SUREFIRE-513 
-->
               <systemPropertyVariables>
@@ -232,14 +234,6 @@
               <redirectTestOutputToFile>true</redirectTestOutputToFile>
               <shutdown>kill</shutdown>
             </configuration>
-            <dependencies>
-              <dependency>
-                <groupId>org.apache.maven.surefire</groupId>
-                <artifactId>surefire-junit47</artifactId>
-                <version>3.5.0</version>
-                <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
-              </dependency>
-            </dependencies>
             <executions>
               <execution>
                 <goals>
diff --git 
a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/JUnit4SuiteTest.java
 
b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/JUnit4SuiteTest.java
deleted file mode 100644
index 04fc5a1b6..000000000
--- 
a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.surefire.its.fixture;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 2.21.0
- */
[email protected]({MavenLauncherTest.class, SurefireLauncherTest.class})
-@RunWith(Suite.class)
-public class JUnit4SuiteTest {
-    public static Test suite() {
-        return new JUnit4TestAdapter(JUnit4SuiteTest.class);
-    }
-}
diff --git a/surefire-logger-api/pom.xml b/surefire-logger-api/pom.xml
index f62138987..247ea468f 100644
--- a/surefire-logger-api/pom.xml
+++ b/surefire-logger-api/pom.xml
@@ -53,6 +53,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -86,16 +91,13 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
         </configuration>
         <dependencies>
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git 
a/surefire-logger-api/src/test/java/org/apache/maven/plugin/surefire/log/api/JUnit4SuiteTest.java
 
b/surefire-logger-api/src/test/java/org/apache/maven/plugin/surefire/log/api/JUnit4SuiteTest.java
deleted file mode 100644
index 75cedc65c..000000000
--- 
a/surefire-logger-api/src/test/java/org/apache/maven/plugin/surefire/log/api/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.plugin.surefire.log.api;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 3.0.0-M4
- */
-@SuiteClasses({ConsoleLoggerUtilsTest.class, LevelTest.class, 
LoggersTest.class})
-@RunWith(Suite.class)
-public class JUnit4SuiteTest extends TestCase {
-    public static Test suite() {
-        return new JUnit4TestAdapter(JUnit4SuiteTest.class);
-    }
-}
diff --git a/surefire-providers/common-java5/pom.xml 
b/surefire-providers/common-java5/pom.xml
index e926ead92..61e46388e 100644
--- a/surefire-providers/common-java5/pom.xml
+++ b/surefire-providers/common-java5/pom.xml
@@ -42,6 +42,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -75,8 +80,8 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/common-junit3/pom.xml 
b/surefire-providers/common-junit3/pom.xml
index ddfa533c5..9132d46b2 100644
--- a/surefire-providers/common-junit3/pom.xml
+++ b/surefire-providers/common-junit3/pom.xml
@@ -66,8 +66,9 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 3.8.1 is not supported by 
vintage -->
+            <version>3.5.0</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/common-junit4/pom.xml 
b/surefire-providers/common-junit4/pom.xml
index ca3bfff09..ff65804da 100644
--- a/surefire-providers/common-junit4/pom.xml
+++ b/surefire-providers/common-junit4/pom.xml
@@ -85,8 +85,9 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 4.0 is not supported by 
vintage -->
+            <version>3.5.0</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/common-junit48/pom.xml 
b/surefire-providers/common-junit48/pom.xml
index 117b82855..ff630b355 100644
--- a/surefire-providers/common-junit48/pom.xml
+++ b/surefire-providers/common-junit48/pom.xml
@@ -128,8 +128,9 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 4.8, 4.10 is not supported 
by vintage -->
+            <version>3.5.0</version>
           </dependency>
         </dependencies>
         <executions>
diff --git a/surefire-providers/pom.xml b/surefire-providers/pom.xml
index 072c685f7..e3e550c9a 100644
--- a/surefire-providers/pom.xml
+++ b/surefire-providers/pom.xml
@@ -61,8 +61,8 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/surefire-junit3/pom.xml 
b/surefire-providers/surefire-junit3/pom.xml
index 046d2c17e..0f1feea9a 100644
--- a/surefire-providers/surefire-junit3/pom.xml
+++ b/surefire-providers/surefire-junit3/pom.xml
@@ -81,8 +81,9 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 3.8.1 is not supported by 
vintage -->
+            <version>3.5.0</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/surefire-junit4/pom.xml 
b/surefire-providers/surefire-junit4/pom.xml
index 8a4126e4c..f3150c038 100644
--- a/surefire-providers/surefire-junit4/pom.xml
+++ b/surefire-providers/surefire-junit4/pom.xml
@@ -84,8 +84,9 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 4.0 is not supported by 
vintage -->
+            <version>3.5.0</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/surefire-junit47/pom.xml 
b/surefire-providers/surefire-junit47/pom.xml
index 1f54b99cf..e66156249 100644
--- a/surefire-providers/surefire-junit47/pom.xml
+++ b/surefire-providers/surefire-junit47/pom.xml
@@ -112,8 +112,9 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 4.8.2 is not supported by 
vintage -->
+            <version>3.5.0</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/surefire-testng-utils/pom.xml 
b/surefire-providers/surefire-testng-utils/pom.xml
index 19d6d0334..33ec996ea 100644
--- a/surefire-providers/surefire-testng-utils/pom.xml
+++ b/surefire-providers/surefire-testng-utils/pom.xml
@@ -78,8 +78,9 @@
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 3.8.2 is not supported by 
vintage -->
+            <version>3.5.0</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git a/surefire-providers/surefire-testng/pom.xml 
b/surefire-providers/surefire-testng/pom.xml
index f9aa4c633..b43cc513f 100644
--- a/surefire-providers/surefire-testng/pom.xml
+++ b/surefire-providers/surefire-testng/pom.xml
@@ -103,6 +103,7 @@
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <!-- use old JUnit 3 provider as JUnit 3.8.2 is not supported by 
vintage -->
             <version>3.5.0</version>
           </dependency>
         </dependencies>
diff --git a/surefire-report-parser/pom.xml b/surefire-report-parser/pom.xml
index 521926d49..629db8635 100644
--- a/surefire-report-parser/pom.xml
+++ b/surefire-report-parser/pom.xml
@@ -47,6 +47,11 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.vintage</groupId>
+      <artifactId>junit-vintage-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
@@ -74,16 +79,13 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <argLine>${jvm.args.tests} ${jacoco.agent}</argLine>
-          <includes>
-            <include>**/JUnit4SuiteTest.java</include>
-          </includes>
         </configuration>
         <dependencies>
           <dependency>
             <groupId>org.apache.maven.surefire</groupId>
             <artifactId>surefire-shadefire</artifactId>
-            <version>3.5.0</version>
             <!-- ${shadedVersion}, but resolved due to 
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+            <version>3.5.2</version>
           </dependency>
         </dependencies>
       </plugin>
diff --git 
a/surefire-report-parser/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
 
b/surefire-report-parser/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
deleted file mode 100644
index 8ca494c3e..000000000
--- 
a/surefire-report-parser/src/test/java/org/apache/maven/plugins/surefire/report/JUnit4SuiteTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-package org.apache.maven.plugins.surefire.report;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Adapt the JUnit4 tests which use only annotations to the JUnit3 test suite.
- *
- * @author Tibor Digana (tibor17)
- * @since 2.21.0
- */
-public class JUnit4SuiteTest extends TestCase {
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        suite.addTestSuite(ReportTestCaseTest.class);
-        suite.addTestSuite(ReportTestSuiteTest.class);
-        suite.addTestSuite(SurefireReportParserTest.class);
-        suite.addTest(new JUnit4TestAdapter(TestSuiteXmlParserTest.class));
-        return suite;
-    }
-}
diff --git a/surefire-shadefire/pom.xml b/surefire-shadefire/pom.xml
index 87d78d1be..b57ecdedc 100644
--- a/surefire-shadefire/pom.xml
+++ b/surefire-shadefire/pom.xml
@@ -28,8 +28,8 @@
 
   <artifactId>surefire-shadefire</artifactId>
 
-  <name>ShadeFire JUnit3 Provider</name>
-  <description>A super-shaded junit3 provider that is used by surefire to 
build itself,
+  <name>ShadeFire JUnit5 Provider</name>
+  <description>A super-shaded JUnit 5 provider that is used by surefire to 
build itself,
     that basically has ALL classes relocated to facilitate no API-conflict 
whatsoever with ourself.
     The only remaining point of conflict is around the booter properties file 
format.</description>
 

Reply via email to