Ant Simple Example

From HaFrWiki
Jump to: navigation, search

Below is a very simple build file for ANT Example.xml.

<project name="Example" default="show" basedir="." >
   <target name="show" depends="" description="Shows some settings">
       <echo>This will be displayed</echo>

To run this script:

  ant -f Example.xml

wil give the result:

Buildfile: Example.xml

     [echo] This will be displayed

Total time: 0 seconds

The project tag names the project to run, the default tag indicates the default target to execute. the basedir give the default base directory (here the current directory). link title