How to Build caGrid 1.2
Install Prerequisite Software and obtain a caGrid release
Set Up Environment
Set the following environment variables:
- JAVA_HOME (pointing to the root directory of the java installation)
- ANT_HOME (pointing to the root directory of the ant installation)
- GLOBUS_LOCATION (pointing to the root directory of the Globus installation)
- CAGRID_LOCATION (pointing to the root directory of the caGrid installation : this is optional and not used by the build, but these instructions use it for simplicity)
Add ANT_HOME/bin and JAVA_HOME/bin to your environments PATH variable
Microsoft has a help page describing how to set environment variables under Windows XP
.
Validate Prerequisite Software
To validate that we have installed Java, and Ant correctly.

%> java -version
%> ant -version
![]() |
| Result of running java -version |
To validate that we have installed Globus correctly, we will start up the globus container.

%> cd %GLOBUS_LOCATION%\bin
%> globus-start-container -nosec
![]() |
| Result of starting globus |
Build caGrid
Before any caGrid tools can be used, the software must be built. To (re-)build caGrid at any time type these commands:

%> cd %CAGRID_LOCATION%
%> ant all
Test caGrid
You can run the testing suite of caGrid locally, from your caGrid directory.
To run the test suite type:
ant test
NOTE: To run the tests you may need to copy junit.jar to ANT_HOME/lib. e.g.(in windows)
cp %GLOBUS_LOCATION%\lib\junit.jar %ANT_HOME%\lib
OR (in unix)
cp $GLOBUS_LOCATION/lib/junit.jar $ANT_HOME/lib
NOTE: Some of the tests require a MySQL database
to be installed and accessible via local JDBC.
Other Commands
To see all the documented ant targets available, type the following from your caGrid directory:
ant -p







