0

By default 2 jar files gets generated applicationName-version.jar (executable jar) and appName-version-plain.jar (plain jar). I hate to see this jar along with the executable jar and tried to stop with

jar{
   enabled = true
   archiveClassified = "" 
}

Also, have tried with the combinations with bootJar = enabled but no luck either.

with this property the executable jar remains no more executable.. how can I generate only executable jar. Pls help.

  • see duplicate question with a working solution here: https://stackoverflow.com/a/67663956/6899896 – M.Ricciuti Sep 03 '21 at 16:42
  • Does this answer your question? [Spring Boot 2.5.0 generates plain.jar file. Can I remove it?](https://stackoverflow.com/questions/67663728/spring-boot-2-5-0-generates-plain-jar-file-can-i-remove-it) – M.Ricciuti Sep 03 '21 at 16:42

2 Answers2

0

You can't because Spring needs to generate the normal JAR and repackage the JAR to the executable JAR.

Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82
0

You want

jar {
  enabled = false
}
Kalpesh Soni
  • 6,879
  • 2
  • 56
  • 59