ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Tayek <rta...@mediaone.net>
Subject Re: Is there an article, FAQ, tutorial, guide, resource, etc. for integrating JUnit with Ant?
Date Fri, 11 Jan 2002 19:58:24 GMT
At 10:51 PM 1/10/02 -0800, you wrote:
>Is there an article, FAQ, tutorial, guide, resource,
>etc. for integrating JUnit with Ant?

i got this build to work and it is not very different from the sample in 
the and doc.

<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"/>
   <path id="compileClasspath">
     <pathelement path="D:/java/junit3.7"/>
     <pathelement location="junit.jar"/>
   </path>
   <target name="init"> <tstamp/> <mkdir dir="${build}"/> </target>
   <target name="compile" depends="init">
     <javac srcdir="${src}" destdir="${build}">
     <classpath refid="compileClasspath"/>
     </javac>
   </target>
   <target name="test" depends="compile">
     <junit fork="yes" printsummary="on"  haltonfailure="true">
       <classpath> <pathelement path="."/> </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/
orange county java users group http://www.ocjug.org/
want privacy? http://www.freedom.net/
hate spam? http://samspade.org/ssw/


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message