Enterprise Tasks

In addition to the basic Java development tasks we’ve discussed in the previous sections, enterprise application development requires special support in terms of managing component development and testing; assembling and deploying applications; preserving platform portability in the face of different application server vendors; and managing multiple application environments.

In the following sections, we’ll explore each of these areas in terms of the Ant tasks that are relevant to each and look at some approaches to designing your Ant buildfiles to support each of these enterprise development issues.

Assembling Components

When developing J2EE components, you need to perform many of the basic Java development tasks we’ve already seen: compile Java code into classes, construct a jar file from a set of files, move the jar file from one place to another, and so forth. Some complexities are introduced when working with enterprise components, however. Component archives need to be assembled using specific file layouts. Depending on the application server being used, additional processing of your Java classes or component archives may be necessary as well.

The jar file formats used for component assemblies are more complicated than the simple class hierarchies used for libraries. As discussed in Chapter 2 and detailed in Appendix A, component archives follow a specific structure that dictates where each asset (deployment descriptors, libraries, classes, etc.) must reside ...

Get Java Enterprise in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.