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

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

commit f92537bca40b06dbd1651edd4cc9d17b6e6dfb67
Author: Elliotte Rusty Harold <elh...@ibiblio.org>
AuthorDate: Wed Nov 20 03:50:26 2024 -0500

    Decouple AbstractFromConfigurationMojo frm StringUtils
---
 .../fromConfiguration/AbstractFromConfigurationMojo.java         | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java
 
b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java
index 770f86c2..d20b50c3 100644
--- 
a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java
@@ -23,7 +23,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
@@ -164,13 +163,13 @@ public abstract class AbstractFromConfigurationMojo 
extends AbstractDependencyMo
             artifactItem.getOutputDirectory().mkdirs();
 
             // make sure we have a version.
-            if (StringUtils.isEmpty(artifactItem.getVersion())) {
+            if (artifactItem.getVersion() != null && 
!artifactItem.getVersion().isEmpty()) {
                 fillMissingArtifactVersion(artifactItem);
             }
 
             artifactItem.setArtifact(this.getArtifact(artifactItem));
 
-            if (StringUtils.isEmpty(artifactItem.getDestFileName())) {
+            if (artifactItem.getDestFileName() == null || 
artifactItem.getDestFileName().length() == 0) {
                 
artifactItem.setDestFileName(DependencyUtil.getFormattedFileName(
                         artifactItem.getArtifact(), removeVersion, 
prependGroupId, useBaseVersion, removeClassifier));
             }
@@ -185,7 +184,7 @@ public abstract class AbstractFromConfigurationMojo extends 
AbstractDependencyMo
     }
 
     private boolean checkIfProcessingNeeded(ArtifactItem item) throws 
MojoExecutionException, ArtifactFilterException {
-        return StringUtils.equalsIgnoreCase(item.getOverWrite(), "true")
+        return "true".equalsIgnoreCase(item.getOverWrite())
                 || getMarkedArtifactFilter(item).isArtifactIncluded(item);
     }
 
@@ -367,7 +366,7 @@ public abstract class AbstractFromConfigurationMojo extends 
AbstractDependencyMo
         if (artifact != null) {
             String packaging = "jar";
             String classifier;
-            String[] tokens = StringUtils.split(artifact, ":");
+            String[] tokens = artifact.split(":");
             if (tokens.length < 3 || tokens.length > 5) {
                 throw new MojoFailureException("Invalid artifact, "
                         + "you must specify 
groupId:artifactId:version[:packaging[:classifier]] " + artifact);

Reply via email to