﻿<project default="compile">
    <target name="clean">
        <delete dir="bin"/>
        <delete dir="jar"/>
    </target>

    <target name="compile">
        <mkdir dir="bin"/>
        <javac srcdir="src" destdir="bin"/>
    </target>

    <target name="jar">
        <mkdir dir="jar"/>
        <jar destfile="jar/%%%PROJECT_ID%%%.jar" basedir="bin/%%%PROJECT_ID%%%">
            <manifest>
                <attribute name="Main-Class" value="%%%PACKAGE%%%.Start"/>
            </manifest>
        </jar>
    </target>

    <target name="run">
        <java jar="jar/%%%PROJECT_ID%%%.jar" fork="true"/>
    </target>
</project>
﻿<project name="%%%PROJECT_ID%%%" basedir="." default="compile">
    <property name="src.dir" value="src"/>
    <property name="build.dir" value="bin"/>
    <property name="classes.dir" value="${build.dir}/classes"/>
    <property name="jar.dir" value="${build.dir}/jar"/>
    <property name="main-class" value="%%%PACKAGE%%%.Start"/>

    <target name="clean">
        <delete dir="${build.dir}"/>
    </target>

    <target name="compile">
        <mkdir dir="${classes.dir}"/>
        <javac includeantruntime="false" srcdir="${src.dir}" destdir="${classes.dir}"/>
    </target>

    <target name="jar" depends="compile">
        <mkdir dir="${jar.dir}"/>
        <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
            <manifest>
                <attribute name="Main-Class" value="${main-class}"/>
            </manifest>
        </jar>
    </target>

    <target name="run" depends="jar">
        <java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/>
    </target>

    <target name="clean-build" depends="clean,jar"/>

    <target name="main" depends="clean,run"/>
</project>
Clean up Ant build.xml file further.
Clean up Ant build.xml file further.
