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

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

commit f8211c1ac087cf9fdb62ecf12e78a5692ece233e
Author: Elliotte Rusty Harold <elh...@ibiblio.org>
AuthorDate: Mon Nov 18 23:06:06 2024 -0500

    Cut another dependency on commons-lang3
---
 pom.xml                                                        | 8 +-------
 src/main/java/org/apache/maven/plugins/dependency/GetMojo.java | 7 +++----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/pom.xml b/pom.xml
index f23a6d61..005c30a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -183,7 +183,7 @@ under the License.
       <artifactId>org.eclipse.sisu.plexus</artifactId>
       <scope>provided</scope>
     </dependency>
-    <!-- MNG-6607: needs to be overriden for commons-compress otherwise it 
will appear earlier in the tree -->
+    <!-- MNG-6607: needs to be overridden for commons-compress otherwise it 
will appear earlier in the tree -->
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
@@ -258,12 +258,6 @@ under the License.
       <version>3.4.2</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-      <version>3.13.0</version>
-    </dependency>
-
     <!-- dependencies to annotations -->
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java 
b/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
index 61fb05fd..85e0cd10 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -130,7 +129,7 @@ public class GetMojo extends AbstractMojo {
                     + "e.g. 
-Dartifact=org.apache.maven.plugins:maven-downloader-plugin:1.0");
         }
         if (artifact != null) {
-            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);
@@ -157,7 +156,7 @@ public class GetMojo extends AbstractMojo {
 
         if (remoteRepositories != null) {
             // Use the same format as in the deploy plugin id::layout::url
-            String[] repos = StringUtils.split(remoteRepositories, ",");
+            String[] repos = remoteRepositories.split(",");
             for (String repo : repos) {
                 repoList.add(parseRepository(repo, always));
             }
@@ -214,7 +213,7 @@ public class GetMojo extends AbstractMojo {
             }
 
             id = matcher.group(1).trim();
-            if (!StringUtils.isEmpty(matcher.group(2))) {
+            if (matcher.group(2) != null && !matcher.group(2).isEmpty()) {
                 layout = getLayout(matcher.group(2).trim());
             }
             url = matcher.group(3).trim();

Reply via email to