I followed these steps to checkout and build the Fortress project.
1. I created a Fortress directory to contain my Fortress code and the main project.
2. Use this hg command to check out the entire project:
hg --config 'web.cacerts=' clone https://hg.java.net/hg/projectfortress~sources PFC
A new directory named PFC is created under the current directory.
3. Use "cd PFC" to move to the primary directory.
4. Use "./ant" to run a default compile on the entire source.
The default ant installation on some Linux systems fail with the ant script delivered with Fortress; 64 bit Fedora-7 for example. Although there are complicated ways to avoid the issues, simply using ant rather than ./ant works as expected. Most problems while compiling the code are related to missing jar files, incorrect classpath, or missing optional ant tasks. For example, if only the JRE is installed rather than the SDK, tools.jar will be missing.
The Fortress build.xml file uses the depend optional ant task. If the depend task is not available, the first part of the error message is similar to
BUILD FAILED .../PFC/build.xml:259: Could not create task or type of type: depend.
The command "yum install ant-nodeps" installed the depend task problem. The command "sudo apt-get install ant-optional" worked on Ubuntu 7.10. Different distributions will obviously require different dependencies to be installed.
Commands that can be used to compile, clean, and test Fortress are:
ant clean ant compile ant test
Use "ant clean" to start completely fresh with the Fortress build process. Although this is not usually required, it is a good idea when a build fails. Use "ant compile" to build the Fortress system. Use "ant test" to run the test programs and verify that the system is working. Use "./test" to load the JUnit GUI and run the Fortress tests.
5. Add PFC/bin to your path.
You have now installed Fortress on your machine.
Whenever you want to update your installation, run the command
hg pull -u
and repeat steps 3 and 4.
NOTE: These instructions are for SXDE (aka Nevada). They have been tested on SXDE build 84 available from http://www.opensolaris.org
$ mkdir ~/work $ cd ~/work $ hg --config 'web.cacerts=' clone https://hg.java.net/hg/projectfortress~sources PFC $ cd PFC $ ant
For building tests, the bundled ant won't work as it's missing junit dependencies. The easiest way around it is to install ant from blastwave repository (http://www.blastwave.org).
To install blastwave package manager, use:
$ su # pkgadd -d http://www.blastwave.org/pkg_get.pkg
Then install ant and complete the tests using:
$ su # pkg-get -i ant # ^D $ /opt/csw/bin/ant test
Set environment variable FORTRESS_HOME to ~/work/PFC.
Add ~/work/PFC/bin to your path to call fortress from any directory.