[SPARK-44170][BUILD][FOLLOWUP] Align JUnit5 dependency's version and clean up exclusions
### What changes were proposed in this pull request?
Align JUnit5 dependency's version clean up redundant exclusion in `pom.xml`
### Why are the changes needed?
Simplify removing the exclusion of jupiter dependencies in `pom.xml` would cause inconsistent version combinations and fail the Maven test, we should align all jupiter dependencies' versions in `<dependencyManagement>` to make sure the version combination is consistent.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Pass GA.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #46160 from pan3793/SPARK-44170-followup.
Lead-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
diff --git a/pom.xml b/pom.xml
index a9a4951..03c6b75 100644
--- a/pom.xml
+++ b/pom.xml
@@ -220,6 +220,9 @@
<netty.version>4.1.109.Final</netty.version>
<netty-tcnative.version>2.0.65.Final</netty-tcnative.version>
<icu4j.version>72.1</icu4j.version>
+ <junit-jupiter.version>5.9.3</junit-jupiter.version>
+ <junit-platform.version>1.9.3</junit-platform.version>
+ <sbt-jupiter-interface.version>0.11.1</sbt-jupiter-interface.version>
<!--
If you are changing Arrow version specification, please check
./python/pyspark/sql/pandas/utils.py, ./python/packaging/classic/setup.py
@@ -1079,15 +1082,6 @@
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-simple</artifactId>
<version>${jersey.version}</version>
- <!--
- TODO(SPARK-44170): Remove the exclusion of jupiter after Spark migrates to Junit5.
- -->
- <exclusions>
- <exclusion>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
<scope>test</scope>
</dependency>
<dependency>
@@ -1215,16 +1209,6 @@
<groupId>org.jmock</groupId>
<artifactId>jmock-junit5</artifactId>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.junit.platform</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
<version>2.13.1</version>
</dependency>
<dependency>
@@ -1236,13 +1220,49 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
- <version>5.9.3</version>
+ <version>${junit-jupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <version>${junit-jupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <version>${junit-jupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-params</artifactId>
+ <version>${junit-jupiter.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>${junit-platform.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <version>${junit-platform.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-launcher</artifactId>
+ <version>${junit-platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.aichler</groupId>
<artifactId>jupiter-interface</artifactId>
- <version>0.11.1</version>
+ <version>${sbt-jupiter-interface.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -1349,13 +1369,6 @@
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>${curator.version}</version>
- <!-- TODO(SPARK-44170): Remove this `exclusion` after Spark starts supporting JUnit5. -->
- <exclusions>
- <exclusion>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- </exclusion>
- </exclusions>
<scope>test</scope>
</dependency>
<!-- Hadoop 3.x dependencies -->