Ant Simple Example

From HaFrWiki42
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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