stigkj / gradle-executable-jar-plugin

ABANDONED - use something like the gradle-capsule-plugin instead
24 stars 3 forks source link

Make 'really executable' jars #12

Open stigkj opened 11 years ago

stigkj commented 11 years ago

This is done by prepending a shell script to the resulting jar file that executes itself through java. Such a shell script could in its simplest form look like this:

#!/bin/sh
exec java -jar "$0" "$@"

A default script should be provided, but it should be possible to override this with one's own.

As the ZIP-spec states that a zip-file can have anything before the real zip begins, it should not pose a problem doing this all the time. This means there is no use for an option turning this on/off.

jtnelson commented 10 years ago

I built on your plugin to add this functionality in a new plugin called "jarsh"

https://github.com/cinchapi/jarsh

iready commented 8 years ago

really?