Assuming you read the last post, you should have a basic understanding of projects, targets and tasks. In this post, some different tasks, and try to make a slightly more practical ant script. Suppose our build requires a little bit more complexity than displaying "Hello World." In this case, it has to meet the following requirements:
- The file HelloWorld.java must be compiled
- HelloWorld.class should include debug symbols.
- HelloWorld.class must be zipped
Let's start by creating a basic project skeleton. For right now, we'll only include one target: "build". Remember to save your project in "build.xml".
<project name="HelloBuilder" default="build">
<target name="build">
</target>
</project>
At this point, you've doubtlessly realized that unless we learn new tasks, we will be doomed to writing useless ant scripts forever...