Permalink
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (101 sloc) 3.52 KB
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_jar" name="Create Runnable Jar for Project SDMLib">
<macrodef name="copy_latest">
<attribute name="tofile" />
<attribute name="dir" />
<attribute name="name" />
<sequential>
<copy tofile="@{tofile}">
<last>
<sort>
<date xmlns="antlib:org.apache.tools.ant.types.resources.comparators" />
<resources>
<fileset dir="@{dir}">
<include name="@{name}" />
</fileset>
</resources>
</sort>
</last>
</copy>
</sequential>
</macrodef>
<target name="init">
<mkdir dir="build/temp/" />
<mkdir dir="build/lib/" />
<mkdir dir="build/javadoc/" />
<javac srcdir="src/main/:../NetworkParser/src/main" destdir="build/temp" includeantruntime="false" debug="true" sourcepath="src" listfiles="true">
<classpath>
<pathelement location="lib/junit.jar"/>
</classpath>
<compilerarg value="-Xlint"/>
<exclude name="test/**"/>
</javac>
</target>
<target name="create_jar" depends="init">
<delete file="build/lib/SDMLib-pm.jar" />
<jar destfile="build/SDMLib-pm.jar">
<manifest>
<attribute name="Class-Path" value="." />
<attribute name="Built-By" value="${user.name}" />
<attribute name="Version" value="${revisionVersion}" />
<attribute name="Implementation-Version" value="4.2.23.${revisionVersion} ${TODAY}" />
<attribute name="Main-Class" value="org.sdmlib.models.classes.gui.SDMDiagramEditor" />
</manifest>
<fileset dir="build/temp/" />
<fileset dir="./src/main/java">
<exclude name="**/test/**" />
</fileset>
<fileset dir="./src/main/resources">
<exclude name="**/replication/**" />
</fileset>
<fileset dir="../NetworkParser/src/main/java">
<exclude name="**/test/**" />
</fileset>
<fileset dir="../NetworkParser/src/main/resources" />
</jar>
<jar destfile="build/SDMLib.jar">
<manifest>
<attribute name="Class-Path" value="." />
<attribute name="Built-By" value="${user.name}" />
<attribute name="Version" value="${revisionVersion}" />
<attribute name="Implementation-Version" value="4.2.23.${revisionVersion} ${TODAY}" />
</manifest>
<fileset dir="build/temp/" />
<fileset dir="./src">
<include name="**/*.js"/>
<include name="**/*.html"/>
<include name="**/*.css"/>
</fileset>
<fileset dir="../NetworkParser/src/main/java" />
</jar>
<jar destfile="build/SDMLib-source.jar">
<manifest>
<attribute name="Class-Path" value="." />
<attribute name="Built-By" value="${user.name}" />
<attribute name="Version" value="${revisionVersion}" />
<attribute name="Implementation-Version" value="4.2.23.${revisionVersion} ${TODAY}" />
</manifest>
<fileset dir="build/temp/" />
<fileset dir="./src"/>
<fileset dir="../NetworkParser/src/main/java" />
</jar>
<javadoc destdir="build/javadoc/" sourcepath="src/main/:../NetworkParser/src/main/java">
<classpath>
<pathelement location="lib/junit.jar"/>
<pathelement location="lib/bsh-2.0b5.jar"/>
</classpath>
</javadoc>
<jar destfile="build/SDMLib-javadoc.jar">
<manifest>
<attribute name="Class-Path" value="." />
<attribute name="Built-By" value="${user.name}" />
<attribute name="Version" value="${revisionVersion}" />
<attribute name="Implementation-Version" value="4.2.23.${revisionVersion} ${TODAY}" />
</manifest>
<fileset dir="build/javadoc/" />
</jar>
<delete dir="build/lib"></delete>
<delete dir="build/temp"></delete>
<delete dir="build/javadoc"></delete>
</target>
</project>