Duy Dinh - 2013-02-12
<project name="simpack" default="jar" basedir="."> <description> This is the JAR build file of SimPack from the University of Zurich, Switzerland. </description> <property name="version" value="0.91"/> <property name="project.source.directory" value="src/"/> <property name="project.external.library.directory" value="lib/"/> <property name="build.class.directory" value="bin/"/>
<!-- Project distribution directory -->
<property name="project.dist.directory" value="dist/" />

<!-- Path containing external libraries (*.jar) -->
<path id="master-classpath">
    <fileset dir="${project.external.library.directory}" includes="**/*.jar" />
</path>

<!-- Target to compile source code -->
<target name="compile" description="Compile the source code and put .class files in output ">
    <mkdir dir="${build.class.directory}" />        
    <javac srcdir="${project.source.directory}" destdir="${build.class.directory}">
        <classpath refid="master-classpath" />
    </javac>
</target>

<!-- Target to export JAR/Executable JAR -->
<target name="jar">
    <mkdir dir="${project.dist.directory}" />
    <mkdir dir="${project.dist.directory}/jar" />
    <jar destfile="${project.dist.directory}/jar/simpack-${version}.jar" basedir="${build.class.directory}">
        <!-- Includes all JAR files in lib directory -->
        <fileset dir="${project.external.library.directory}" includes="**/*.jar" />
        <!-- For executable JAR only-->
        <!--manifest>
            <attribute name="Main-Class" value="irit.java.eclipse.buildClassPath" />
        </manifest-->
    </jar>
</target>

<target name="run">
    <java jar="${project.dist.directory}/jar/simpack-${version}.jar" fork="true" />
</target>

<!-- Clean everyting in bin -->
<target name="clean">
    <delete dir="bin" />
</target>

</project>