Java Debugging

Accomodating building optional components in an ant build script

I've been puzzling over the question of how to accommodate optionally building JUnit support into a software project I'm working on. JUnit's classes aren't going to always be present and therefore we only want to include the JUnit-dependent classes if JUnit's .jar file is present. Otherwise we'd get a compile error. Unfortunately ant's documentation leaves some things to be desired and this was one of them.