Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDEP-952] Partially decouple AbstractFromConfigurationMojo from StringUtils #487

Merged
merged 7 commits into from
Nov 24, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ protected List<ArtifactItem> getProcessedArtifactItems(ProcessArtifactItemsReque
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));
}
Expand All @@ -185,7 +186,7 @@ protected List<ArtifactItem> getProcessedArtifactItems(ProcessArtifactItemsReque
}

private boolean checkIfProcessingNeeded(ArtifactItem item) throws MojoExecutionException, ArtifactFilterException {
return StringUtils.equalsIgnoreCase(item.getOverWrite(), "true")
return "true".equalsIgnoreCase(item.getOverWrite())
|| getMarkedArtifactFilter(item).isArtifactIncluded(item);
}

Expand Down Expand Up @@ -216,6 +217,7 @@ protected Artifact getArtifact(ArtifactItem artifactItem) throws MojoExecutionEx
coordinate.setClassifier(artifactItem.getClassifier());

final String extension;

ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler(artifactItem.getType());
if (artifactHandler != null) {
extension = artifactHandler.getExtension();
Expand Down