Skip to content
ABANDONED - use something like the gradle-capsule-plugin instead
Groovy Java
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Executable Jar plugin for Gradle

The Executable Jar plugin creates an executable jar from your project with all its runtime dependencies embedded.

This means, when using this plugin in a build, you will get a artifact_-execjar.jar artifact than can be run like this:

java -jar artifact_name-execjar.jar


To use the executable jar plugin, include the following in your build script:

apply plugin: 'executable-jar'

// This is the class that starts your application
mainClass = 'the.class.that.has.Main'

buildscript {
    repositories {
    dependencies {
        classpath 'net.nisgits.gradle:gradle-executable-jar-plugin:master-REL-5'
Something went wrong with that request. Please try again.