Command Line

Alexandria is invoked using the alexandria script. The script file should either be launch from the home directory for Alexandria or the $ALEX_HOME environment variable should be used to point to the home directory for Alexandria.

Runs can be split up to allow certain parts of the processes to be run at different frequencies than others. Processes like JavaDoc and JXR man not need to be run as often as the build and test phases of the run. Alexandria has the following phases:

cvs Get the latest version of modules from CVS
build Runs module build files
javadoc Create JavaDocs
jxr Generate cross referenced Java code
menus Generate Alexandria menus
test Run test build files
all Runs all the Alexandria phases
unlock Unlock Alexandria. In the unlikely event of an Alexandria run failing, a lock file may be left behind preventing further runs from completing. This option clears this file.

Set up Alexandria in crontab and watch him it ;0)

Using Cron is a good way to run the JavaDoc and JXR phases on a daily bases leaving the build and test phases to be run by CVS.

CVS Intergration

Alexandria can be hooked into CVS using the loginfo file. loginfo contains scripts which should be run every time a CVS log entry is made (loginfo is recommended over commitinfo as commitinfo is called for every file committed and loginfo is only called for each log entry). Adding Alexandria to this file will allow the module to be built and tested everyt ime a change is made to CVS. Alexandria implements a simple locking mechanism which means that builds will not take place in parallel this stops multiple changes starting multiple parallel builds.

# The "loginfo" file controls where "cvs commit" log information
# is sent.  The first entry on a line is a regular expression which must match
# the directory that the change is being made to, relative to the
# $CVSROOT.  If a match is found, then the remainder of the line is a filter
# program that should expect log information on its standard input.
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
# If the name ALL appears as a regular expression it is always used
# in addition to the first matching regex or DEFAULT.
# You may specify a format string as part of the
# filter.  The string is composed of a `%' followed
# by a single format character, or followed by a set of format
# characters surrounded by `{' and `}' as separators.  The format
# characters are:
#   s = file name
#   V = old version number (pre-checkin)
#   v = new version number (post-checkin)
# For example:
#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
alexandria build test &

Copyright © 1999-2001, Apache Software Foundation