You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2024/12/30 16:30:24 UTC

(maven-changes-plugin) branch master updated: [MCHANGES-462] Remove Hamcrest dependency to avoid dependency analyzer warning (#105)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-changes-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 7022ef3  [MCHANGES-462] Remove Hamcrest dependency to avoid dependency analyzer warning (#105)
7022ef3 is described below

commit 7022ef3509d5841bccc5fdd51c58046d7c554c69
Author: Elliotte Rusty Harold <el...@users.noreply.github.com>
AuthorDate: Mon Dec 30 16:30:19 2024 +0000

    [MCHANGES-462] Remove Hamcrest dependency to avoid dependency analyzer warning (#105)
    
    * [MCHANGES-462] Avoid conflicts in Hamcrest versions
---
 pom.xml                                                             | 6 ------
 .../org/apache/maven/plugins/changes/ChangesCheckMojoTestCase.java  | 5 ++---
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0a4f092..b587f61 100644
--- a/pom.xml
+++ b/pom.xml
@@ -331,12 +331,6 @@ under the License.
       <version>4.11.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>org.apache.maven.plugin-testing</groupId>
       <artifactId>maven-plugin-testing-harness</artifactId>
diff --git a/src/test/java/org/apache/maven/plugins/changes/ChangesCheckMojoTestCase.java b/src/test/java/org/apache/maven/plugins/changes/ChangesCheckMojoTestCase.java
index 7eef30d..010c8cc 100644
--- a/src/test/java/org/apache/maven/plugins/changes/ChangesCheckMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugins/changes/ChangesCheckMojoTestCase.java
@@ -20,10 +20,9 @@ package org.apache.maven.plugins.changes;
 
 import org.junit.Test;
 
-import static org.hamcrest.CoreMatchers.startsWith;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeThat;
+import static org.junit.Assume.assumeTrue;
 
 /**
  * @author Dennis Lundberg
@@ -113,7 +112,7 @@ public class ChangesCheckMojoTestCase {
     public void testCompat() {
         // @TODO fix for Java 9+
         // System.setProperty( "java.locale.providers", "COMPAT,CLDR" ) is not picked up...
-        assumeThat(System.getProperty("java.version"), startsWith("1."));
+        assumeTrue(System.getProperty("java.version").startsWith("1."));
 
         // pattern with months as text
         String pattern = "dd MMM yyyy";