Fetching contributors…
Cannot retrieve contributors at this time
102 lines (83 sloc) 3.36 KB

To use it, add a plugin to your pom like

<!-- You need to build an exectuable uberjar, I like Shade for that -->
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

                        <!-- note that the main class is set *here* -->


<!-- now make the jar chmod +x style executable -->
    <!-- value of flags will be interpolated into the java invocation -->
    <!-- as "java $flags -jar ..." -->

    <!-- (optional) name for binary executable, if not set will just -->
    <!-- make the regular jar artifact executable -->

    <!-- (optional) support other packaging formats than jar -->
    <!-- <allowOtherTypes>true</allowOtherTypes> -->
    <!-- (optional) name for a file that will define what script gets -->
    <!-- embedded into the executable jar.  This can be used to -->
    <!-- override the default startup script which is -->
    <!-- `#!/bin/sh -->
    <!--            -->
    <!-- exec java " + flags + " -jar "$0" "$@" -->
    <!-- <scriptFile>src/packaging/someScript.extension</scriptFile> -->



1.4.0 - require Java 7, change code to use JDK7 APIs - Support Windows - Don't suppress errors

1.3.0 - add helpmojo - allow attachment of executable instead of unconditional replacement - make extension configurable - allow script replacement in the resulting executable

1.2.0 - never released

1.1.0 - If programFile is set, do not make the base artifact (the .jar) executable, just the programFile one.

1.0.0 - Stable

There is an introductory blog post at

Build Status