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

kwin 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 96128a573 [SUREFIRE-2240] Don't manage JUnit5 artifact versions (#725)
96128a573 is described below

commit 96128a573add4016cd38405dee0cec00aec20249
Author: Konrad Windszus <k...@apache.org>
AuthorDate: Thu Mar 7 14:51:14 2024 +0100

    [SUREFIRE-2240] Don't manage JUnit5 artifact versions (#725)
    
    This allows to more easily overwrite the version via plugin dependencies
---
 pom.xml                                            |  8 --------
 surefire-providers/surefire-junit-platform/pom.xml | 10 ++++++++++
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/pom.xml b/pom.xml
index 83acbf137..0fd6ce490 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,14 +308,6 @@
         <version>${jacocoVersion}</version>
         <classifier>runtime</classifier>
       </dependency>
-      <dependency>
-        <!-- Do not upgrade, leads to test failures, needs analysis -->
-        <groupId>org.junit</groupId>
-        <artifactId>junit-bom</artifactId>
-        <version>5.9.3</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
     </dependencies>
   </dependencyManagement>
   <dependencies>
diff --git a/surefire-providers/surefire-junit-platform/pom.xml 
b/surefire-providers/surefire-junit-platform/pom.xml
index 4914a82b1..67387452b 100644
--- a/surefire-providers/surefire-junit-platform/pom.xml
+++ b/surefire-providers/surefire-junit-platform/pom.xml
@@ -80,6 +80,13 @@
     <tag>surefire-3.0.0-M8</tag>
   </scm>
 
+  <properties>
+    <!-- common version suffix by platform and other junit5 artifacts, compare 
with https://github.com/junit-team/junit5/blob/main/gradle.properties -->
+    <junit5VersionSuffix>9.3</junit5VersionSuffix>
+    <junit5Version>5.${junit5VersionSuffix}</junit5Version>
+    <junitPlatformVersion>1.${junit5VersionSuffix}</junitPlatformVersion>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.surefire</groupId>
@@ -89,15 +96,18 @@
     <dependency>
       <groupId>org.junit.platform</groupId>
       <artifactId>junit-platform-launcher</artifactId>
+      <version>${junitPlatformVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-engine</artifactId>
+      <version>${junit5Version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-params</artifactId>
+      <version>${junit5Version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Reply via email to