Skip to content

Commit 04aadcd

Browse files
committed
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 spring-projectsgh-16202
1 parent 6ab942f commit 04aadcd

File tree

1 file changed

+2
-1
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

1 file changed

+2
-1
lines changed

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ private File getTargetFile() {
263263
if (!this.outputDirectory.exists()) {
264264
this.outputDirectory.mkdirs();
265265
}
266-
return new File(this.outputDirectory, this.finalName + classifier + "."
266+
String finalName = this.project.getBuild().getFinalName();
267+
return new File(this.outputDirectory, finalName + classifier + "."
267268
+ this.project.getArtifact().getArtifactHandler().getExtension());
268269
}
269270

0 commit comments

Comments
 (0)