Skip to content

Commit

Permalink
Fixed invalid artifact URL that is created when no packaging is speci…
Browse files Browse the repository at this point in the history
…fied (which actually means default packaging 'jar').
  • Loading branch information
marcrohlfs committed Jul 22, 2015
1 parent 3901c4d commit 35d8239
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -128,16 +128,16 @@ public Pattern getVersionFilterPattern() {
return versionFilterPattern;
}

public String readPackaging() {
public String getPackaging() {
if (StringUtils.isNotBlank(this.packaging)) {
return this.packaging;
}
return "jar";
}

private ParameterValue createValue(String version) {
return new MavenMetadataParameterValue(getName(), getDescription(), getGroupId(), getArtifactId(), version, readPackaging(),
getFullArtifactUrl(getGroupId(), getArtifactId(), version, readPackaging()));
return new MavenMetadataParameterValue(getName(), getDescription(), getGroupId(), getArtifactId(), version, getPackaging(),
getFullArtifactUrl(getGroupId(), getArtifactId(), version, getPackaging()));
}

// Create a parameter value from the string given in the CLI.
Expand Down Expand Up @@ -196,7 +196,7 @@ public ParameterValue getDefaultParameterValue() {
}

return new MavenMetadataParameterValue(getName(), getDescription(), getGroupId(), getArtifactId(), defaultVersion,
readPackaging(), getFullArtifactUrl(getGroupId(), getArtifactId(), defaultVersion, readPackaging()));
getPackaging(), getFullArtifactUrl(getGroupId(), getArtifactId(), defaultVersion, getPackaging()));
}

@Override
Expand Down

0 comments on commit 35d8239

Please sign in to comment.