This is an automated email from the ASF dual-hosted git repository.
wgtmac pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-java.git
The following commit(s) were added to refs/heads/master by this push:
new 83c2c80d4 GH-3618: Ban JUnit4 imports (#3681)
83c2c80d4 is described below
commit 83c2c80d49c57b1ae180df45229ee01dbceddc1e
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Wed Jul 22 11:18:57 2026 +0200
GH-3618: Ban JUnit4 imports (#3681)
---
pom.xml | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/pom.xml b/pom.xml
index d49e27de5..39cda88c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -310,6 +310,13 @@
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>de.skuzzle.enforcer</groupId>
+ <artifactId>restrict-imports-enforcer-rule</artifactId>
+ <version>3.0.0</version>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<id>enforce-banned-dependencies</id>
@@ -328,6 +335,34 @@
<fail>true</fail>
</configuration>
</execution>
+ <execution>
+ <id>enforce-banned-junit4-imports</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <RestrictImports>
+ <reason>Use JUnit 5 (org.junit.jupiter.*) and AssertJ
instead of JUnit 4</reason>
+ <includeTestCode>true</includeTestCode>
+ <bannedImports>
+ <bannedImport>org.junit.**</bannedImport>
+ <bannedImport>junit.framework.**</bannedImport>
+ </bannedImports>
+ <allowedImports>
+ <allowedImport>org.junit.jupiter.**</allowedImport>
+ <allowedImport>org.junit.platform.**</allowedImport>
+ </allowedImports>
+ <!-- Benchmark tests rely on JUnit 4 @Rule via
junit-benchmarks with jupiter migration support -->
+ <exclusions>
+
<exclusion>org.apache.parquet.column.values.**.benchmark.**</exclusion>
+ </exclusions>
+ </RestrictImports>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>