Usually you wouldn't ever use a hello world example in Ant. Outputting text isn't really the goal of the thing. But this will give you a chance to see how to run an ant build.
So, open up a text editor and save the following as build.xml
.
<project name="HelloWorld">
<target name="sayhello">
<echo>Hello World!</echo>
</target>
</project>
You would then run the program as:
ant sayhello
As you might expect, it simply says Hello World!
Echo messages are useful to track the process of an Ant Task when it's going through specific procedures that you specify.
No comments:
Post a Comment