In the early days of Scarab the build system was entirely based on Ant. We have recently switched over to use Maven as our primary build system. But for quite a few reasons we continue supporting an Ant based build. The current Ant based build system has been stripped down to a basic subset of the original functionality. This subset allows to build a Scarab instance from the Source distribution, but all "special features" like building the documentation set or updating the jar repository and so on have been entirely moved to the Maven world.
NOTE: The file location of the file build.properties has changed! If you are upgrading from an old system, please ensure, that your old build.properties file migrates to
$SCARAB_ROOT/build.propertiesIn most cases you will utilize Ant as follows:
1:> cd $SCARAB_ROOT/build 2:> ant 3:> ant create-db
build/build.xml.
Some of the targets are described below.
deploy (default target)
Builds all necessary preliminaries i.e. the Torque database layer
and the java-classes. Then creates a ready to use Webapplication
in ../target/scarab. Finally generates the default
runtime properties as specified in build.properties
The directory tree in ../target/scarab is ready
for use as a Webapplication.
create-db
Builds the initial database. You must ensure, your RDBM system is
up and running and all necessary drivers have been added to your
/lib directory before you started the deploy target (see above).
For Hypersonic and MySQL everyting is allready setup for you. For
other databases see the specific informations [FIXME] Where are these infos?[HD]
create-custom-property-file
Regenerates the custom.properties from the build.properties
You may use this target whenever you have changed properties in your
build.properties which must propagate to your runtime environment.
If you don't want to redeploy the whole webapplication, just start
this target and then restart tomcat. Please note, that in general
it is NOT sufficient to simply copy your build.properties
to your custom.properties.
generate-om
Generates the java-sources of the Torque Database layer. This target is
normally used internally from other Ant tasks. But if you want to manually
recreate the sources files alone, this target is your choice.
compile
Generates the class files out of the java sources.
clean
Removes the target files in ../target/scarab. You may want to clean
your installation before rebuilding Scarab in order to ensure your
runtime system is consistent with your source tree.
clean-all
Like clean but also removes any logfiles in the tomcat/logs directory
war
Creates a ready to distribute war file.