Commit 04aadcdf authored by Stephane Nicoll's avatar Stephane Nicoll

Make sure custom finalName is ignored

A read-only plugin parameter can still be set by the user which leads
to an invalid repackaged archive. This commit actually ignores the field
and uses the standard attribute instead.

Closes gh-16202
parent 6ab942f2
...@@ -263,7 +263,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { ...@@ -263,7 +263,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
if (!this.outputDirectory.exists()) { if (!this.outputDirectory.exists()) {
this.outputDirectory.mkdirs(); this.outputDirectory.mkdirs();
} }
return new File(this.outputDirectory, this.finalName + classifier + "." String finalName = this.project.getBuild().getFinalName();
return new File(this.outputDirectory, finalName + classifier + "."
+ this.project.getArtifact().getArtifactHandler().getExtension()); + this.project.getArtifact().getArtifactHandler().getExtension());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment