Borrow a few things from the main Tomcat build.xml:
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 2 Jan 2010 15:22:41 +0000 (15:22 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 2 Jan 2010 15:22:41 +0000 (15:22 +0000)
- use general version filter
- automatically set year to the current year
- use patch version property without dot.
  The dot is added when combining it into a version number

I don't know whether the double '@' are intended for the
ant replacement markers in MANIFEST.MF (the outer ones remain
after ant filtering), but that is unchanged from the previous
behaviour.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@895204 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/build.properties.default
modules/jdbc-pool/build.xml
modules/jdbc-pool/doc/changelog.xml
modules/jdbc-pool/doc/jdbc-pool.xml
modules/jdbc-pool/resources/MANIFEST.MF

index 926b368..73ef8f2 100644 (file)
@@ -28,7 +28,7 @@
 version.major=1
 version.minor=0
 version.build=8
-version.patch=.3
+version.patch=3
 version.suffix=
 
 # ----- Default Base Path for Dependent Packages -----
index d3d8ecb..b1373b0 100644 (file)
 
   <!-- ===================== Initialize Property Values =================== -->
 
-  <!-- property values you must customize for successful building!!!        -->
+  <!-- We read customizable properties from the file "build.properties.default" -->
+  <!-- and also from "build.properties" if it exists.                           -->
+  <!-- The values in "build.properties" have stronger preference.               -->
+  <!-- If you want to customize your build, you can either change the values    -->
+  <!-- directly in the default file, or create a new build.properties and set   -->
+  <!-- the values there. This way you don't have to change a file which is part -->
+  <!-- of the original project source code.                                     -->
+  <!-- See "build.properties.default" for some property values you may          -->
+  <!-- customize.                                                               -->
   <property file="${user.home}/build.properties"/>
   <property file="${basedir}/build.properties"/>
   <property file="${basedir}/build.properties.default"/>
-  <property name="version"               value="${version.major}.${version.minor}.${version.build}${version.patch}" />
+  <property name="version"               value="${version.major}.${version.minor}.${version.build}.${version.patch}" />
+  <property name="version.major.minor"   value="${version.major}.${version.minor}" />
 
   <!-- Project Properties -->
   <property name="name"                  value="Apache Tomcat JDBC Pool" />
-  <property name="year"                  value="2010" />
+  <tstamp>
+    <format property="year" pattern="yyyy" locale="en"/>
+  </tstamp>
 
   <property name="project"               value="apache-tomcat-jdbc-pool" />
   <property name="final.name"            value="${project}-${version}" />
     <pathelement location="${h2.jar}"/>
   </path>
   
+  <!-- Version info filter set -->
+  <tstamp>
+    <format property="TODAY" pattern="MMM d yyyy" locale="en"/>
+    <format property="TSTAMP" pattern="hh:mm:ss"/>
+  </tstamp>
+  <filterset id="version.filters">
+    <filter token="YEAR" value="${year}"/>
+    <filter token="VERSION" value="${version}"/>
+    <filter token="VERSION_MAJOR" value="${version.major}"/>
+    <filter token="VERSION_MAJOR_MINOR" value="${version.major.minor}"/>
+    <filter token="VERSION_BUILT" value="${TODAY} ${TSTAMP}"/>
+    <filter token="TOMCAT_PROJECT_DEST" value="${tomcat.project.dest}"/>
+  </filterset>
+
   <target name="prepare">
     <mkdir dir="${tomcat.build}"/>
     <mkdir dir="${tomcat.classes}"/>
     <mkdir dir="${tomcat.testclasses}"/>
-    <property name="project.xml" location="${tomcat.project.dest}"/>
     <copy todir="${tomcat.pool}">
       <fileset dir="${basedir}">
         <include name="LICENSE"/>
         <include name="doc/*.xml"/>
         <include name="resources/MANIFEST.MF"/>
       </fileset>
-      <filterset>
-        <filter token="tomcat.project.dest" value="${project.xml}"/>
-        <filter token="version" value="${version}"/>
-      </filterset>  
+      <filterset refid="version.filters"/>
     </copy>
   </target>
 
index 8cf26c6..6f18336 100644 (file)
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <!DOCTYPE document [
-  <!ENTITY project SYSTEM "@tomcat.project.dest@">
+  <!ENTITY project SYSTEM "@TOMCAT_PROJECT_DEST@">
 ]>
 <document url="changelog.html">
 
index 325d8f3..98b5940 100644 (file)
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <!DOCTYPE document [
-  <!ENTITY project SYSTEM "@tomcat.project.dest@">
+  <!ENTITY project SYSTEM "@TOMCAT_PROJECT_DEST@">
 ]>
 <document url="jdbc-pool.html">
 
index 37c0f3a..b61fb99 100644 (file)
@@ -1,15 +1,15 @@
 Manifest-Version: 1.0
 Export-Package: 
-  org.apache.tomcat.jdbc.pool;version="@@version@@";
+  org.apache.tomcat.jdbc.pool;version="@@VERSION@@";
   uses:="javax.management,javax.naming,javax.naming.spi,javax.sql,
   org.apache.tomcat.jdbc.pool.jmx",
-  org.apache.tomcat.jdbc.pool.interceptor;version="@@version@@";
+  org.apache.tomcat.jdbc.pool.interceptor;version="@@VERSION@@";
   uses:="javax.management.openmbean,org.apache.tomcat.jdbc.pool",
-  org.apache.tomcat.jdbc.pool.jmx;version="@@version@@";
+  org.apache.tomcat.jdbc.pool.jmx;version="@@VERSION@@";
   uses:="javax.management,org.apache.tomcat.jdbc.pool"
 Ant-Version: Apache Ant 1.7.0
 Bundle-Vendor: Apache Software Foundation
-Bundle-Version: @@version@@
+Bundle-Version: @@VERSION@@
 Bundle-Name: Apache Tomcat JDBC Connection Pool
 Bundle-ManifestVersion: 2
 Created-By: 11.0-b16 (Sun Microsystems Inc.)