-------- Original-Nachricht -------- > Datum: Tue, 13 Apr 2010 17:37:37 +0100 > Von: Greg Roodt <gro...@gmail.com> > An: Ant Users List <user@ant.apache.org> > Betreff: Two pass compile for instrumented code
> Hi > > I have an Ant build that consists of the basic compile, test, package, > report phases. > The report phase is a bit slow (Clover particularly) for developers > looking > for quick feedback on tests. Developers dont need Clover reports, > Checkstyle > etc etc every time and we mainly prefer these to be generated on our CI > server. This would be easy except for the requirement that for some > reports > (Clover again) the compiled code needs to be instrumented. > > Basically, Im looking for a 2 pass compile. The first compile is a regular > Java compile. The second is a compile with Clover instrumentation enabled. > These would need to compile to different destination directories, lets > call > them bin and bin-clover. > > During the compile phase, if we are generating a report, we need to > compile > to both bin and bin-clover. Do you actually need to compile to both ? Or do you compile to bin, then instrument the classes from bin into bin-clover ? When not generating reports, only to bin. > During the test phase, if we are generating a report, we need to run the > tests against bin-clover. When not generating reports, we need to run the > tests against bin. I would do something like this <condition property="classes.dir.for.tests" value="bin-clover" else="bin"> <isset property="clover"/> </condition> <junit> .... <classpath> <pathelement location="${classes.dir.for.tests}"/> </classpath> </junit> Regards, Antoine --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org