At 01:44 PM 2/25/02 -0800, you wrote:
>I... I'd now like to set up to use JUnit. ...
>I'm having trouble understanding exactly what I have to put in the "build.xml"
>file,
the script below works for me. you probably have to put junit.jar in
$ANT_HOME/lib also. be sure you get the optional.jar.
<project name="MyProject" default="dist" basedir=".">
<property name="src" value="."/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="test" value="test"/>
<target name="init">
<tstamp/> <mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}">
<classpath>
<pathelement location="/l/junit.jar"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile">
<junit fork="yes" printsummary="on" haltonfailure="true">
<classpath>
<pathelement path="build"/>
</classpath>
<test name="MainTest"/>
<formatter type="brief" usefile="false"/>
</junit>
</target>
<target name="dist" depends="test">
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>
hth
---
ray tayek http://home.earthlink.net/~rtayek/
actively seeking telecommuting work
orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>