All of the requirements for building i BATIS are in the repository either as JAR
files or as stub classes that satisfy the compile-time requirements. The repository
has the top-level directories shown in table 3.1.
Table 3.1 The directory structure of the source code as available from the Apache Subversion source
This is where you will find the Ant script used to build the framework, and where the build
will put everything that it builds.
Compile-time requirements that can be included in an Apache project are in this directory.
Compile-time requirements that are unavailable for distribution in an Apache project, or
are just too big to include in the repository. For those requirements, we have dummy ver-
sions of them in the repository that “look like” the application programming interfaces
(APIs) and allow us to build iBATIS.
This is where you will find the project documentation.
JavaDoc is a tool for generating API documentation in HTML format from doc comments in
source code, and this is where example configuration files are placed for the build process.
This is where you will find the actual code for the framework. In chapter 12 we will look at
the structure of the application in more detail.
Unit testing is one way to test the correctness of code. The iBATIS framework uses JUnit
for automated unit testing during the build process. The build procedure will run the tests
and generate reports based on the results.
Tools that are useful for working with iBATIS are here. For example, you'll find the Abator
tool in this directory.
Running the build
To build i BATIS , you need to run build.bat (for Windows), or build.sh (for
Linux or Macintosh). The build process will do the following:
Clear out the directories that the build puts its files into.
Compile all of the source code.
Instrument the compiled classes.
Run the unit tests.
Build the unit-test and coverage reports.
Build the JavaDoc-generated documentation.
Build the JAR files for distribution.
Zip all of that into a single file, ready for use as the binary distribution.