allow setting hamcrest and junit locations with properties

Defaults to the ant library path (the previously hardcoded path) if not set.
This commit is contained in:
kytv
2013-01-03 11:53:08 +00:00
parent 5b81a1a6d5
commit 9d77cd7761
3 changed files with 46 additions and 8 deletions

View File

@ -119,13 +119,24 @@
</classpath>
</scalac>
</target>
<target name="junit.compileTest" depends="builddeptest, compile">
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
<!-- junit classes are in ant runtime -->
<!-- set hamcrest and junit homes to the old default unless overridden elsewhere -->
<property name="hamcrest.home" value="${ant.home}/lib/" />
<property name="junit.home" value="${ant.home}/lib/" />
<javac srcdir="./test/junit" debug="true" source="1.5" target="1.5" deprecation="on"
includeAntRuntime="true"
destdir="./build/obj" classpath="../../core/java/build/i2ptest.jar" >
includeAntRuntime="true"
destdir="./build/obj">
<classpath>
<pathelement location="${hamcrest.home}/hamcrest-core.jar" />
<pathelement location="${hamcrest.home}/hamcrest-library.jar" />
<pathelement location="${hamcrest.home}/hamcrest-integration.jar" />
<pathelement location="$junit.home}/junit.jar" />
<pathelement location="$junit.home}/junit4.jar" />
<pathelement location="../../core/java/build/i2ptest.jar" />
</classpath>
<compilerarg line="${javac.compilerargs}" />
</javac>
</target>