From 4c1ef630c95980692ae8219531139c592d566185 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 13 May 2019 11:08:21 +0200 Subject: [PATCH] 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 --- .../java/org/springframework/boot/maven/RepackageMojo.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index c00a61257b3..9896ceb7b87 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -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()); }