You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/08/10 00:14:58 UTC
(maven) branch maven-4.0.x updated: Move the core IT suite off the JUnit 4 assertions
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch maven-4.0.x
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/maven-4.0.x by this push:
new 4b330f5558 Move the core IT suite off the JUnit 4 assertions
4b330f5558 is described below
commit 4b330f5558f712ea0fa9b459b818e516fea29b5d
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sun Aug 9 23:28:34 2026 +0200
Move the core IT suite off the JUnit 4 assertions
Five classes in the suite still reached for org.junit.Assert while already
being annotated with the Jupiter @Test, so they were the last thing keeping
JUnit 4 on the its classpath. They now use org.junit.jupiter.api.Assertions.
Four of them only needed the static import swapped. The fifth,
MavenITmng7772CoreExtensionFoundTest, passed a message to assertTrue: the
message is the FIRST argument in JUnit 4 and the LAST in JUnit 5, so that
call is reordered rather than merely re-imported.
This is the 4.0.x counterpart of the same change on master.
Generated-by: Claude Opus 5 (1M context)
---
.../org/apache/maven/it/MavenITgh10210SettingsXmlDecryptTest.java | 8 +++++---
.../org/apache/maven/it/MavenITmng7772CoreExtensionFoundTest.java | 4 ++--
.../org/apache/maven/it/MavenITmng8400CanonicalMavenHomeTest.java | 2 +-
.../maven/it/MavenITmng8414ConsumerPomWithNewFeaturesTest.java | 2 +-
.../test/java/org/apache/maven/it/MavenITmng8594AtFileTest.java | 2 +-
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh10210SettingsXmlDecryptTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh10210SettingsXmlDecryptTest.java
index 8742ff9388..dc01612f0d 100644
--- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh10210SettingsXmlDecryptTest.java
+++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh10210SettingsXmlDecryptTest.java
@@ -22,9 +22,11 @@
import java.nio.file.Files;
import java.util.Arrays;
-import org.junit.Assert;
import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
/**
* This is a test set for <a href="https://github.com/apache/maven/issues/10210">GH-10210</a>.
*/
@@ -45,7 +47,7 @@ void testItPass() throws Exception {
verifier.addCliArgument("process-resources");
verifier.execute();
- Assert.assertEquals(
+ assertEquals(
Arrays.asList(
"prop1=%{foo}.txt",
"prop2=${foo}.txt",
@@ -69,7 +71,7 @@ void testItFail() throws Exception {
try {
verifier.execute();
} catch (VerificationException e) {
- Assert.assertTrue(
+ assertTrue(
verifier.loadLogContent()
.contains(
"Could not decrypt password (fix the corrupted password or remove it, if unused) {L6L/HbmrY+cH+sNkphn-this password is corrupted intentionally-q3fguYepTpM04WlIXb8nB1pk=}"));
diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7772CoreExtensionFoundTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7772CoreExtensionFoundTest.java
index 6b210695f1..cfcc4942d1 100644
--- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7772CoreExtensionFoundTest.java
+++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7772CoreExtensionFoundTest.java
@@ -25,7 +25,7 @@
import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class MavenITmng7772CoreExtensionFoundTest extends AbstractMavenIntegrationTestCase {
public MavenITmng7772CoreExtensionFoundTest() {
@@ -66,7 +66,7 @@ public void testWithLibExtCoreExtensionsFound() throws Exception {
Path jarPath = extensionBasedir.resolve("target").resolve("maven-it-core-extensions-0.1.jar");
- assertTrue("Jar output path was not built", Files.isRegularFile(jarPath));
+ assertTrue(Files.isRegularFile(jarPath), "Jar output path was not built");
verifier = newVerifier(testDir.getAbsolutePath());
verifier.setUserHomeDirectory(Paths.get(testDir.toPath().toString(), "home-lib-ext"));
diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8400CanonicalMavenHomeTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8400CanonicalMavenHomeTest.java
index 5122d16567..e8e172f21e 100644
--- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8400CanonicalMavenHomeTest.java
+++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8400CanonicalMavenHomeTest.java
@@ -27,7 +27,7 @@
import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-8400">MNG-8400</a>.
diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8414ConsumerPomWithNewFeaturesTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8414ConsumerPomWithNewFeaturesTest.java
index 37e5c9dca7..aefde2f1d8 100644
--- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8414ConsumerPomWithNewFeaturesTest.java
+++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8414ConsumerPomWithNewFeaturesTest.java
@@ -27,7 +27,7 @@
import org.apache.maven.model.v4.MavenStaxReader;
import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8594AtFileTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8594AtFileTest.java
index a0ad34011e..657b966027 100644
--- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8594AtFileTest.java
+++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8594AtFileTest.java
@@ -23,7 +23,7 @@
import org.junit.jupiter.api.Test;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-8594">MNG-8594</a>.