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-dependency-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new e2671baa [MDEP-952] Cut another dependency on commons-lang3 (#479)
e2671baa is described below
commit e2671baaca2b0132b35f7432264b108399096cec
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Tue Nov 19 12:35:34 2024 +0000
[MDEP-952] Cut another dependency on commons-lang3 (#479)
* Cut another dependency on commons-lang3
---
pom.xml | 2 +-
src/main/java/org/apache/maven/plugins/dependency/GetMojo.java | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index a6491f10..5ed9255b 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>
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();