Ant

From Director Online Wiki
Jump to: navigation, search

Introduction

Ant is a very nice little tool that allows for automation of builds with tasks.

It's API is expandable with new tasks and customizable to one's needs.

Most top development tools provide Ant integration (at least in the Java World - .Net World has a similar tool which is script compatible called NAnt).

Requirements

Ant requires the use of the JDK, which can be found here:

http://java.sun.com/javase/downloads/index.jsp


Windows

Instalation

  • Download the latest version here:
  • Then unzip on a new directory (suggestion: under the same directory that Apache Web server installed)
  • Define the environment var ANT_HOME with that directory (no slash at the end)
  • Add the %ANT_HOME%\bin to the PATH environment var

Testing

Open a command prompt and type "ant" and then "ant -version". This should be the answers:

C:\Users\User>ant Buildfile: build.xml does not exist! Build failed C:\Users\User>ant -version Apache Ant version 1.7.1 compiled on June 27 2008

If you get a message referring the innability to find the tools.jar file, then, that just means that you are using the JRE version of Java.

To correct the issue, the best way is to install the JDK and point the "JAVA_HOME" to the main directory where it was installed (making sure the tools.jar is found by the system may also solve the issue - by adding the directory where it is to the path for instance - is also a solution, but you can run into other issues).

Linux

Mac OS X

Sources