Ant Simple Example
Jump to navigation
Jump to 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> </target> </project>
To run this script:
ant -f Example.xml
wil give the result:
Buildfile: Example.xml show: [echo] This will be displayed BUILD SUCCESSFUL 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