@@ -254,24 +254,23 @@ additional dependency to the runtime classpath.
254
254
[[running-tests-build-maven]]
255
255
==== Maven
256
256
257
- Starting with https://issues.apache.org/jira/browse/SUREFIRE-1330[version 2.22.0], Maven
258
- Surefire and Maven Failsafe provide
257
+ Maven Surefire and Maven Failsafe provide
259
258
https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html[native support]
260
259
for executing tests on the JUnit Platform. The `pom.xml` file in the
261
260
`{junit5-jupiter-starter-maven}` project demonstrates how to use the Maven Surefire plugin
262
261
and can serve as a starting point for configuring your Maven build.
263
262
264
263
[WARNING]
265
- .Use Maven Surefire/Failsafe 3.0.0-M4 or later to avoid interoperability issues
264
+ .Use recent version of Maven Surefire/Failsafe to avoid interoperability issues
266
265
====
267
- Maven Surefire/Failsafe 3.0.0-M4
268
- https://issues.apache.org/jira/browse/SUREFIRE-1585[introduced support] for aligning the
269
- version of the JUnit Platform Launcher it uses with the JUnit Platform version found on
270
- the test runtime classpath. Therefore, it is recommended to use version 3.0.0-M4 or later
271
- to avoid interoperability issues.
272
-
273
- Alternatively, you can add a test dependency on the matching version of the JUnit Platform
274
- Launcher to your Maven build as follows.
266
+ To avoid interoperability issues, it is recommended to use a recent version of Maven
267
+ Surefire/Failsafe (3.0.0 or later) because it automatically aligns the version of the
268
+ JUnit Platform Launcher that is used with the JUnit Platform version found on the test
269
+ runtime classpath.
270
+
271
+ If you are using a version older than 3.0.0-M4, you can work around the missing alignment
272
+ by adding a test dependency on the matching version of the JUnit Platform Launcher to your
273
+ Maven build as follows.
275
274
276
275
[source,xml]
277
276
[subs=attributes+]
0 commit comments