Automating the Example
It's time for a little housekeeping. To go much further, you need to automate. You probably already use Ant. It's a standardized way to organize all of the tasks that you need to build your application. If you don't already use it, you need to.
Ant has become ubiquitous. In order to work with Java tools, you need to be able to speak the language. We're not going to provide yet another justification for Ant in this chapter, since you've probably read enough of them already.
How do I do that?
You'll need to download an Ant distribution. You may as well use the one that comes with Spring (http://springframework.org/ ). To run all of the examples for this book, you'll want to get Spring version 1.1, or later. Follow all of the directions for your platform.
Next, you'll organize the directory structure in a way that's friendly for web applications and Spring. I recommend that you use the organization that you'll find with the Spring sample applications, so that you'll have a working example. These are the directories that you'll use:
- src
This directory has the home for all of the source code in your application. As usual, you'll want the directory structure to mirror your package structure.
- test
This directory has the home for all of your unit tests. We'll talk more about JUnit in the last lab.
- db
This directory has the home for all database specific scripts, configuration, and code. Some of these will be configuration files, some will help set up a database with ...