Using Ant

Summary

This chapter began with a look at Ant’s command-line options. These allow you to customize and tweak Ant’s functionality to a great extent. One of the most powerful options at the command line is the ability to specify property values and override the values of properties set within the file.

The rest of the chapter was dedicated to the basics of build files, which included the main nontask elements and property files. The main message to retain from this chapter is that you should endeavor to write the best build files you can. This means you will have to use many techniques borrowed from the world of coding. Ant allows you to reuse helpful pieces of the build file to cut down on redundancy and repetition and lets you import property values from a number of places. Both techniques lead to a loss of redundancy and an increase in centralization and maintainability. The more you group important configuration information in one place, the easier it is to maintain.

Ideally, you will get to a point where it is only the property file that changes when you send out the project, and not the build file.

Keywords

Prefix J2ee 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Matthew Moodie 2006

Personalised recommendations