Ant Simple Example

From HaFrWiki42
Revision as of 14:46, 7 November 2012 by Hjmf (talk | contribs) (Created page with "Below is a very simple build file for ANT Example.xml. <pre> <project name="Example" default="show" basedir="." > <target name="show" depends="" description="Show...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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