costin 01/12/19 16:15:44
Modified: jk build.xml README.txt build.properties.sample
jk/native build.xml
jk/native2 build.xml
Log:
A bit of enhancement to the build system, to make it simpler and smarter
( I hope :-)
The goals are to be able to detect what the user has and require minimal
effort. A second goal is to be able to build on all installed platforms.
( at the same time ).
Revision Changes Path
1.16 +95 -70 jakarta-tomcat-connectors/jk/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- build.xml 2001/11/27 00:51:16 1.15
+++ build.xml 2001/12/20 00:15:43 1.16
@@ -10,7 +10,7 @@
<property file="${user.home}/build.properties"/>
<property file="${user.home}/.build.properties"/>
- <property name="jk.build" value="${basedir}/build"/>
+ <property name="jk.build" location="${basedir}/build"/>
<!-- Compile options -->
<property name="optimize" value="off" />
@@ -21,16 +21,12 @@
location="../../jakarta-tomcat/build/tomcat" />
<property name="catalina.home"
location="../../jakarta-tomcat-4.0/build" />
+ <property name="tomcat41.home"
+ location="../../jakarta-tomcat-4.1/build" />
- <!-- Need to build tomcat-util before jk, XXX automate -->
- <property name="tomcat-util.jar"
- location="../util/build/lib/tomcat-util.jar" />
-
<path id="build-main.classpath">
- <pathelement location="${tomcat-util.jar}"/>
<pathelement location="${catalina.home}/server/lib/catalina.jar"/>
<pathelement location="${catalina.home}/common/lib/servlet.jar"/>
- <pathelement location="${junit.jar}"/>
<pathelement location="${tomcat33.home}/lib/common/tomcat_core.jar"/>
<pathelement location="${tomcat33.home}/lib/common/core_util.jar"/>
<pathelement
@@ -51,26 +47,25 @@
</path>
<!-- ==================== Detection and reports ==================== -->
-
- <target name="report-tc3" if="tomcat33.detect" >
- <echo message="Tomcat.33 detected " />
- </target>
- <target name="report-tc4" if="tomcat4.detect" >
- <echo message="Tomcat4 detected " />
+ <target name="report" >
+ <echo message="Tomcat33: ${tomcat33.detect} ${tomcat33.home}" />
+ <echo message="Tomcat4: ${tomcat4.detect} ${catalina.home}" />
+ <echo message="Tomcat41: ${tomcat41.detect} ${tomcat41.home}" />
+ <echo message="Apache13: ${apache13.detect} ${apache13.home}" />
+ <echo message="Apache20: ${apache20.detect} ${apache20.home}" />
+ <echo message="iPlanet: ${iplanet.detect} ${iplanet.home}" />
+ <echo message="IIS: ${iis.detect} ${iis.home}" />
</target>
- <target name="report" depends="report-tc3,report-tc4" />
-
<target name="build-prepare">
<mkdir dir="${jk.build}"/>
- <mkdir dir="${jk.build}/logs"/>
<mkdir dir="${jk.build}/WEB-INF"/>
<mkdir dir="${jk.build}/WEB-INF/conf"/>
<mkdir dir="${jk.build}/WEB-INF/classes"/>
+ <mkdir dir="${jk.build}/WEB-INF/classes/META-INF" />
<mkdir dir="${jk.build}/WEB-INF/lib"/>
<copy file="conf/web.xml" tofile="${jk.build}/WEB-INF/web.xml" />
- <copy file="${tomcat-util.jar}" todir="${jk.build}/WEB-INF/lib" />
<copy todir="${jk.build}/WEB-INF" file="interceptors.xml"/>
<copy todir="${jk.build}/WEB-INF/conf" >
<fileset dir="conf" includes="*" />
@@ -78,22 +73,24 @@
<available property="tomcat33.detect"
file="${tomcat33.home}/lib/common/tomcat_core.jar" />
<available property="tomcat4.detect"
file="${catalina.home}/server/lib/catalina.jar" />
- <echo message="${tomcat4.detect}
file=${catalina.home}/server/lib/catalina.jar" />
+ <available property="tomcat41.detect"
file="${tomcat41.home}/server/webapps" />
</target>
- <target name="build-main" depends="build-prepare,report">
- <ant dir="../util" antfile="../util/build.xml"/>
-
+ <target name="build-main"
+ depends="build-prepare,report,jkutil,jkjava,jkant" />
+
+ <!-- ==================== Building ==================== -->
+
+ <target name="jkjava"
+ description="Build java side of the connector" >
<javac srcdir="java"
destdir="${jk.build}/WEB-INF/classes"
- deprecation="on"
+ deprecation="off"
debug="${debug}"
optimize="${optimize}"
- verbose="off"
- excludes="**/CVS/**">
+ verbose="off" >
<exclude name="org/apache/ajp/tomcat4/**" unless="tomcat4.detect"/>
<exclude name="org/apache/ajp/tomcat33/**" unless="tomcat33.detect"/>
- <exclude name="org/apache/ajp/test/**" />
<classpath refid="build-main.classpath"/>
</javac>
@@ -105,15 +102,82 @@
</copy>
<jar jarfile="${jk.build}/WEB-INF/lib/ajp.jar"
- basedir="${jk.build}/WEB-INF/classes"
- excludes="org/apache/ajp/test"
- />
+ basedir="${jk.build}/WEB-INF/classes" />
- <!-- Old behavior -->
- <copy todir="${jk.build}"
- file="${jk.build}/WEB-INF/lib/ajp.jar"/>
</target>
+
+ <target name="jkant" >
+ <javac srcdir="jkant/java"
+ destdir="${jk.build}/WEB-INF/classes"
+ debug="${debug}"
+ optimize="${optimize}"
+ verbose="off" >
+ </javac>
+ <copy todir="${jk.build}/WEB-INF/classes/META-INF"
+ file="jkant/ant.tasks"/>
+ <jar jarfile="${jk.build}/WEB-INF/lib/jkant.jar"
+ basedir="${jk.build}/WEB-INF/classes" >
+ <include name="org/apache/jk/ant/**" />
+ <include name="META-INF/ant.tasks" />
+ </jar>
+ </target>
+
+ <target name="jkutil"
+ description="Build utils" >
+ <javac srcdir="../util/java"
+ destdir="${jk.build}/WEB-INF/classes"
+ debug="${debug}"
+ optimize="${optimize}"
+ verbose="off" >
+ </javac>
+ <jar jarfile="${jk.build}/WEB-INF/lib/tomcat-util.jar"
+ basedir="${jk.build}/WEB-INF/classes" >
+ <include name="org/apache/tomcat/util/**" />
+ </jar>
+ </target>
+
+ <!-- It's better to call it directly with individual tags -->
+ <target name="native" >
+ <ant dir="native" antfile="build.xml" />
+ <ant dir="native2" antfile="build.xml" />
+ </target>
+
+ <!-- ================ Install =================== -->
+ <target name="install"
+ depends="install-t33,install-t40,install-t41,install-a20,install-a13" />
+
+ <target name="install-t33" if="tomcat33.detected" >
+ </target>
+
+ <target name="install-t40" if="tomcat40.detected" >
+ </target>
+
+ <target name="install-t41" if="tomcat41.detected" >
+ </target>
+
+ <target name="install-a20" if="apache20.detected" >
+ </target>
+
+ <target name="install-a13" if="apache13.detected" >
+ </target>
+
+ <!-- ================ javadocs =================== -->
+ <target name="javadoc">
+ <delete dir="${jk.build}/javadoc"/>
+ <mkdir dir="${jk.build}/javadoc"/>
+ <javadoc packagenames="org.apache.ajp,org.apache.ajp.tomcat4"
+ sourcepath="java"
+
classpath="${tomcat-util.jar}:${catalina.home}/server/lib/catalina.jar:${catalina.home}/common/lib/servlet.jar"
+ destdir="${jk.build}/javadoc"
+ author="true"
+ version="true"
+ windowtitle="Jk Connector Documentation"
+ doctitle="Jk Connector"
+ bottom="Copyright © 2001 Apache Software Foundation. All
Rights Reserved."
+ />
+ </target>
+
<!-- ==================== Tests ==================== -->
<!-- XXX move test to it's own dir -->
@@ -137,45 +201,6 @@
<arg value="${test.entry}"/>
<classpath refid="test.classpath"/>
</java>
- </target>
-
- <!-- ================ Create the helper ant tasks =================== -->
-
- <target name="jkant" >
- <property name="jkant.build" location="jkant/build" />
- <mkdir dir="${jkant.build}" />
- <mkdir dir="${jkant.build}/classes" />
- <javac srcdir="jkant/java"
- destdir="${jkant.build}/classes"
- debug="${debug}"
- optimize="${optimize}"
- verbose="off" >
- </javac>
- <mkdir dir="${jkant.build}/classes/META-INF" />
- <copy todir="${jkant.build}/classes/META-INF" file="jkant/ant.tasks"/>
- <jar jarfile="${jkant.build}/jkant.jar"
- basedir="${jkant.build}/classes" />
- </target>
-
- <!-- It's better to call it directly with individual tags -->
- <target name="native" >
- <ant dir="native" antfile="build.xml" />
- </target>
-
- <!-- ================ BUILD: Create Jk Javadocs =================== -->
- <target name="javadoc">
- <delete dir="${jk.build}/javadoc"/>
- <mkdir dir="${jk.build}/javadoc"/>
- <javadoc packagenames="org.apache.ajp,org.apache.ajp.tomcat4"
- sourcepath="java"
-
classpath="${tomcat-util.jar}:${catalina.home}/server/lib/catalina.jar:${catalina.home}/common/lib/servlet.jar"
- destdir="${jk.build}/javadoc"
- author="true"
- version="true"
- windowtitle="Jk Connector Documentation"
- doctitle="Jk Connector"
- bottom="Copyright © 2001 Apache Software Foundation. All
Rights Reserved."
- />
</target>
1.4 +51 -12 jakarta-tomcat-connectors/jk/README.txt
Index: README.txt
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/README.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README.txt 2001/06/06 14:54:51 1.3
+++ README.txt 2001/12/20 00:15:43 1.4
@@ -4,26 +4,65 @@
Building
========
-* Download junit from http://www.junit.org (version 3.7 or greater is required).
+* Install tomcat(3.3, 4.0, 4.1). Install Apache(1.3, 2.0). Any
+combination is fine, but j-t-c developers should have them all.
+
+* Copy build.properties.sample to build.properties
+
+* Edit build.properties to taste. In particular it's important to set
+the paths to tomcat and apache.
+
+* Run "ant". It'll build modules for all the detected containers.
+
+* If your system have a current working version of libtool, run "ant native".
+ This will build the native connectors for the detected servers ( both jk
+ and jk2).
-* Build tomcat-util.jar in jakarta-tomcat-connectors/util.
+ Alternatively, you can build using configure/make/dsp/apxs.
-* Copy build.properties.sample to build.properties.
+* Run "ant install". This will copy the files in the right location
+ in your server/container. Optional: on unix systems you can create
+ symlinks ( XXX script will be provided ) and avoid copying.
-* Edit build.properties to taste.
+Setting tomcat 3.3
+==================
-* Build ajp.jar by running ant. The default target creates ./build/lib/ajp.jar.
+Restart tomcat.
-* Tests can be run by running ant test.
+Setting tomcat 4.0
+==================
-Tomcat 4
-========
To use the ajp13 connector for tomcat 4:
- 1) build tomcat-util.jar (in ../util)
- 1) build ajp.jar (by running ant)
- 2) copy ajp.jar, tomcat-util.jar to $TOMCAT4_HOME/{build|dist}/server/lib
- 3) add the following to server.xml:
+XXX Can we automate this ?
+ 1) add the following to server.xml:
+
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" acceptCount="10" debug="0"/>
+
+Setting tomcat 4.1
+==================
+
+Restart tomcat.
+
+( XXX this is not completely implemented. For now we'll use the same
+mechanism as in 4.0 - i.e. add <Connector> in server.xml. )
+
+Configuring JK1
+===============
+
+
+
+Configuring JK2
+===============
+
+
+Building the tests
+==================
+( probably not working - the best test is to run watchdog/tester/3.3 test webapp )
+( XXX is it ok to remove this ? )
+
+* Download junit from http://www.junit.org (version 3.7 or greater is required).
+
+* "ant test"
\ No newline at end of file
1.6 +15 -7 jakarta-tomcat-connectors/jk/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/build.properties.sample,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- build.properties.sample 2001/11/27 00:51:16 1.5
+++ build.properties.sample 2001/12/20 00:15:43 1.6
@@ -2,20 +2,28 @@
# sample build.properties for ajp connector.
# edit to taste...
#
-# $Id: build.properties.sample,v 1.5 2001/11/27 00:51:16 costin Exp $
-#
+# Directory where catalina is installed. It can
+# be either 4.0 or 4.1
+catalina.home=../../jakarta-tomcat-4.0/build
+
+# If you want to build/install on both 4.0
+# and 4.1, set this to point to 4.0 and 'catalina.home'
+# to point to 4.0
+# ( most people need only the first, but developers should
+# have both )
+tomcat41.home=../../jakarta-tomcat-4.1/build
+
+# Directory where tomcat3.3 is installed
+tomcat33.home= ../../jakarta-tomcat/build/tomcat
+
# Location of Apache2, Apache1.3, Netscape, IIS
apache2.home=/opt/apache2
apache13.home=/opt/apache13
# APR location - by default the version included in Apache2 is used.
+# Don't edit unless you install 'standalone' apr.
apr.include=${apache2.home}/include
apr.lib=${apache2.home}/lib
-# Directory where catalina is installed.
-catalina.home=../../jakarta-tomcat-4.0/build
-
-# Directory where tomcat3.3 is installed
-tomcat33.home= ../../jakarta-tomcat/build/tomcat
1.23 +6 -6 jakarta-tomcat-connectors/jk/native/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/build.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- build.xml 2001/12/04 01:54:21 1.22
+++ build.xml 2001/12/20 00:15:43 1.23
@@ -8,12 +8,12 @@
<property file="${user.home}/build.properties" />
<property file="../build.properties" />
<property file="build.properties" />
-
- <!-- Experimental -->
- <path id="jkant" >
- <pathelement location="../jkant/build/classes"/>
- <pathelement location="../jkant/build/jkant.jar"/>
+ <!-- Overriden if called from the main -->
+ <property name="jk.build" location="../build" />
+
+ <path id="cp.jkant" >
+ <pathelement location="${jk.build}/WEB-INF/lib/jkant.jar"/>
</path>
<property name="native.dir" location="." />
@@ -38,7 +38,7 @@
<target name="init" >
<taskdef resource="META-INF/ant.tasks"
- classpathref="jkant" />
+ classpathref="cp.jkant" />
<available property="HAVE_APR" file="${apr.include}/apr.h" />
</target>
1.5 +2 -6 jakarta-tomcat-connectors/jk/native2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/build.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- build.xml 2001/12/05 20:52:41 1.4
+++ build.xml 2001/12/20 00:15:43 1.5
@@ -33,16 +33,12 @@
<!-- Base dir for jk sources -->
<property name="jk.src" location=".." />
- <!-- Dependency: Ant Cc task -->
- <property name="jkant.home" location="${jk.src}/jkant/build" />
-
<property name="native.dir" location="${jk.src}/native2" />
- <property name="build.dir" location="${jk.src}/build/obj" />
+ <property name="build.dir" location="${jk.build}/WEB-INF/jk2" />
<path id="jkant" >
- <pathelement location="${jkant.home}/classes"/>
- <pathelement location="${jkant.home}/jkant.jar"/>
+ <pathelement location="${jk.build}/WEB-INF/lib/jkant.jar"/>
</path>
<!-- ==================== Targets ==================== -->
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>