This is my first ant project and I just can’t seem to wrap my mind around it. I want to effectively delete the jar and then bring it back after I run my unit tests. I think this can be simulated with the exclude command. I also think that it should be done under the <classpath> tag. Am I correct in my thinking? I also want this jar to still exist, I just want my build to ignore it when i run this particular target. I have tried this:
<junit fork="no" showoutput="false" printsummary="yes" haltonfailure="false">
<classpath>
<fileset dir="${lib.dir}">
<exclude name="**/*xmlparserv2.jar" />
</fileset>
</classpath>
</junit>
But to no avail. Can anyone point me in the right direction?
I ended up moving the jar around during my tests. At the beginning, I delete it, and keep a reference at the root of my class path. Then at the end, i just copy it back: e.g.