Developing Web Applications With Ant by Richard Hightower - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Creating a Project Directory Structure for Model

This part of the example application uses the smallest build file. Basically, we need to create a JAR file that acts as a common library. We don't need any special manifest file or deployment files. This is the most basic build file and directory structure you will see in this example. Here is the directory structure for the Model directory:

Root of Model
| build.xml
|
+---src

+---xptoolkit
\---model
GreetingFactory.java
Greeting.java
GreetingBean.java

Notice that there are only four files in the Model directory and subdirectories. Also notice that the name of the Ant file is build.xml. The build.xml file is the default build file; if Ant is run in this directory, it automatically finds build.xml without you having to specify it on the command line. Let's examine the model build file in greater detail.