Apache Ant 101: Make Java builds a snap

In this tutorial, you’ll learn about Ant, a build tool for Java ….. This editor provides content assistance — for example, typing <pro and then …

More PDF Content

Apache Ant 101: Make Java builds a snap
Apache Ant is a Java-based build tool. According to its original author, James Duncan Davidson, the name is an acronym for another neat tool. Build tools are used in software development to transform source code and other input files into an executable form (and maybe into installable product images as well). As an application\’s build process becomes more complex, it becomes increasingly important to ensure that precisely the same build steps are carried out during each build, with as much automation as possible, in order to produce consistent builds in a timely manner. Traditional projects in C or C++ often use the make tool for this purpose, where the build tasks are performed by invoking shell commands, and dependencies are defined between each of the build tasks so that they are always performed in the necessary order. Ant is similar to make in that it defines dependencies between build tasks; however, instead of implementing build tasks using platform-specific shell commands, it uses cross-platform Java classes. With Ant, you can write a single build file that operates consistently on any Java platform (as Ant itself is implemented in the Java language); this is Ant\’s greatest strength. Ant\’s other key strengths are its powerful simplicity and its ability to be seamlessly extended with custom capabilities. Hopefully, you will appreciate these strengths after completing the rest of this tutorial.

Section 1. Getting started
What is this tutorial about?
In this tutorial, you\’ll learn about Ant, a build tool for Java TM projects. Ant has quickly become popular among Java developers because of its flexibility and ease of use, so you it owe it to yourself to find out more about it. You don\’t need any prior experience with or knowledge of Ant before you proceed. We\’ll first see the basic structure of Ant build files, and learn how to invoke the tool. We\’ll walk through the steps involved in writing a build file for a simple Java project, and then look at some of Ant\’s other useful functions, including filesystem operations and pattern matching. We\’ll finish by writing our own Java class that extends Ant\’s functionality. In the course of the tutorial, we\’ll show you how to run Ant both from the command line and from within the open source Eclipse IDE. You don\’t need both environments
Apache Ant 101: Make Java builds a snap (c) Copyright IBM Corporation 1994, 2007. All rights reserved.

Section 2. Ant basics
Ant basics introduction
In this section, we\’ll give you an overview of Ant\’s capabilities and strengths, and discuss its history and rise in popularity. We then delve straight into the fundamentals of Ant by examining the basic structure of a minimal build file. We\’ll also introduce the concepts of properties and dependencies.

Download Apache Ant 101: Make Java builds a snap pdf from www6.software.ibm.com, 32 pages, 666.61KB.