Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,6 @@ under the License.
<version>3.3.4</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
Expand Down Expand Up @@ -53,7 +52,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
if (ancestors.isEmpty()) {
getLog().info("No Ancestor POMs!");
} else {
getLog().info(String.format(Locale.US, "Ancestor POMs: %s", StringUtils.join(ancestors, " <- ")));
getLog().info("Ancestor POMs: " + String.join(" <- ", ancestors));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.plugin.AbstractMojo;
Expand All @@ -40,6 +39,7 @@
import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis;
import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalyzer;
import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalyzerException;
import org.apache.maven.shared.utils.StringUtils;
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.context.Context;
Expand Down Expand Up @@ -512,7 +512,8 @@ private void writeDependencyXML(Set<Artifact> artifacts) {
writer.endElement();
writer.startElement("version");
writer.writeText(artifact.getBaseVersion());
if (!StringUtils.isBlank(artifact.getClassifier())) {
String classifier = artifact.getClassifier();
if (StringUtils.isNotBlank(classifier)) {
writer.startElement("classifier");
writer.writeText(artifact.getClassifier());
writer.endElement();
Expand Down Expand Up @@ -541,7 +542,6 @@ private void writeScriptableOutput(Set<Artifact> artifacts) {
// called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961
artifact.isSnapshot();

// CHECKSTYLE_OFF: LineLength
buf.append(scriptableFlag)
.append(":")
.append(pomFile)
Expand All @@ -554,7 +554,6 @@ private void writeScriptableOutput(Set<Artifact> artifacts) {
.append(":")
.append(artifact.getScope())
.append(System.lineSeparator());
// CHECKSTYLE_ON: LineLength
}
getLog().info(System.lineSeparator() + buf);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.apache.maven.plugins.dependency.resolvers;

import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
Expand All @@ -30,13 +29,11 @@
* @author <a href="mailto:[email protected]">Brian Fox</a>
* @since 2.0-alpha2
*/
// CHECKSTYLE_OFF: LineLength
@Mojo(
name = "sources",
defaultPhase = LifecyclePhase.GENERATE_SOURCES,
requiresDependencyResolution = ResolutionScope.TEST,
threadSafe = true)
// CHECKSTYLE_ON: LineLength
public class ResolveDependencySourcesMojo extends ResolveDependenciesMojo {

private static final String SOURCE_CLASSIFIER = "sources";
Expand All @@ -48,7 +45,7 @@ public class ResolveDependencySourcesMojo extends ResolveDependenciesMojo {
*/
@Override
protected void doExecute() throws MojoExecutionException {
if (StringUtils.isEmpty(this.classifier)) {
if (this.classifier == null || this.classifier.isEmpty()) {
this.classifier = SOURCE_CLASSIFIER;
}

Expand Down