examples/tomcat6/apache-tomcat-6.0.35-src/BUILDING.txt
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 20 Mar 2015 14:29:53 +0100
branchcvs_MAIN
changeset 3412 df11bb428463
parent 3360 1a8899091305
permissions -rw-r--r--
Merged with mercurial revision 4f3cc813be4 (8 changesets total) Merged changesets: - f14cd4bbd33f: Jan Vrany, 2015-03-11 11:41 +0000: Zulu support: added Zulu7 and Zulu8 JavaReleases - f8bc54a17beb: Jan Vrany, 2015-03-11 12:38 +0000: Java release: On UNIX, prefer OpenJDK over Zulu, on Windows, prefer Zulu over Oracle JDK - 5dd55aa7d949: Jan Vrany, 2015-03-12 14:50 +0000: Zulu support: move natives from OracleJDK7 to OpenJDK7 as they are used by OpenJDK7 on Windows - 2127b5057d60: Jan Vrany, 2015-03-13 09:40 +0000: testing: improved run-all.rb script to run tests with different configurations. - a6d8f5c2ad73: Jan Vrany, 2015-03-13 13:33 +0000: Updated .hgignore - e18d5c89221d: Jan Vrany, 2015-03-13 16:09 +0000: Java release: consult 64bit registry entries as well as 32 bit when searching for installed JDKs - 183e4567bda7: Jan Vrany, 2015-03-17 20:56 +0000: Java release: added #is32bit & #is64bit testing methods - 4f3cc813be4b: Jan Vrany, 2015-03-19 17:27 +0000: settings: JavaCodeLibrary validation refactored and improved

================================================================================
  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.
================================================================================

$Id: BUILDING.txt,v 1.5 2015-03-20 12:08:03 vrany Exp $

            ====================================================
            Building The Apache Tomcat 6.0 Servlet/JSP Container
            ====================================================

This subproject contains the source code for Tomcat 6.0, a container that
implements the Servlet 2.5 and JSP 2.1 specifications from the Java
Community Process <http://www.jcp.org/>.

Note: If you just need to run Apache Tomcat, it is not necessary to build
it. You may simply download a binary distribution. It is cross-platform.
Read RUNNING.txt for the instruction on how to run it.

In order to build a binary distribution version of Apache Tomcat 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) Building Tomcat 6.0

(2.1) Checkout or obtain the source code for Tomcat 6.0

* Tomcat 6.0 SVN repository URL:
  http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/

* Download a source package from:
  http://tomcat.apache.org/download-60.cgi

* Checkout the source using SVN, selecting a tag for released version or
  trunk for the current development code, or unpack a source package. The
  location where the source has been placed will be referred as
  ${tomcat.source}.

(2.2) Building

* Go to that directory, and do:

    cd ${tomcat.source}
    ant download
    ant

* WARNING: Running "ant download" command will download libraries required
  to build Tomcat to the /usr/share/java directory.  On a typical Linux or
  MacOX system an ordinary user  will not have access to write to this
  directory, and, even if you do, it may not be appropriate for you to
  write there.

  On Windows this usually corresponds to the "C:\usr\share\java"
  directory, unless Cygwin is used. Read below to learn how to customize
  the directory used to download the binaries.

* NOTE: Users accessing the Internet through a proxy must use a properties
  file to indicate to Ant the proxy configuration. Read below.

* The build can be controlled by creating a ${tomcat.source}/build.properties
  file, and adding the following content to it:

    # ----- Proxy setup -----
    # Uncomment if using a proxy server
    #proxy.host=proxy.domain
    #proxy.port=8080
    #proxy.use=on

    # ----- Default Base Path for Dependent Packages -----
    # Replace this path with the directory path where dependencies binaries
    # should be downloaded
    base.path=/home/me/some-place-to-download-to


(3) Updating sources

It is recommended that you regularly update the downloaded Tomcat 6 sources
using your SVN client.

(4) Rebuilds

For a quick rebuild of only modified code you can use:
   
    cd ${tomcat.source}
    ant

(5) Building the servlet and jsp API documentation

The documentation can be easly built:

    cd ${tomcat.source}
    ant -f dist.xml dist-javadoc

(6) Building the extras (commons-logging, webservices etc.).
    cd ${tomcat.source}
    ant -f extras.xml

(7) Building a release running tests:

    cd ${tomcat.source}
    ant -f dist.xml release