Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

vmware-archive/executable-dist-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Gradle plugin which makes distribution zips runnable, as a sort of alternative to an uberjar. A London Beach production 💂‍♂️🌴.

To build:

./gradlew build

To use:

The plugin is published on the Gradle Plugin Portal, so with a modern version of Gradle, you can write:

plugins {
    id 'java'
    id 'application'
    id 'io.pivotal.labs.exedist' version '1.0.0'
}

With the plugin applied, you gain an executableDistZip task which makes an executable version of the distribution zip. So you can do:

./gradlew executableDistZip
./build/distributions/myapp-exe.zip

The executable zip requires a POSIX-compliant shell at /bin/sh (bash and dash are both fine), and an unzip command somewhere on the path. It runs the start script that Gradle builds, which may impose requirements of its own.

Command-line arguments to the zip are passed on to the start script, and thence to the application. The start script will also use the contents of a JAVA_OPTS or <APPNAME>_OPTS environment variable as arguments to the Java command.

The zip exec’s the start script, which in turn exec’s the Java command, so the application ultimately runs with the PID initially assigned to the executable zip.

About

A Gradle plugin which makes distribution zips runnable, as a sort of alternative to an uberjar. A London Beach production 💂‍♂️🌴.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published