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

cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver-ant-tasks.git


The following commit(s) were added to refs/heads/master by this push:
     new c2cfe75  [MRESOLVER-669] Clean up (#51)
c2cfe75 is described below

commit c2cfe75d768d6c7ac0935b0e5a99d07bc3ac19c1
Author: Tamas Cservenak <ta...@cservenak.net>
AuthorDate: Sun Feb 2 15:57:25 2025 +0100

    [MRESOLVER-669] Clean up (#51)
    
    Changes:
    * clean up hamcrest deps
    * drop use of commons-lang (was never dep, upstream dropped it)
    * align resolver with maven 3.9.9
    * reformat
    
    ---
    
    https://issues.apache.org/jira/browse/MRESOLVER-669
---
 .mvn/placeholder.txt                                     |  0
 pom.xml                                                  | 16 ++++++++--------
 .../maven/resolver/internal/ant/ConverterUtils.java      |  5 ++---
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/.mvn/placeholder.txt b/.mvn/placeholder.txt
new file mode 100644
index 0000000..e69de29
diff --git a/pom.xml b/pom.xml
index 68e051f..025612e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
   </distributionManagement>
 
   <properties>
-    <mavenVersion>3.9.6</mavenVersion>
+    <mavenVersion>3.9.9</mavenVersion>
     <resolverVersion>1.9.22</resolverVersion>
     <antVersion>1.10.15</antVersion>
     <javaVersion>8</javaVersion>
@@ -213,6 +213,12 @@
       <artifactId>junit</artifactId>
       <version>${junitVersion}</version>
       <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.hamcrest</groupId>
+          <artifactId>hamcrest-core</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.ant</groupId>
@@ -228,13 +234,7 @@
     </dependency>
     <dependency>
       <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-library</artifactId>
-      <version>${hamcrestVersion}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-core</artifactId>
+      <artifactId>hamcrest</artifactId>
       <version>${hamcrestVersion}</version>
       <scope>test</scope>
     </dependency>
diff --git 
a/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java 
b/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
index 3cbf0e3..8bf627d 100644
--- a/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
+++ b/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
@@ -26,7 +26,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.maven.resolver.internal.ant.types.Authentication;
 import org.apache.maven.resolver.internal.ant.types.Dependency;
 import org.apache.maven.resolver.internal.ant.types.Exclusion;
@@ -86,13 +85,13 @@ class ConverterUtils {
         String scope = dependency.getScope();
         return new org.eclipse.aether.graph.Dependency(
                 toArtifact(dependency, session.getArtifactTypeRegistry()),
-                ObjectUtils.isEmpty(scope) ? "compile" : scope,
+                scope == null || scope.trim().isEmpty() ? "compile" : scope,
                 false,
                 toExclusions(dependency.getExclusions(), exclusions));
     }
 
     public static org.eclipse.aether.graph.Dependency toManagedDependency(
-        Dependency dependency, List<Exclusion> exclusions, 
RepositorySystemSession session) {
+            Dependency dependency, List<Exclusion> exclusions, 
RepositorySystemSession session) {
         return new org.eclipse.aether.graph.Dependency(
                 toArtifact(dependency, session.getArtifactTypeRegistry()),
                 dependency.getScope(),

Reply via email to