From faa656992e419f1e15f7f146c5e5666f32100cfd Mon Sep 17 00:00:00 2001 From: davedwwang Date: Fri, 12 Dec 2025 23:02:56 +0800 Subject: [PATCH] [Bug]: JUnit 4 tests are skipped without warning --- pom.xml | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/pom.xml b/pom.xml index 41c26c4d9f..b0788ffb77 100644 --- a/pom.xml +++ b/pom.xml @@ -72,6 +72,7 @@ 11 11 + 1.8 ${java.source.version} ${java.target.version} 3.9.11 @@ -1308,6 +1309,12 @@ test + + org.junit.vintage + junit-vintage-engine + test + + org.mockito mockito-core @@ -1733,6 +1740,11 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + @@ -1768,6 +1780,97 @@ org.apache.maven.plugins maven-clean-plugin + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-maven + + enforce + + + + + + [3.1.1,) + + + ${target.java.version} + + + + + + ban-unsafe-snakeyaml + + enforce + + + + + + org.yaml:snakeyaml:(,1.26] + + + + org.yaml:snakeyaml:(,1.26]:*:test + + + + + + + ban-unsafe-jackson + + enforce + + + + + + com.fasterxml.jackson*:*:(,2.7.0] + + + + + + + dependency-convergence + + enforce + + + none + + + + + + + + enforce-junit-engines + + enforce + + validate + + + + "${project.dependencies}".contains("groupId=org.junit.jupiter, artifactId=junit-jupiter-engine,") + If junit-jupiter-engine is missing, JUnit 5 test cases will be silently ignored. + + + "${project.dependencies}".contains("groupId=org.junit.vintage, artifactId=junit-vintage-engine,") + If junit-vintage-engine is missing, JUnit 4 test cases will be silently ignored. + + + + + + +