Nidhin Dev
Nidhin Dev

Reputation: 579

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

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

Upvotes: 33

Views: 15163

Answers (1)

Andy Wilkinson
Andy Wilkinson

Reputation: 116091

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.

Upvotes: 45

Related Questions