We use Ant to build a Java web application. The application will compile and run on both Tomcat 6 and Tomcat 5.5. However, the build process is slightly different depending on which version of Tomcat you have installed: 5.5 keeps jar files that the build needs in $CATALINA_HOME/common/lib and $CATALINA_HOME/server/lib, while 6.0 keeps them all in $CATALINA_HOME/lib.
How can I set up Ant to choose the correct classpath(s) depending on a setting in build.properties? I'd be ok with even having to list the directories to be included in the classpath in a setting in build.properties, but I haven't been able to make this work.
Any suggestions?