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/09/19 21:49:59 UTC
(maven-antrun-plugin) branch agent/drop-hamcrest created (now a384d29)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch agent/drop-hamcrest
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git
at a384d29 Drop Hamcrest from tests
This branch includes the following new commits:
new a384d29 Drop Hamcrest from tests
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-antrun-plugin) 01/01: Drop Hamcrest from tests
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch agent/drop-hamcrest
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git
commit a384d2918d061a77ae7193bd25aaa82f5f1914ca
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sat Sep 19 23:49:50 2026 +0200
Drop Hamcrest from tests
---
pom.xml | 12 ------------
.../antrun/AntrunXmlPlexusConfigurationWriterTest.java | 11 ++++++++---
2 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1ed4ba3..c94b45a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -133,24 +133,12 @@ under the License.
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- <version>3.0</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-core</artifactId>
<version>${version.xmlunit}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.xmlunit</groupId>
- <artifactId>xmlunit-matchers</artifactId>
- <version>${version.xmlunit}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java b/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
index d256423..3d42207 100644
--- a/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
+++ b/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
@@ -28,10 +28,11 @@ import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
+import org.xmlunit.builder.DiffBuilder;
import org.xmlunit.builder.Input;
+import org.xmlunit.diff.Diff;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.xmlunit.matchers.CompareMatcher.isIdenticalTo;
+import static org.junit.jupiter.api.Assertions.assertFalse;
/**
* Test class for {@link AntrunXmlPlexusConfigurationWriter}.
@@ -114,6 +115,10 @@ class AntrunXmlPlexusConfigurationWriterTest {
}
private void assertXmlIsExpected(String expected, File file) {
- assertThat(Input.from(file), isIdenticalTo(Input.from(getClass().getResourceAsStream(expected))));
+ Diff diff = DiffBuilder.compare(Input.from(getClass().getResourceAsStream(expected)))
+ .withTest(Input.from(file))
+ .checkForIdentical()
+ .build();
+ assertFalse(diff.hasDifferences(), diff.toString());
}
}