Before we can test the Caja system against some actual files and gadgets, we need to obtain the Caja source from the project trunk and then build it.
First, we need to ensure that we have all of the prerequisites in place to download, build, and test the installation. Caja has the following minimum requirements:
Subversion (SVN) to download the source files from the trunk and to keep the downloaded project files up to date.
Java Development Kit (JDK) 6.
Apache Ant 1.7 for the build system.
JUnit for the testing framework. Once you’ve obtained it, simply place the junit.jar file in the $ANT_HOME/lib directory you set up for Ant.
Once we’ve met the prerequisites, we can start the process by obtaining the source code for the Caja project from the SVN trunk. Simply navigate to the folder location where you would like to load Caja and then run the following command:
svn checkout http://google-caja.googlecode.com/svn/trunk/ caja
This code issues an SVN checkout command against the Caja trunk and specifies our output directory to be the caja folder.
Next, we need to build the project using Ant. Simply navigate into
the caja directory and run the
ant command. This will initiate the Ant
build process for the project:
cd caja ant
After the build.xml script is loaded and the build process begins, you should be presented with the following output if the process is proceeding correctly:
Buildfile: build.xml dirs: . . . BUILD SUCCESSFUL Total time: 35 seconds
This series of build messages ...