Using the JAKARTA-TAGLIBS Source Distribution

Prerequisites

To successfully build the JAKARTA-TAGLIBS custom tag libraries, you must download and install the following software components (where $JAKARTA_HOME refers to a directory into which you download and install the various Jakarta software components):

Download and Installation

Source downloads of the JAKARTA-TAGLIBS distribution, as with all other Jakarta projects, are available from the Jakarta web site at http://jakarta.apache.org/downloads/sourceindex.html.

Download and unpack the JAKARTA-TAGLIBS distribution (from the link above) into a subdirectory named jakarta-taglibs under the $JAKARTA_HOME directory described above. For example, you might end up with the following directory structure:

your_jakarta_home_directory/
    jakarta-ant/                <-- Contains binary distribution of Ant
        lib/                    <-- Binary libraries directory
	    ant.jar             <-- Ant executable classes
    jakarta-servletapi/		<-- Contains binary distribution of Servletapi
        lib/                    <-- Binary libraries directory
	    servlet.jar         <-- Servlet API classes
    jakarta-taglibs/            <-- Contains source distribution of the
                                    JAKARTA-TAGLIBS libraries
        ... see below for details ...
    jakarta-tomcat/             <-- Contains Tomcat (if you are using it)

Directory Structures

The distribution archive will contain the following file and directory structure:

Within the doc/ and examples/ subdirectories for each custom tag library, the following directory organization is used to contain the source components of this application:

Building JAKARTA-TAGLIBS Libraries

To build the distribution version of all included custom tag libraries, set your current directory to the jakarta-taglibs directory into which you unpacked the distribution, and execute the global build script:

    build                       <-- Window platforms
    ./build.sh                  <-- Unix platforms

In addition to the directories described earlier, two additional directory hierarchies will be created to contain the results, resulting in the following overall organization:

your_jakarta_home_directory/
    build/                      <-- Contains intermediate form results of
                                    building Jakarta applications
        taglibs/                <-- Contains intermediate form results of
                                    building JAKARTA-TAGLIBS custom libraries
    dist/                       <-- Contains the files that will be included
                                    in binary distributions of Jakarta
                                    applications
        taglibs/                <-- Contains the files that will be included
                                    in the binary distribution of the
                                    JAKARTA-TAGLIBS project, as described in
				    binary distribution documentation
    ... other directories as above ...

When you are working on a particular custom tag library, it is faster to rebuild only that particular library while doing development. To do this, change to the top level directory of that custom tag library (for example, change to the jakarta-taglibs/jspspec directory to work on the JSP Specification Examples custom tag library. You can now use one of several variants of the build script, depending on what you want to do. In each of the following cases use build on Windows systems, or build.sh on Unix systems:

When you perform a global build, the build dist option is invoked on each included subproject.

Adding A New JAKARTA-TAGLIBS Custom Tag Library

Adding a new custom tag library subproject to JAKARTA-TAGLIBS is fairly straightforward. It involves the following steps:

NOTE: If your custom tag library requires additional JAR files from external distributions, you may be tempted to check these libraries in to the CVS repository. This behavior is prohibited by Jakarta project guidelines, because it causes many errors due to version interdependencies of shared libraries. Instead, you should include instructions in the user documentation for your library on how to acquire any additional libraries or other components that are required.


$Id: sourcedist.html,v 1.2 2000/05/22 21:11:14 craigmcc Exp $