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 2025/08/23 10:52:44 UTC
(maven-doxia) 01/01: Drop redundant Hamcrest
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch hamcrest
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
commit c9ba66e38a434b05b56dae59c546380094b9ac4e
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sat Aug 23 12:51:58 2025 +0200
Drop redundant Hamcrest
---
doxia-core/pom.xml | 5 -----
.../java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java | 6 ++----
doxia-modules/doxia-module-markdown/pom.xml | 5 -----
pom.xml | 6 ------
4 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/doxia-core/pom.xml b/doxia-core/pom.xml
index 12733405..fa1ab6c9 100644
--- a/doxia-core/pom.xml
+++ b/doxia-core/pom.xml
@@ -72,11 +72,6 @@ under the License.
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java
index 6f3fdd38..b5ff6d55 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java
@@ -29,11 +29,9 @@ import org.apache.maven.doxia.parser.Xhtml5BaseParser;
import org.apache.maven.doxia.sink.impl.SinkEventElement;
import org.apache.maven.doxia.sink.impl.SinkEventTestingSink;
import org.codehaus.plexus.testing.PlexusTest;
-import org.hamcrest.CoreMatchers;
import org.junit.jupiter.api.Test;
import static org.codehaus.plexus.testing.PlexusExtension.getBasedir;
-import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -124,7 +122,7 @@ public class SnippetMacroTest {
assertFalse(it.hasNext());
// no need to verify the absence of the first and second snippets if tests above were successful
- assertThat(snippet, CoreMatchers.containsString("Этот сниппет в формате Unicode (UTF-8)"));
+ assertTrue(snippet.contains("Этот сниппет в формате Unicode (UTF-8)"));
// again
// Shouldn't work because no snippet called "first" exists, only "firstId"
@@ -148,7 +146,7 @@ public class SnippetMacroTest {
SinkEventElement event = it.next();
assertEquals("text", event.getName());
String snippet = (String) event.getArgs()[0];
- assertThat(snippet, CoreMatchers.containsString("Error during retrieving content"));
+ assertTrue(snippet.contains("Error during retrieving content"));
}
private SinkEventTestingSink executeSnippetMacro(Map<String, Object> macroParameters)
diff --git a/doxia-modules/doxia-module-markdown/pom.xml b/doxia-modules/doxia-module-markdown/pom.xml
index 98ee5b09..b8857a11 100644
--- a/doxia-modules/doxia-module-markdown/pom.xml
+++ b/doxia-modules/doxia-module-markdown/pom.xml
@@ -168,11 +168,6 @@ under the License.
<artifactId>plexus-testing</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/pom.xml b/pom.xml
index b9b9aa8e..7b713b01 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,12 +147,6 @@ under the License.
<version>1.6.0</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-core</artifactId>
- <version>3.0</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>javax.inject</groupId>