From 83fabaee53ae71d676f1765d40cb96d2c927ef6c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 19 Nov 2024 19:32:19 -0500 Subject: [PATCH] avoid StringUtils.stripEnd --- .../maven/plugins/dependency/analyze/AnalyzeDepMgt.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java index 9cb79ece6..4dac8dd64 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java +++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java @@ -28,7 +28,6 @@ import java.util.Set; import java.util.stream.Collectors; -import org.apache.commons.lang3.StringUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Dependency; import org.apache.maven.model.DependencyManagement; @@ -146,7 +145,7 @@ private boolean checkDependencyManagement() throws MojoExecutionException { // log exclusion errors List exclusionErrors = getExclusionErrors(exclusions, allDependencyArtifacts); for (Artifact exclusion : exclusionErrors) { - getLog().info(StringUtils.stripEnd(getArtifactManagementKey(exclusion), ":") + getLog().info(getArtifactManagementKey(exclusion) + " was excluded in DepMgt, but version " + exclusion.getVersion() + " has been found in the dependency tree."); foundError = true; @@ -249,7 +248,7 @@ public void logMismatch(Artifact dependencyArtifact, Dependency dependencyFromDe "Invalid params: Artifact: " + dependencyArtifact + " Dependency: " + dependencyFromDepMgt); } - getLog().info("\tDependency: " + StringUtils.stripEnd(dependencyFromDepMgt.getManagementKey(), ":")); + getLog().info("\tDependency: " + dependencyFromDepMgt.getManagementKey()); getLog().info("\t\tDepMgt : " + dependencyFromDepMgt.getVersion()); getLog().info("\t\tResolved: " + dependencyArtifact.getBaseVersion()); }