Author: markt
Date: Sat Mar 31 18:50:31 2012
New Revision: 1307872
URL: http://svn.apache.org/viewvc?rev=1307872&view=rev
Log:
Build script changes ready for svn pub sub for Tomcat 5,6,7 docs, JK docs,
native docs
Added:
tomcat/site/trunk/build.properties.default
Modified:
tomcat/site/trunk/README.txt
tomcat/site/trunk/build.xml
Modified: tomcat/site/trunk/README.txt
URL:
http://svn.apache.org/viewvc/tomcat/site/trunk/README.txt?rev=1307872&r1=1307871&r2=1307872&view=diff
==============================================================================
--- tomcat/site/trunk/README.txt (original)
+++ tomcat/site/trunk/README.txt Sat Mar 31 18:50:31 2012
@@ -43,26 +43,29 @@ svn up
to have the changes reflected on the Tomcat web site.
-Merging connectors documentation
-Tomcat Native and JK connector have their own documentation that
-needs to get updated on release. Beside updating release notes and
-download page that should reflect the current stable, it is needed
-to copy those documents as well.
-Currently this is manual procedure that involves copying connector
-documentation and modifying symbolic links
-
-When releasing Tomcat native create a new native-doc-x.y.z directory
-and upload the documentation created with calling ant inside
-native's xdoc directory.
-Once you have done that update the symlink to point to that new location.
-Inside /www/tomcat.apache.org/ directory, execute:
-
-ln -sf native-doc-x.y.x native-doc
-
-Similar should be done for JK connector documentation with the exception
-that all symbolic link for the connectors-doc should point to the
-connectors-doc-x.y.z
-ln -sf connectors-doc-x.y.x connectors-doc
+To update the documentation for Tomcat 5.5.x, Tomcat 6.0.x, Tomcat 7.0.x
+
+1. Set the version numbers in build.properties.default
+2. cd into your tomcat-site directory and execute:
+ ant release
+3. Check in the changes. Remember there may be deleted / missing files.
+4. In the /www/tomcat.apache.org/ directory on people.a.o execute:
+ umask 002
+ svn up
+
+
+
+To update the documentation for Tomcat Native or the
+Merging connectors documentation
+1. Update the svn-external for tomcat-site to point to the correct revision.
+ This *must* match the tag for the latest released version.
+2. cd into your tomcat-site directory and execute:
+ svn up
+ ant release
+3. Check in the changes. Remember there may be deleted / missing files.
+4. In the /www/tomcat.apache.org/ directory on people.a.o execute:
+ umask 002
+ svn up
Added: tomcat/site/trunk/build.properties.default
URL:
http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1307872&view=auto
==============================================================================
--- tomcat/site/trunk/build.properties.default (added)
+++ tomcat/site/trunk/build.properties.default Sat Mar 31 18:50:31 2012
@@ -0,0 +1,55 @@
+# -----------------------------------------------------------------------------
+# 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 for your local environment. It defines the location of all external
+# modules that Tomcat depends on. Copy this file to "build.properties"
+# in the top-level source directory, and customize it as needed.
+#
+# $Id: build.properties.default 1300569 2012-03-14 14:48:50Z markt $
+# -----------------------------------------------------------------------------
+
+# ----- 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=/usr/share/java
+#base.path=C:/path/to/the/repository
+#base.path=/usr/local
+
+tomcat.loc=http://www.apache.org/dist/tomcat
+
+
+# ----- Tomcat versions -----
+tomcat55=5.5.35
+tomcat60=6.0.35
+tomcat70=7.0.26
+
+
+# ----- Download destination -----
+tomcat-site-docs.home=${base.path}/tomcat-site-docs/
+
+# ----- Tomcat Docs locations -----
+tomcat55.loc=${tomcat.loc}/tomcat-5/v${tomcat55}/bin/apache-tomcat-${tomcat55}-fulldocs.tar.gz
+tomcat55.home=${tomcat-site-docs.home}/${tomcat55}
+
+tomcat60.loc=${tomcat.loc}/tomcat-6/v${tomcat60}/bin/apache-tomcat-${tomcat60}-fulldocs.tar.gz
+tomcat60.home=${tomcat-site-docs.home}/${tomcat60}
+
+tomcat70.loc=${tomcat.loc}/tomcat-7/v${tomcat70}/bin/apache-tomcat-${tomcat70}-fulldocs.tar.gz
+tomcat70.home=${tomcat-site-docs.home}/${tomcat70}
Modified: tomcat/site/trunk/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/site/trunk/build.xml?rev=1307872&r1=1307871&r2=1307872&view=diff
==============================================================================
--- tomcat/site/trunk/build.xml (original)
+++ tomcat/site/trunk/build.xml Sat Mar 31 18:50:31 2012
@@ -1,81 +1,176 @@
<project name="build-site" default="docs" basedir=".">
- <!-- ===================== Initialize Property Values ===================
-->
+ <!-- ===================== Initialize Property Values ====================
-->
- <!-- See "build.properties.sample" in the top level directory for all
-->
- <!-- property values you must customize for successful building!!!
-->
- <property file="build.properties"/>
- <property file="${user.home}/build.properties"/>
-
- <property name="force" value="false" />
-
- <property name="docs.src" location="xdocs"/>
- <property name="docs.dest" location="docs"/>
- <property name="faq.src" location="xdocs-faq"/>
- <property name="faq.dest" location="${docs.dest}/faq"/>
-
- <!-- Requires JDK 1.4 -->
- <target name="docs"
- description="Render HTML Pages via XSLT">
-
- <!-- Transform the xml files - requires Ant 1.6.2 -->
-
- <!-- Transform the top-level directory -->
- <echo message="Transforming the site documents..." />
- <xslt basedir="${docs.src}"
- destdir="${docs.dest}"
- extension=".html"
- style="${docs.src}/stylesheets/tomcat-site.xsl"
- excludes="project.xml,sitemap.xml,sitemap-main.xml"
- includes="*.xml"
- force="${force}">
- <param name="relative-path" expression="."/>
- </xslt>
-
- <!-- Copy static sitemap files -->
- <echo message="Copying sitemap files..." />
- <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
- <fileset dir="${docs.src}">
- <include name="sitemap*.xml"/>
- <include name="robots.txt"/>
- </fileset>
- </copy>
-
- <!-- Copy static resource files -->
- <echo message="Copying static resource files..." />
- <copy todir="${docs.dest}/images" filtering="no" overwrite="${force}">
- <fileset dir="${docs.src}/images">
- <include name="**/*.gif"/>
- <include name="**/*.jpeg"/>
- <include name="**/*.jpg"/>
- </fileset>
- </copy>
-
- <!-- Copy static PDFs -->
- <echo message="Copying PDFs..." />
- <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
- <fileset dir="${docs.src}">
- <include name="**/*.pdf"/>
- </fileset>
- </copy>
-
- <!-- Copy DOAP -->
- <echo message="Copying DOAP..." />
- <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
- <fileset dir="${docs.src}">
- <include name="**/*.rdf"/>
- </fileset>
- </copy>
-
- <!-- Copy CSS stylesheets and download CGI -->
- <echo message="Copying CSS and CGI files..." />
- <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
- <fileset dir="${docs.src}">
- <include name="**/*.css"/>
- <include name="**/*.cgi"/>
- </fileset>
- </copy>
-
- </target>
+ <!-- We read customizable properties from "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" in the top level directory for some
-->
+ <!-- property values you may customize.
-->
+ <property file="${user.home}/build.properties"/>
+ <property file="build.properties"/>
+ <property file="build.properties.default"/>
+
+ <property name="force" value="false" />
+
+ <property name="docs.src" location="xdocs"/>
+ <property name="docs.dest" location="docs"/>
+ <property name="faq.src" location="xdocs-faq"/>
+ <property name="faq.dest" location="${docs.dest}/faq"/>
+
+ <!-- Requires JDK 1.4 -->
+ <target name="docs"
+ description="Render HTML Pages via XSLT">
+
+ <!-- Transform the xml files - requires Ant 1.6.2 -->
+
+ <!-- Transform the top-level directory -->
+ <echo message="Transforming the site documents..." />
+ <xslt basedir="${docs.src}"
+ destdir="${docs.dest}"
+ extension=".html"
+ style="${docs.src}/stylesheets/tomcat-site.xsl"
+ excludes="project.xml,sitemap.xml,sitemap-main.xml"
+ includes="*.xml"
+ force="${force}">
+ <param name="relative-path" expression="."/>
+ </xslt>
+
+ <!-- Copy static sitemap files -->
+ <echo message="Copying sitemap files..." />
+ <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
+ <fileset dir="${docs.src}">
+ <include name="sitemap*.xml"/>
+ <include name="robots.txt"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy static resource files -->
+ <echo message="Copying static resource files..." />
+ <copy todir="${docs.dest}/images" filtering="no" overwrite="${force}">
+ <fileset dir="${docs.src}/images">
+ <include name="**/*.gif"/>
+ <include name="**/*.jpeg"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy static PDFs -->
+ <echo message="Copying PDFs..." />
+ <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
+ <fileset dir="${docs.src}">
+ <include name="**/*.pdf"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy DOAP -->
+ <echo message="Copying DOAP..." />
+ <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
+ <fileset dir="${docs.src}">
+ <include name="**/*.rdf"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy CSS stylesheets and download CGI -->
+ <echo message="Copying CSS and CGI files..." />
+ <copy todir="${docs.dest}" filtering="no" overwrite="${force}">
+ <fileset dir="${docs.src}">
+ <include name="**/*.css"/>
+ <include name="**/*.cgi"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="release"
+ depends="docs"
+ description="Used after a release to update the version specific
docs">
+
+ <!-- NOTE: This task only updates the docs for the currently supported
+ versions. The older releases (3.2, 3.3, 4.0 & 4.1) will not
+ be updated. -->
+
+ <!-- Download the latest versions -->
+ <antcall target="downloadgz">
+ <param name="sourcefile" value="${tomcat55.loc}"/>
+ <param name="destfile"
value="${tomcat55.home}/tomcat-5.5-doc/index.html"/>
+ <param name="destdir" value="${tomcat55.home}"/>
+ </antcall>
+ <antcall target="downloadgz">
+ <param name="sourcefile" value="${tomcat60.loc}"/>
+ <param name="destfile"
value="${tomcat60.home}/tomcat-6.0-doc/index.html"/>
+ <param name="destdir" value="${tomcat60.home}"/>
+ </antcall>
+ <antcall target="downloadgz">
+ <param name="sourcefile" value="${tomcat70.loc}"/>
+ <param name="destfile"
value="${tomcat70.home}/tomcat-7.0-doc/index.html"/>
+ <param name="destdir" value="${tomcat70.home}"/>
+ </antcall>
+
+ <!-- Delete the old versions -->
+ <delete dir="${docs.dest}/tomcat-5.5-doc"/>
+ <delete dir="${docs.dest}/tomcat-6.0-doc"/>
+ <delete dir="${docs.dest}/tomcat-7.0-doc"/>
+ <delete dir="${docs.dest}/native-doc"/>
+ <delete dir="${docs.dest}/connectors-doc"/>
+
+ <!-- Copy the latest versions -->
+ <copy todir="${docs.dest}/tomcat-5.5-doc" >
+ <fileset dir="${tomcat55.home}/tomcat-5.5-doc" />
+ </copy>
+ <copy todir="${docs.dest}/tomcat-6.0-doc" >
+ <fileset dir="${tomcat60.home}/tomcat-6.0-doc" />
+ </copy>
+ <copy todir="${docs.dest}/tomcat-7.0-doc" >
+ <fileset dir="${tomcat70.home}/tomcat-7.0-doc" />
+ </copy>
+
+ <!-- Update the JK connectors docs -->
+ <ant dir="jk-xdocs" antfile="build.xml" target="build-main">
+ <property name="build.dir" value="../docs" />
+ <property name="dist.name" value="connectors-doc" />
+ </ant>
+ <!-- Update the Tomcat native docs -->
+ <ant dir="native-xdocs" antfile="build.xml" target="build-main">
+ <property name="build.dir" value="../docs" />
+ <property name="dist.name" value="native-doc" />
+ </ant>
+
+ </target>
+
+ <!-- =============== Utility Targets to support downloads ================
-->
+
+ <target name="downloadgz" unless="exist" depends="setproxy,testexist">
+ <!-- Download and extract the package -->
+ <get src="${sourcefile}" dest="${base.path}/file.tar.gz" />
+ <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
+ <untar src="${base.path}/file.tar" dest="${destdir}"/>
+ <delete file="${base.path}/file.tar"/>
+ <delete file="${base.path}/file.tar.gz"/>
+ </target>
+
+ <target name="setproxy" depends="proxyflags" if="useproxy">
+ <taskdef name="setproxy"
+ classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
+ proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
+ <echo message="Using ${proxy.host}:${proxy.port} to download
${sourcefile}"/>
+ </target>
+
+ <target name="proxyflags">
+ <!-- check proxy parameters. -->
+ <condition property="useproxy">
+ <equals arg1="${proxy.use}" arg2="on" />
+ </condition>
+ </target>
+
+ <target name="testexist">
+ <echo message="Testing for ${destfile}"/>
+ <available file="${destfile}" property="exist"/>
+ </target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]