From Source HOWTO

Building Weaver from Source

This document describes how build Weaver from source code.

Intended Audience

This document is aimed at at anyone who wishes to build Weaver from source. The usual reason for this is either to add new features or to track down and fix a bug.

Steps

In order to build Weaver you should follow these steps:

  1. Gather required 3rd party software.
  2. Get the Weaver build environment and build using either Eclipse or Apache Ant.

Gathering the Required 3rd Party Software

The the following table lists the third party software, not included in the build environment, needed to build Weaver from source. These requirements are in addition to those listed to run Weaver.

ItemVersionLinkComment
Apache Ant version 1.6.1Home Only needed to build using Ant.
Java2HTML 1.3.1 Home Only needed to rebuild the browsable source.
NullsSoft's NSIS 2.0 Home Only needed to rebuild the installer.

The following table lists the third party software used by and already contained in the build environment.

ItemVersionLinkComment
Apache Log4j 1.2.8 Home
JSTL 1.1.2 Home standard.jar and jstl.jar
Jakarta Commons EL Library 1.0Home

Building Using Eclipse

If you use the Eclipse IDE then building Weaver could hardly be more straightforward. Eclipse is my preferred option when developing and debugging.

Ensure that you have your Tomcat's home directory set in Eclipse via Windows -> Preferences -> Tomcat:

Setting TOMCAT_HOME in Eclipse

Go to the CVS perspective and add Weaver's repository as follows:

Adding the CVS repository

Locate the version of Weaver module you want in the CVS repository browser, then right click and "Check Out As Project".

Then ... wait ... that is all there is to it! You are ready to go! Classes will build in to core/admin/WEB-INF/classes. Create a context in Tomcat's server.xml pointed to Weaver's admin directory and you have a build environment with a ready to run Weaver application that just contains the Administrative Console.

Building Using Ant

The Weaver build environment ships with a build.xml for Ant. Ant is my preferred option when building distributions.

First you need to get the build environment from CVS (if you have not already done this using Eclipse as described above). You may access the CVS repository anonymously using the following value for CVSROOT:

:pserver:anonymous@cvs.sourceforge.net:/cvsroot/weaver

Then ensure that the following environment variables are set as required:

  • CATALINA_HOME - to your Apache Tomcat installation directory.
  • ANT_HOME - to you Apache Ant install directory.
  • NSIS_HOME - to your NSIS installation directory (if you wish to rebuild the installer).
  • J2H_HOME - to your JavaToHTML installation directory (if you wish to rebuild the formatted source).

Ant will list and describe the available targets if you run:

ant -projecthelp

Many of the build targets allow you specify a value for the build.type proptery, e.g.

ant -Dbuild.type=d dist

As its name suggest this property defines the type of build we are doing, possible values are:

ddeveloper build - this is the default
sstable build
rproduction release