Article:
  Top 15 Ant Best Practices
Subject:   Put Ant in Version Control too!
Date:   2004-01-03 20:26:54
From:   javaguy_98
The article almost implied it, but it is worth saying explicitly. The version of Ant you are using for your project should go into your version control repository as well.


While the article discouraged 'wrapper' build scripts, they serve a useful purpose when you have Ant in version control with your project - 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. when Ant is installed on your machine, it is both outside of source control, and a dependency that can be difficult to manage across multiple projects.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Put Ant in Version Control too!
    2004-04-19 05:26:26  wrschneider99 [View]

    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.