From 6b430216d23fe78514326b97b4b11672a82fa68e Mon Sep 17 00:00:00 2001 From: fhanik Date: Mon, 22 Jun 2009 20:29:20 +0000 Subject: [PATCH] Refactor to be more independent, so that one can build from source archive without too many hooplas as suggested by sebb git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@787385 13f79535-47bb-0310-9956-ffa450edef68 --- modules/jdbc-pool/.classpath | 4 +- modules/jdbc-pool/build.properties.default | 72 ++++++++ modules/jdbc-pool/build.xml | 266 ++++++++++++++++++----------- modules/jdbc-pool/doc/changelog.xml | 2 +- modules/jdbc-pool/doc/jdbc-pool.xml | 15 +- modules/jdbc-pool/sign.sh | 2 +- 6 files changed, 259 insertions(+), 102 deletions(-) create mode 100644 modules/jdbc-pool/build.properties.default diff --git a/modules/jdbc-pool/.classpath b/modules/jdbc-pool/.classpath index dcff63c23..052cbdd0c 100644 --- a/modules/jdbc-pool/.classpath +++ b/modules/jdbc-pool/.classpath @@ -5,8 +5,8 @@ - - + + diff --git a/modules/jdbc-pool/build.properties.default b/modules/jdbc-pool/build.properties.default new file mode 100644 index 000000000..992e8fea8 --- /dev/null +++ b/modules/jdbc-pool/build.properties.default @@ -0,0 +1,72 @@ +# ----------------------------------------------------------------------------- +# 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. +# ----------------------------------------------------------------------------- +# build.properties.sample +# +# This is an example "build.properties" file, used to customize building +# Tomcat JDBC Pool for your local environment. It defines the location of all external +# modules that Tomcat JDBC Pool depends on. Copy this file to "build.properties" +# in the top-level source directory, and customize it as needed. +# +# $Id: build.properties.default 786496 2009-06-19 13:11:00Z markt $ +# ----------------------------------------------------------------------------- + +# ----- Vesion Control Flags ----- +version.major=1 +version.minor=0 +version.build=5 +version.patch= +version.suffix= + +# ----- Default Base Path for Dependent Packages ----- +# Please note this path must be absolute, not relative, +# as it is referenced with different working directory +# contexts by the various build scripts. +base.path=${basedir}/includes + +compile.source=1.5 +compile.target=1.5 +compile.debug=true + +# ----- JUnit Unit Test Suite, version 3.7 or later ----- +junit.home=${base.path}/junit3.8.2 +junit.lib=${junit.home} +junit.jar=${junit.lib}/junit.jar +junit.loc=http://downloads.sourceforge.net/junit/junit3.8.2.zip + +c3p0.home=${base.path}/c3p0-0.9.1.2 +c3p0.jar=${c3p0.home}/lib/c3p0-0.9.1.2.jar +c3p0.loc=http://superb-east.dl.sourceforge.net/sourceforge/c3p0/c3p0-0.9.1.2.bin.zip + +mysql.home=${base.path}/mysql-connector-java-5.1.7 +mysql.jar=${mysql.home}/mysql-connector-java-5.1.7-bin.jar +mysql.loc=http://mysql.mirrors.pair.com/Downloads/Connector-J/mysql-connector-java-5.1.7.zip + +dbcp.home=${base.path}/commons-dbcp-1.2 +dbcp.jar=${dbcp.home}/commons-dbcp-1.2.jar +dbcp.loc=http://archive.apache.org/dist/commons/dbcp/binaries/commons-dbcp-1.2.zip + +tomcat.home=${base.path}/apache-tomcat-6.0.20 +tomcat.dbcp.jar=${tomcat.home}/lib/tomcat-dbcp.jar +tomcat.coyote.jar=${tomcat.home}/lib/tomcat-coyote.jar +tomcat.juli.jar=${tomcat.home}/bin/tomcat-juli.jar +tomcat.loc=http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.zip + +tomcat.project.loc=http://svn.apache.org/repos/asf/tomcat/trunk/webapps/docs/project.xml +tomcat.project.dest=${base.path}/project.xml + +tomcat.xsl.loc=http://svn.apache.org/repos/asf/tomcat/trunk/webapps/docs/tomcat-docs.xsl +tomcat.xsl.dest=${base.path}/tomcat-docs.xsl \ No newline at end of file diff --git a/modules/jdbc-pool/build.xml b/modules/jdbc-pool/build.xml index d6a3e48c9..1b032f014 100644 --- a/modules/jdbc-pool/build.xml +++ b/modules/jdbc-pool/build.xml @@ -16,23 +16,16 @@ limitations under the License. --> - + - - - - - - - - + @@ -43,88 +36,118 @@ - - - - - - - - - - - - - - - - + + + + + + + + - + + + - - - - - - + + + + + - + - + + + + + + + + + + + + + + + - + - - - - - + + + + + - + - + + + + + + + + + + - - + + + + + + + + + - + + - + @@ -134,35 +157,16 @@ + + + - - - - - - - - - - - - - - - - - - - + @@ -171,53 +175,80 @@ - - - - - - - + - - + + + + + - + - + - - + + + + + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + @@ -257,8 +288,53 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/jdbc-pool/doc/changelog.xml b/modules/jdbc-pool/doc/changelog.xml index 141f5f2e5..8cf26c644 100644 --- a/modules/jdbc-pool/doc/changelog.xml +++ b/modules/jdbc-pool/doc/changelog.xml @@ -16,7 +16,7 @@ limitations under the License. --> + ]> diff --git a/modules/jdbc-pool/doc/jdbc-pool.xml b/modules/jdbc-pool/doc/jdbc-pool.xml index ad33b43f0..348606ff4 100644 --- a/modules/jdbc-pool/doc/jdbc-pool.xml +++ b/modules/jdbc-pool/doc/jdbc-pool.xml @@ -16,7 +16,7 @@ limitations under the License. --> + ]> @@ -680,6 +680,7 @@
+

We build the JDBC pool code with 1.6, but it is backwards compatible down to 1.5 for runtime environment. For unit test, we use 1.6 and higher

Other examples of Tomcat configuration for JDBC usage can be found in the Tomcat documentation.

Building is pretty simple. The pool has a dependency on tomcat-juli.jar and in case you want the SlowQueryReportJmx @@ -691,8 +692,16 @@

A build file can be found in the Tomcat source repository. - It depends on the entire Tomcat trunk being checked out. -

+

+

+ As a convenience, a build file is also included where a simple build command will generate all files needed. + + ant download (downloads dependencies) + ant build (compiles and generates .jar files) + ant dist (creates a release package) + ant test (runs tests, expects a test database to be setup) + +

diff --git a/modules/jdbc-pool/sign.sh b/modules/jdbc-pool/sign.sh index 3bd1cce55..a058f36d8 100755 --- a/modules/jdbc-pool/sign.sh +++ b/modules/jdbc-pool/sign.sh @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION=v1.0.4 +VERSION=v1.0.5 for i in $(find output/release/$VERSION -name "*.zip" -o -name "*.tar.gz"); do echo Signing $i echo $1|gpg --passphrase-fd 0 -a -b $i -- 2.11.0