From 9a457dc2efdbd84530f5c4bab57ad5f09f58bb4d Mon Sep 17 00:00:00 2001 From: jdsika Date: Sat, 26 Sep 2026 11:53:21 +0200 Subject: [PATCH] build: keep junit 3.8.1 off the test classpath so the tests run xmlunit-legacy 2.13.0 declares junit:junit 3.8.1 as a compile dependency, for its JUnit 3 based classes (XMLTestCase, XMLAssert, Validator.assertIsValid). Since maven-surefire-plugin 3.6.0 (#789), surefire adds the JUnit Vintage engine to the test run whenever junit:junit is a test dependency; 3.5.6 did not, because the project declares junit-jupiter-engine. The Vintage engine rejects any junit:junit older than 4.12: TestEngine with ID 'junit-vintage' failed to discover tests Caused by: JUnitException: Unsupported version of junit:junit: 3.8.1. Please upgrade to version 4.12 or later. The forked test JVM of shapechange-app therefore fails before a single test executes, and `mvn test` reports "Tests run: 0" and a build failure there. shapechange-core has no junit:junit and is not affected. The tests use only xmlunit-legacy classes that do not depend on JUnit (Diff, HTMLDocumentBuilder, TolerantSaxDocumentBuilder, XMLUnit and jaxp13.Validator), and no test source uses JUnit 3 or 4. junit:junit is therefore excluded from the xmlunit-legacy dependency, in dependencyManagement so that it applies to every module that uses it. Signed-off-by: jdsika --- pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pom.xml b/pom.xml index f366bb72..b7b51bf6 100644 --- a/pom.xml +++ b/pom.xml @@ -274,6 +274,17 @@ xmlunit-legacy 2.13.0 test + + + + junit + junit + +