Restore lazy evaluation of project/build/finalName

This commit restores the read-only `finalName` so that its value can
be lazily resolved against `${project.build.finalName}`.

While doing the evaluation ourselves and not relying on a dedicated
field at all would have been better, the evaluation increased the
number of required dependencies for no good reason.

IDEs should not offer auto-completion for that read-only field and it
is not published in the generated site either.

Closes gh-16456
pull/16873/head
Stephane Nicoll 6 years ago
parent 00b2954e83
commit 4c1ef630c9

@ -266,8 +266,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
if (!this.outputDirectory.exists()) {
this.outputDirectory.mkdirs();
}
String finalName = this.project.getBuild().getFinalName();
return new File(this.outputDirectory, finalName + classifier + "."
return new File(this.outputDirectory, this.finalName + classifier + "."
+ this.project.getArtifact().getArtifactHandler().getExtension());
}

Loading…
Cancel
Save