Chapters 5 and 8. Later in this chapter we’ll describe the unit-testing process and discuss the purpose of the dist-test target shown in Chapter 15. These targets are not depicted in Figure 13.3.

Figure 13.3: BigRez.com build targets.
There is no single correct way to name the targets in your build script. The Ant utility doesn’t mandate a particular naming scheme, and you’ll find many different configurations in the open-source development community. Pick a scheme that makes sense for your application. Be sure target names are an accurate reflection of the tasks performed by the target. Don’t have the compile target move compiled class files to the exploded application in the domain, for example. That’s the role of a deploy or dist task in most cases.Many build files also include an all or everything target that explicitly invokes all of the targets in the build file in the correct order. If you link the main targets appropriately using depends attributes this should not be necessary.
Best Practice | Use the Apache Ant build utility to manage the build process for developer workstations and to create deployment archive files destined for test and production. Choose a consistent naming convention for your build targets, and keep each target focused on a single activity. |