Article:
  Top 15 Ant Best Practices
Subject:   Put Ant in Version Control too!
Date:   2004-04-19 05:26:26
From:   wrschneider99
Response to: Put Ant in Version Control too!

you can have a build file that searches the proejct tree for the Ant install to use, then you can have different versions of Ant across different projects.


I've found it useful to have a wrapper script that sets environment variables (ANT_HOME, CLASSPATH and JAVA_HOME) and then invokes $ANT_HOME/bin/ant. This is essential for an internal development environment where some projects depend on JDK 1.4, some still depend on 1.3, and people switch between projects often. Whatever happens to be in the user's JAVA_HOME at the current moment may not be the right one, and using the wrong JDK may produce very subtle and hard-to-understand errors at runtime.