<!-- load the extra NetBeans build properties for Tomcat, which can --> <!-- use the standard properties symbolic variables. --> <!-- Note: inheritall==false will still pass all of these user --> <!-- properties to the Ant build targets of Tomcat -->
<property file="./nbproject/nb-tomcat-build.properties"/>
<target name="-package-project"
description="ensure Tomcat is ready to use">
<ant target="deploy" inheritall="false"/>
</target>
<target name="-compile-all-tests"
description="needed to prepare some dependencies">
<ant target="test-compile" inheritall="false"/>
</target>
<target name="compile-selected-files-in-test"
depends="-package-project"
description="compile one or more selected test (not main) classes">
<fail unless="netbeans.home">This target can only run under NetBeans.</fail>
<fail unless="files">Property 'files' must be set in project.xml.</fail>
<echo level="verbose" message="compiling tests: ${files}"/>
<echo level="verbose" message="compiling tests into: ${test.classes}"/>
<mkdir dir="${test.classes}"/>
<javac srcdir="test"
destdir="${test.classes}"
includes="${files}"
debug="true"
deprecation="${compile.deprecation}"
source="${compile.release}" encoding="ISO-8859-1"
includeantruntime="false">
<classpath path="${nb-test.classpath}"/>
</javac>
</target>
<target name="test-selected-file"
description="execute a single unit test class (-Dtest.entry=nnn)">
<fail unless="test.entry"
message="Property 'test.entry' must be set in project.xml."/> <!-- theruntestsmacrorunsasingletestiftest.entryisaclassname Note:wemustONLYrunoneofthetesttargets,otherwisethetarget thatrunslastandwipeouttheothertestresults! Note:thetesttargetsalldependondeploy
-->
<ant target="test-nio" inheritall="false">
<property name="junit.formatter.type" value="brief" />
<property name="junit.formatter.usefile" value="false" />
</ant>
</target>
<target name="debug-selected-file-in-test"
depends="-package-project"
description="debug the single selected unit test class">
<echo message="debugging test: ${test.entry}"/>
<fail unless="netbeans.home">This target can only run under NetBeans.</fail>
<fail unless="test.entry"
message="Property 'test.entry' must be set in project.xml."/>
<nbjpdastart name="${test.entry}"
addressproperty="jpda.address"
transport="dt_socket" >
<classpath path="${nb-test.classpath}"/>
<sourcepath>
<path path="test"/>
</sourcepath>
</nbjpdastart>
<junit printsummary="yes" fork="yes" dir="." showoutput="yes"
errorproperty="test.result.error"
failureproperty="test.result.failure"
haltonfailure="${test.haltonfailure}" >
<!-- define a non-file JUnit formatter for NetBeans to capture and display -->
<formatter usefile="false"type="brief" /> <!-- and also a file formatter for checking later -->
<formatter type="${nb-junit.formatter.type}"
usefile="${nb-junit.formatter.usefile}"
extension="@NB-DBG${nb-junit.formatter.extension}"/>
<!-- run the chosen JUnit test class under the debugger -->
<test todir="${tomcat.build}/logs" name="${test.entry}"/>
</junit>
</target>
</project>