Chapter 17. Ant


Enterprise software development involves a (sometimes complex) combination of source code, configuration files, HTML pages, images, and various other assets that need to be processed, combined, and deployed in order to create a running application. In addition to compiling and running code, a number of other tasks need to be performed to manage an enterprise project: generating documentation, running tests against code, interacting with source control systems, and more.

Over the years, several tools have emerged to help manage the various repetitive tasks involved with developing software. Earlier examples include make and gnumake, command-line tools that have been used to manage building and packaging code, primarily on Unix systems. make and its variants utilize a text-based command file, a makefile, that you use to specify how various tasks (compiling code, generating executables, etc.) are to be carried out, as well as dependencies between various tasks (e.g., an executable should be generated only if all of the compiled code is up-to-date).

In Java development projects, Ant has emerged as the de facto tool of choice for these types of tasks. Integrated development environments (IDEs) typically provide build/deploy tools, but Ant supports these and other development tasks in an independent manner, separate from any specific IDE. This, along with the nearly ubiquitous support in Java IDEs for editing and exercising Ant buildfiles, has made Ant a very popular tool for Java development projects. In this chapter, we provide a brief overview of the basics of Ant and how to write an Ant build script, followed by specific details on how Ant can assist in enterprise development projects, in terms of building, assembling, and deploying J2EE components as well as other key development tasks.

This tutorial is meant to be just that: a tutorial. We don't attempt to cover all aspects of the Ant build model, and we provide details on only a subset of the core tasks that are bundled with Ant. For more complete coverage, we refer the reader to the official documentation on the Ant project site (http://ant.apache.org) and to Ant: The Definitive Guide by Steve Holzner, an O'Reilly book devoted to all things Ant.



Java Enterprise in a Nutshell
Java Enterprise in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596101422
EAN: 2147483647
Year: 2004
Pages: 269

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net