Skip to content

Instantly share code, notes, and snippets.

@ksomemo
Created October 3, 2014 01:29
Show Gist options
  • Save ksomemo/fbc9ea59105ace808586 to your computer and use it in GitHub Desktop.
Save ksomemo/fbc9ea59105ace808586 to your computer and use it in GitHub Desktop.
sample ant build.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project Sample">
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required -->
<property name="bin.dir" value="bin" />
<property name="classes.dir" value="classes" />
<dirname property="project.path" file="${ant.file}" />
<target name="create_run_jar">
<jar destfile="${project.path}/Sample.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="to.path.package.Sample"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="${project.path}/${bin.dir}"/>
<fileset dir="${project.path}/${classes.dir}"/>
</jar>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment