Compiling the CHCI source with ant


As an alternative to using make to compile the source, you can use Ant. Ant is in most ways similar to make, but was designed with Java in mind.

The Ant home page:
http://ant.apache.org/

Installing Ant is simple on most platforms. The main key is to set the environment variables JAVA_HOME to the base directory of where your Java SDK is located and to set ANT_HOME to the base directory of where you installed Ant. Note, these should be set to the base directory and not a "bin" subdirectory where the executables are installed.

Under Windows (not sure about other platforms), there is an "ant" executable in ANT_HOME\bin that you should make sure is in your path.

The Ant build file "build.xml" is in the base directory of the source tree. The build files are written in XML, but can look similar to make files in that they essentially have targets with dependencies and a list of commands to build the target.

To compile the source, make sure the paths in "build.xml" are set to legitimate values. In particular, at the top the buildfile there are a number of property lines defining the paths to jar files.

<property name="path.x" value="/directory/x.jar"/>

A copy of the relevant jar files organized as specified in the buildfile is available to download as [development.zip -- needs update], but it's currently a 15MB download that extracts to 45MB (I'll try to get a smaller version of this soon). Extract to C:\ under Windows and the jar paths will match the buildfile.

Make sure the directory and jar file names are legitimate. You can then compile the source (at least under windows) using:

ant vt

There are other more specific targets in the buildfile that know how to run the code once it is built.

Using Ant under Windows can eliminate the need to use the Cygwin tools. To replace cvs (included in Cygwin) I recommend WinCvs available from SourceForge.net, but there are other CVS clients available. (They also have a WinCVS-SSH-Guide.) You can get a Windows version of OpenSSH from Network Simplicity. There are some tips on using SSH with WinCvs that should be helpful as well.


/public/chci/howto/dev/ant.html Login | Web Editor | Full Editor
Last modified 5/22/03 2:47 PM by isenhour (history)
Site contents