Tuesday, January 24, 2012

Ant - Hello World

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

We Live In A Simulation

 You read that title right. We live in a simulation. Nothing is real. It's as real as you want it to be. But that doesn't mean it...