SlunkCrypt/binding/java/build.xml

74 lines
2.5 KiB
XML

<project xmlns:ivy="antlib:org.apache.ivy.ant" name="SlunkCrypt" default="default" basedir=".">
<property name="bin.dir" location="bin"/>
<property name="doc.dir" location="doc"/>
<property name="lib.dir" location="lib"/>
<property name="out.dir" location="out"/>
<property name="src.dir" location="src"/>
<property name="test.src.dir" location="tests/src"/>
<property name="test.bin.dir" location="tests/bin"/>
<property name="test.out.dir" location="tests/out"/>
<target name="default" depends="clean,dist"/>
<target name="retrieve">
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="compile" pathid="compile.classpath"/>
</target>
<target name="retrieve.test">
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" conf="test" pathid="test.classpath"/>
</target>
<target name="compile" depends="retrieve">
<mkdir dir="${bin.dir}"/>
<javac srcdir="${src.dir}" destdir="${bin.dir}" includeantruntime="false">
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="compile.test" depends="compile,retrieve.test">
<mkdir dir="${test.bin.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.bin.dir}" includeantruntime="false">
<classpath>
<path refid="test.classpath"/>
<pathelement location="${bin.dir}"/>
</classpath>
</javac>
</target>
<target name="doc" depends="retrieve">
<javadoc sourcepath="${src.dir}" destdir="${doc.dir}" packagenames="com.muldersoft.slunkcrypt" public="true" overview="${src.dir}/overview.html" doctitle="SlunkCrypt" windowtitle="SlunkCrypt">
<classpath refid="compile.classpath"/>
</javadoc>
</target>
<target name="dist" depends="compile,doc">
<mkdir dir="${out.dir}"/>
<jar jarfile="${out.dir}/slunkcrypt-1.jar" basedir="${bin.dir}"/>
<jar jarfile="${out.dir}/slunkcrypt-1-javadoc.jar" basedir="${doc.dir}"/>
</target>
<target name="test" depends="compile.test">
<mkdir dir="${test.out.dir}"/>
<junitlauncher haltOnFailure="true" printSummary="true">
<classpath>
<path refid="test.classpath"/>
<pathelement location="${bin.dir}"/>
<pathelement location="${test.bin.dir}"/>
</classpath>
<testclasses outputdir="${test.out.dir}">
<fileset dir="${test.bin.dir}" includes="**/*Test.class"/>
</testclasses>
<listener type="legacy-xml"/>
</junitlauncher>
</target>
<target name="clean">
<delete dir="${bin.dir}"/>
<delete dir="${doc.dir}"/>
<delete dir="${lib.dir}"/>
<delete dir="${out.dir}"/>
<delete dir="${test.bin.dir}"/>
<delete dir="${test.out.dir}"/>
</target>
</project>