Difference between Spring boot 2.5.0 generated *jar and *-plain.jar?

Viewed 5425

I upgraded my spring boot app to 2.5.0, then is app.jar and app-plain.jar is created by gradle.

I would like to the difference between these jars.

thanks

1 Answers

app.jar is the archive produced by the bootJar task. This is a Spring Boot fat jar that contains all of the module's dependencies as well as its classes and resources. It can be run using java -jar.

app-plain.jar is the archive produced by the jar task. This is a plain or standard jar file that contains only the module's classes and resources.

You can learn a bit more about this in the documentation for Spring Boot's Gradle plugin.

Related