================================================================================ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================================================ ============================================== Building The Apache Tomcat OACC Cluster Module ============================================== This subproject contains the source code for the Tomcat OACC cluster module. This module is a port of the Tomcat 5.5 cluster for use inside Tomcat 6.0. Its purpose is to simplify migration of applications using Tomcat 5.5 and clustering to Tomcat 6. With OACC users can first migrate to OACC without switching to the completely new default cluster implementation of Tomcat 6, and in a second step they can test and migrate from OACC to the default Tomcat 6 cluster. In order to build a binary distribution version of the oacc module from a source distribution, do the following: (0) Download and Install a Java Development Kit * If the JDK is already installed, skip to (1). * Download a Java Development Kit (JDK) release (version 1.5.x or later) from: http://java.sun.com/j2se/ * Install the JDK according to the instructions included with the release. * Set an environment variable JAVA_HOME to the pathname of the directory into which you installed the JDK release. (1) Install Apache Ant 1.6.x on your computer * If Apache Ant 1.6.x is already installed on your computer, skip to (2). * Download a binary distribution of Ant 1.6.x from: http://ant.apache.org/bindownload.cgi * Unpack the binary distribution into a convenient location so that the Ant release resides in its own directory (conventionally named "apache-ant-[version]"). For the purposes of the remainder of this document, the symbolic name "${ant.home}" is used to refer to the full pathname of the release directory. * Create an ANT_HOME environment variable to point the directory ${ant.home}. * Modify the PATH environment variable to include the directory ${ant.home}/bin in its list. This makes the "ant" command line script available, which will be used to actually perform the build. (2) Install Apache Tomcat 6 on your computer * To build OACC you will need Tomcat 6.0.31 or later. The result is compatible with at least 6.0.24, likely also with much older versions. * If Apache Tomcat 6 is already installed on your computer, skip to (3). * Download a binary distribution of Tomcat 6 from: http://tomcat.apache.org/download-60.cgi * Unpack the binary distribution into a convenient location so that the Tomcat release resides in its own directory (conventionally named "apache-tomcat-[version]"). For the purposes of the remainder of this document, the symbolic name "${catalina.home}" is used to refer to the full pathname of the release directory. (3) Building Tomcat OACC (3.1) Checkout or obtain the source code for Tomcat OACC * Tomcat SVN repository URL: http://svn.apache.org/repos/asf/tomcat/sandbox/tomcat-oacc/ * Download a source package from: http://tomcat.apache.org/dev/dist/tomcat-oacc/ * Checkout the source using SVN, selecting the desired version or branch (current development source is at http://svn.apache.org/repos/asf/tomcat/sandbox/tomcat-oacc/trunk/), or unpack the source package. The location where the source has been placed will be referred to as ${oacc.source}. (2.2) Building * Go to that directory, and provide the path to your installed Tomcat 6 in a file ${oacc.source}/build.properties: # We need some jar files from Tomcat to compile against. # Usually they are either in the lib subdirectory of an # installed Tomcat, or in the lib subdirectory of your # Tomcat build directory. Don't add the /lib to the # path, we'll do that in build.xml automatically. # # Windows style catalina.home=C:/Programme/apache-tomcat-6.0.31 # Unix style # catalina.home=/usr/local/apache-tomcat-6.0.31 # # We also need to know, where the tomcat-juli.jar is. # This should be the full path including any sub directories. # # Windows style catalina.extras=C:/Programme/apache-tomcat-6.0.31/bin # Unix style #catalina.extras=/usr/local/apache-tomcat-6.0.31/bin * For some more variables you can define, see the existing file ${oacc.source}/build.properties.default. * In the same directory do: ant * The compiled classes will be placed into ${oacc.source}/build. The jar files needed to install OACC will be placed into ${oacc.source}/dist/lib, the docs will go into ${oacc.source}/dist/docs. (3) Updating sources It is recommended that you regularly update the downloaded Tomcat OACC sources using your SVN client. (4) Rebuilds For a quick rebuild of only modified code you can use: cd ${oacc.source} ant build-oacc If you apply changes to the source and you want to make sure that all classes get compiled correctly by ant, you can delete the results of a previous compilation by ant clean (5) Building the documentation The documentation gets automatically build by the default ant target. If you want to build it seperately, you can use cd ${oacc.source} ant build-docs or you go to the docs directory and do cd ${oacc.source}/docs ant (6) Running the junit tests The path to your junit jar file must be set in your build.properties. For an example see build.properties.default. cd ${oacc.source}/test ant (7) Building the javadoc cd ${oacc.source} ant javadoc (8) Building a OACC release cd ${oacc.source} ant release The dist target is also the default ant target.