ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott deBeaubien" <>
Subject Junit help -
Date Wed, 22 Nov 2006 22:00:27 GMT
I have used ant for some time now, but JUnit is not behaving as I would
expect.  JUnit _tasks_ are not behaving as expected or as desired.  I
have a target:
 <target name="runTests" depends="CopyResources" description="run the
JUnit tests" if="${JUnit}">
      <junit printsummary="yes" haltonfailure="yes">
          <pathelement location="${build}_${DSTAMP}${TSTAMP}"/>
        <formatter type="plain"/>
        <batchtest fork="no" todir="${basedir}/test">
          <fileset dir="${build}_${DSTAMP}${TSTAMP}">
            <include name="**/Test*" />
              <exclude name="**/*KA.class"/>
    <target name="junit" depends="runTests">
        <delete dir="${build}_${DSTAMP}${TSTAMP}" />

The target junit needs the tests to run first, and then afterwards I
would like it to remove the directories where the tests were run.  We
don't need them clogging disk space, we have the resulst written to a
"test" directory anyhow.  But, the _delete_ task in the junit target
never gets done.  It acts like it cannot do it for some reason.  Is it
perhaps because we have loaded a VM that has loaded classes from those
folders now and they are now "locked?"  I do similar deletes at the end
of a jar target/task in the same build.xml, and those deletes happen
correctly.  Only in the JUnit instance does it not work.  In fact, JUnit
seems to not let any other task run after it.  I never even see the
output from the target "junit" after the "runTests" stage is done.
Any ideas anybody?
Please reply directly, as I cannot subscribe to the mailing list.
Company policy, sorry.  Silly but....
Scott deBeaubien
Software Engineer
Swisslog <> 


This message may contain legally privileged or confidential information and is therefore addressed
to the named persons only. The recipient should inform the sender and delete this message,
if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of this message.
The sender has activated an automatic virus scanning, but does not guarantee the virus free
transmission of this message.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message