Created
February 14, 2014 03:30
-
-
Save jarrodhroberson/8995307 to your computer and use it in GitHub Desktop.
How to bundle Java programs into a single executable .jar file using Ant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="build-jar" depends="compile"> | |
<jar destfile="${dist.dir}/app.jar" compress="true"> | |
<manifest> | |
<attribute name="Main-Class" value="main"/> | |
</manifest> | |
<fileset dir="${build.dir}/classes" includes="**/*.class"/> | |
<zipgroupfileset dir="${lib.dir}"> | |
<includesfile name="dependencies.list"/> | |
</zipgroupfileset> | |
</jar> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment