PatTheGamer
PatTheGamer

Reputation: 491

Advantages to a Fat Jar vs an application bundle in Gradle

I've been using gradle for a while now and love the application plugin which allows you to create dist bundles that contain command line runners for you so you don't have to worry about setting up the classpath etc.

Recently I've seen several projects (i.e. dropwizard) suggest using fat jar files. With the dist bundles in gradle I don't really see the need to create fat jar files.

Is there something that I'm missing about fat jar files?

Upvotes: 5

Views: 1475

Answers (1)

Peter Niederwieser
Peter Niederwieser

Reputation: 123910

A fat Jar doesn't require an unzip step, and makes it easier to start the application without a shell script (because no class path needs to be set). Having just a single file to care about can simplify automation. Also other build tools do not provide an out-of-the-box way to create an application distribution.

Upvotes: 5

Related Questions