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
This commit is contained in:
Stephane Nicoll
2019-03-29 10:40:41 +01:00
parent 6ab942f295
commit 04aadcdf2e

View File

@@ -263,7 +263,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
if (!this.outputDirectory.exists()) {
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());
}