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:
- Gather required 3rd party software.
- 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.
Item | Version | Link | Comment |
---|---|---|---|
Apache Ant version | 1.6.1 | Home | 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.
Item | Version | Link | Comment |
---|---|---|---|
Apache Log4j | 1.2.8 | Home | |
JSTL | 1.1.2 | Home | standard.jar and jstl.jar |
Jakarta Commons EL Library | 1.0 | Home |
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:
Go to the CVS perspective and add Weaver's repository as follows:
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:
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:
Many of the build targets allow you specify a value for the build.type
proptery, e.g.
As its name suggest this property defines the type of build we are doing, possible values are:
d | developer build - this is the default |
s | stable build |
r | production release |