Skip to content

Commit

Permalink
Merge pull request #8 from silpion/bugfix/JENKINS-29567_default-packa…
Browse files Browse the repository at this point in the history
…ging

Bugfix JENKINS-29567: Invalid artifact URL when packaging is not specified
  • Loading branch information
marcrohlfs committed Sep 22, 2015
2 parents 783b38d + 35d8239 commit e403941
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -144,16 +144,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 @@ -212,7 +212,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 e403941

Please sign in to comment.