Building and Running the Application

There are four main steps:

  1. Configuring the workspace to run in your local environment
  2. Compiling the source code and deploying an EAR
  3. Creating the database schema and loading test data
  4. Starting the server

Configuration

Edit the file properties/local.properties:

Edit the file ant.cmd:

Edit bootstrapsetenv.cmd so that it can find your JDK.

Creating the EAR

This step creates an EAR that is deployed in the directory deploy/jboss/server/devel/deploy

cd into the top-level directory (example-).

Run the command "ant create-setenv"

Run the command "ant deploy"

This is the directory where ant is run

Creating the Database

This step creates the database and loads the test data

Create a user in the database and make sure the db.* properties in properties/local.properties are correct.

Run "ant create-db", which does the following:

  1. Uses SQLPlus to run a create-tables.sql script. It logs in using the user/password specified by the db.* properties in local.properties
  2. Uses sqlldr to load some zip codes
  3. Runs a java program to populate the database with the rest of the test data:

    ignore this error - java.io.FileNotFoundException: objectid.properties

Starting the Server

This step runs JBoss in the directory deploy/jboss

To start jboss run the command "ant start"

Running the Test Cases

Build.xml defines the following targets for running tests: