You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/02/03 09:36:05 UTC
cvs commit: jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets document2html.xsl
vmassol 2003/02/03 00:36:05
Modified: documentation build.xml .cvsignore build.properties.sample
documentation/docs/xdocs changes.xml sitemap.xml
documentation/docs/skins/jakarta.apache.org/stylesheets
document2html.xsl
Removed: documentation/docs/xdocs javadoc_12.xml javadoc_13.xml
Log:
Major refactoring of the build systems and directory layout:
* Factorized common build parts into build-common.xml and normalized the builds
* Added "release" target to all builds
* Moved the sample-servlet and sample-jetty to samples/servlet and samples/jetty
* Moved the web site upload to the documentation build
* Simplified to the extreme the main Cactus build.xml and removed the build-admin.xml scripts
* Removed some Ant tasks that were in anttasks/ as they are now in the Ant Petal
* Some other cosmetic changes
* Added scripts for Tomcat 3.x (However, I get a strange error while running Tomcat 3.3.1. Not sure why yet (some flushbuffer() jasper error))
* WL 7.x script has been tested and works (for JDK < 1.4)
Several issues/todos remain:
* The Gump build is probably not working at all (I'll correct it as I receive Gump email notifications of errors)
* The Clover report is currently broken (i.e. not generated)
* The sample-jetty needs to be put in line with the new build system and use the new Ant Petal
* Pb of order in Sample Servlet test cases (one of the test must run before the other but this is not currently possible with the Ant Petal)
* WL 6.x script needs to be tested
Revision Changes Path
1.33 +176 -114 jakarta-cactus/documentation/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/build.xml,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- build.xml 28 Jan 2003 14:58:22 -0000 1.32
+++ build.xml 3 Feb 2003 08:36:04 -0000 1.33
@@ -1,20 +1,27 @@
<?xml version="1.0"?>
+<!DOCTYPE project [
+ <!ENTITY common SYSTEM "file:../build-common.xml">
+]>
<!--
=============================================================================
Build file for the Cactus Documentation (it builds the Cactus web pages
- which serves as the Cactus Web Site and as local documentation in the
- Cactus distribution).
+ which serves both as the Cactus Web Site and as local documentation).
- The mandatory and optional Ant properties are defined in
- build.properties.sample. Please read and edit that file.
+ The following Ant tasks need to be available in your ant installation (i.e.
+ the Ant task themselves and their dependent jars need to be put in
+ ANT_HOME/lib) :
+
+ xalan task (used by the <style> task)
+
+ See build.properties.sample for mandatory and optional Ant properties that
+ need to be set prior to calling this build script.
This script should be started with the following command line :
ant <target>
- Run "ant -projecthelp" to get a list of available targets. The default
- target is "dist"
+ Run "ant -projecthelp" to get a list of available targets.
Note: basedir points to the main Cactus directory in order to have the same
base dir for all Cactus subprojects and thus be able to share
@@ -23,94 +30,47 @@
-->
<project name="Cactus Documentation" default="dist" basedir="..">
- <!-- Give user a chance to override without editing this file
- (and without typing -D each time it compiles it) -->
- <property file="documentation/build.properties" />
- <property file="${user.home}/build.properties" />
-
- <!-- Global project properties -->
- <property name="project.name.text" value="Cactus Documentation"/>
- <property name="project.version" value="1.5dev"/>
-
- <!-- The Cactus web site keeps online the documentation for the previous
- version. This property is the name of the other version kept -->
- <property name="project.other.version" value="1.4.1"/>
-
- <!-- Prefix to add to all distributable files -->
- <property name="project.prefix" value="jakarta-"/>
-
- <!--
- ========================================================================
- Default values for properties not defined in build.properties or in
- a higher level calling Ant script
- ========================================================================
- -->
- <property name="year" value="2000-2003"/>
-
- <!--
- ========================================================================
- Base directory for all file related operations
- ========================================================================
- -->
+ <!-- Base directory for all file related operations -->
<property name="base.dir" value="documentation"/>
- <!--
- ========================================================================
- Set the properties related to the source tree
- ========================================================================
- -->
- <!-- Source locations for the build -->
- <property name="src.dir" location="${base.dir}/src"/>
- <property name="src.java.dir" location="${src.dir}/java"/>
- <property name="doc.dir" value="${base.dir}/docs"/>
- <property name="doc.dtd.dir" value="${doc.dir}/dtds"/>
- <property name="doc.skin.dir" value="${doc.dir}/skins"/>
- <property name="doc.xdoc.dir" value="${doc.dir}/xdocs"/>
- <property name="build.dir" value="${base.dir}/."/>
- <property name="conf.dir" value="${base.dir}/conf"/>
+ <!-- Include properties and targets common to the different subprojects -->
+ &common;
- <!--
- ========================================================================
- Set the properties related to the target area
- ========================================================================
- -->
- <!-- Destination locations for the build -->
- <property name="target.dir" value="${base.dir}/target"/>
- <property name="target.classes.dir" location="${target.dir}/classes"/>
- <property name="target.classes.java.dir"
- location="${target.classes.dir}/java"/>
- <property name="target.doc.dir" value="${target.dir}/doc"/>
- <property name="target.xdoc.dir" value="${target.dir}/xdocs"/>
-
- <!-- Distribution directory, i.e. where the expanded distibutable files
- are located -->
- <property name="dist.dir" value="${base.dir}/dist"/>
- <property name="dist.doc.dir" value="${dist.dir}/doc"/>
- <property name="dist.doc.api.dir" value="${dist.doc.dir}/api"/>
+ <!-- Global project properties -->
+ <property name="project.name.text" value="Cactus Documentation"/>
+ <property name="project.name.file" value="cactus-doc"/>
<!--
========================================================================
- Display configurable properties values
+ Initialize source, target and dist properties
========================================================================
-->
- <target name="display.properties">
-
- <echo message="----- ${project.name.text} ${project.version} -----"/>
- <echo message=""/>
- <echo message="java.class.path = ${java.class.path}"/>
- <echo message=""/>
- <echo message="java.home = ${java.home}"/>
- <echo message="user.home = ${user.home}"/>
- <echo message="ant.home = ${ant.home}"/>
+ <target name="properties">
- </target>
-
- <!--
- ========================================================================
- Verify that all mandatory properties have been set
- ========================================================================
- -->
- <target name="check.properties" depends="display.properties">
+ <!-- Set the properties related to the source tree -->
+ <property name="src.dir" value="${base.dir}/src"/>
+ <property name="src.java.dir" value="${src.dir}/java"/>
+ <property name="doc.dir" value="${base.dir}/docs"/>
+ <property name="doc.dtd.dir" value="${doc.dir}/dtds"/>
+ <property name="doc.skin.dir" value="${doc.dir}/skins"/>
+ <property name="doc.xdoc.dir" value="${doc.dir}/xdocs"/>
+ <property name="build.dir" value="${base.dir}/."/>
+ <property name="conf.dir" value="${base.dir}/conf"/>
+
+ <!-- Locations of javadocs that need to be included if javadoc.include
+ is defined -->
+ <property name="dist.framework.javadoc.12"
+ value="framework/dist-12/doc/api"/>
+ <property name="dist.framework.javadoc.13"
+ value="framework/dist-13/doc/api"/>
+ <property name="dist.anttasks.javadoc" value="anttasks/dist/doc/api"/>
+
+ <!-- Set the properties related to the target area -->
+ <property name="target.classes.dir" value="${target.dir}/classes"/>
+ <property name="target.classes.java.dir"
+ value="${target.classes.dir}/java"/>
+ <property name="target.doc.dir" value="${target.dir}/doc"/>
+ <property name="target.xdoc.dir" value="${target.dir}/xdocs"/>
</target>
@@ -119,23 +79,7 @@
Initialize the build. Must be called by all targets
========================================================================
-->
- <target name="init" depends="check.properties">
-
- <tstamp/>
-
- <condition property="offline">
- <or>
- <isset property="offline"/>
- <not>
- <http url="http://www.apache.org/"/>
- </not>
- </or>
- </condition>
-
- <!-- Filters -->
- <filter token="version" value="${project.version}"/>
- <filter token="year" value="${year}"/>
- <filter token="today" value="${TODAY}"/>
+ <target name="init" depends="init.common,properties">
<xmlcatalog id="documentation.dtds">
<dtd publicId="-//Apache Software Foundation//DTD Cactus Navigation V1.0//EN"
@@ -156,7 +100,9 @@
<mkdir dir="${target.classes.java.dir}"/>
- <javac srcdir="${src.java.dir}" destdir="${target.classes.java.dir}"/>
+ <javac srcdir="${src.java.dir}" destdir="${target.classes.java.dir}"
+ deprecation="${deprecation}" optimize="${optimize}"
+ debug="${debug}"/>
</target>
@@ -253,8 +199,8 @@
<param name="copyright"
expression="${year} The Apache Software Foundation"/>
<param name="project.version" expression="${project.version}"/>
- <param name="project.other.version"
- expression="${project.other.version}"/>
+ <param name="project.version.previous"
+ expression="${project.version.previous}"/>
<param name="last.updated.date" expression="${TODAY}"/>
<!-- Location of the xdoc directory relative to where the
@@ -294,12 +240,46 @@
<!--
========================================================================
- Generate the documentation (without the generated clover reports that
- are in sample-servlet and without the generated javadocs that are
- in anttasks and framework).
+ Copy the javadoc from other subprojects if javadoc.include is defined
========================================================================
-->
- <target name="dist" depends="doc" description="Generate the documentation">
+ <target name="dist.javadoc.check" depends="init" if="javadoc.include">
+
+ <condition property="javadoc.include.ok" value="true">
+ <and>
+ <available file="${dist.framework.javadoc.12}/index.html"/>
+ <available file="${dist.framework.javadoc.13}/index.html"/>
+ <available file="${dist.anttasks.javadoc}/index.html"/>
+ </and>
+ </condition>
+
+ <fail unless="javadoc.include.ok">One of the javadoc has not been
+generated. Run 'ant dist.javadoc -verbose' to know what the problem is.</fail>
+
+ </target>
+
+ <target name="dist.javadoc" depends="dist.javadoc.check"
+ if="javadoc.include.ok">
+
+ <copy todir="${dist.doc.api.dir}/anttasks">
+ <fileset dir="${dist.anttasks.javadoc}"/>
+ </copy>
+ <copy todir="${dist.doc.api.dir}/framework-12">
+ <fileset dir="${dist.framework.javadoc.12}"/>
+ </copy>
+ <copy todir="${dist.doc.api.dir}/framework-13">
+ <fileset dir="${dist.framework.javadoc.13}"/>
+ </copy>
+
+ </target>
+
+ <!--
+ ========================================================================
+ Generate the artifacts.
+ ========================================================================
+ -->
+ <target name="dist" depends="doc,dist.javadoc"
+ description="Generate the documentation">
<mkdir dir="${dist.doc.dir}"/>
@@ -310,16 +290,98 @@
</target>
- <!--
+ <!--
+ ========================================================================
+ Generate the release
+ ========================================================================
+ -->
+ <target name="release" depends="clean,dist"
+ description="Generate the release files">
+
+ <mkdir dir="${release.dir}"/>
+
+ <zip destfile="${release.dir}/${main.release.name}.zip">
+ <zipfileset dir="${dist.doc.dir}"
+ prefix="${main.release.name}"/>
+ </zip>
+
+ </target>
+
+ <!--
========================================================================
- Clean generated files (including distributables)
+ Upload the documentation to the Cactus web site on Jakarta
========================================================================
-->
- <target name="clean" description="Clean all generated files">
+ <target name="upload.check" depends="init">
+
+ <!-- Check that the zip is ready -->
+ <available file="${release.dir}/${main.release.name}.zip"
+ property="upload.zip.ok"/>
+
+ <fail message="You need to run 'ant release' first."
+ unless="upload.zip.ok"/>
+
+ <!-- Check if we are online -->
+ <fail message="You need to be online." if="offline"/>
+
+ <!-- Check that needed properties have been set -->
+
+ <echo>jakarta.username = ${jakarta.username}</echo>
+ <echo>scp = ${scp}</echo>
+ <echo>ssh = ${ssh}</echo>
+
+ <condition property="upload.ok" value="true">
+ <and>
+ <isset property="jakarta.username"/>
+ <isset property="scp"/>
+ <isset property="ssh"/>
+ </and>
+ </condition>
+
+ <fail unless="upload.ok">One of the needed property is not set. Run
+'ant upload -verbose' to know what the problem is.</fail>
+
+ </target>
+
+ <target name="upload.init" depends="upload.check">
+
+ <property name="cactus.homepage"
+ value="/www/jakarta.apache.org/cactus"/>
+
+ <condition property="is.dev.version">
+ <contains string="${project.version}" substring="dev"/>
+ </condition>
- <delete dir="${target.dir}"/>
- <delete dir="${dist.dir}"/>
+ <exec dir="." executable="${scp}">
+ <arg value="${release.dir}/${main.release.name}.zip"/>
+ <arg value="${jakarta.username}@jakarta.apache.org:/tmp"/>
+ </exec>
</target>
+
+ <target name="upload.release" depends="upload.init"
+ unless="is.dev.version">
+
+ <echo>Deploying release version to ${cactus.homepage} ...</echo>
+
+ <exec dir="." executable="${ssh}">
+ <arg line="-l ${jakarta.username} jakarta.apache.org 'cd /tmp;rm -Rf ${main.release.name};unzip ${main.release.name}.zip;cp -Rfv ${main.release.name}/* ${cactus.homepage};rm -Rf ${main.release.name}.zip;rm -Rf ${main.release.name}'"/>
+ </exec>
+
+ </target>
+
+ <target name="upload.dev" depends="upload.init"
+ if="is.dev.version">
+
+ <echo>Deploying dev version to ${cactus.homepage}/${project.version} ...</echo>
+
+ <exec dir="." executable="${ssh}">
+ <arg line="-l ${jakarta.username} jakarta.apache.org 'cd /tmp;rm -Rf ${main.release.name};unzip ${main.release.name}.zip;cp -Rfv ${main.release.name}/* ${cactus.homepage}/${project.version};rm -Rf ${main.release.name}.zip;rm -Rf ${main.release.name}'"/>
+ </exec>
+
+ </target>
+
+ <target name="upload" depends="upload.release,upload.dev"
+ description="Upload the Cactus web site"/>
</project>
1.3 +1 -0 jakarta-cactus/documentation/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore 20 Jul 2002 12:21:53 -0000 1.2
+++ .cvsignore 3 Feb 2003 08:36:04 -0000 1.3
@@ -1,4 +1,5 @@
build.properties
dist
target
+release
ant.bat
1.9 +16 -1 jakarta-cactus/documentation/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/build.properties.sample,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- build.properties.sample 9 Jan 2003 20:05:39 -0000 1.8
+++ build.properties.sample 3 Feb 2003 08:36:04 -0000 1.9
@@ -16,6 +16,21 @@
# Mandatory properties
# -----------------------------------------------------------------------------
+# Note: The "cvs" executable need to be present in the PATH for the "doc"
+# target to work. If you are offline, the cvs changelog displayed on the
+# changes page will be empty.
+
# -----------------------------------------------------------------------------
# Optional properties
# -----------------------------------------------------------------------------
+
+# Decide whether or not to include the javadoc from the other subprojects in
+# the web site. This is an option useful for reducing web site build time as
+# javadoc do not need to be always updated. Uncomment to activate inclusion
+# of javadoc.
+#javadoc.include = true
+
+# Properties needed to upload the documentation to the Cactus web site
+#jakarta.username = vmassol
+#scp = pscp
+#ssh = tortoisePlink
1.76 +28 -0 jakarta-cactus/documentation/docs/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/changes.xml,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- changes.xml 30 Jan 2003 14:57:12 -0000 1.75
+++ changes.xml 3 Feb 2003 08:36:05 -0000 1.76
@@ -57,8 +57,36 @@
</devs>
<release version="1.5" date="- in CVS">
+ <action dev="VMA" type="remove">
+ Moved some Ant tasks that were previously in the Cactus Ant tasks;
+ they are now in the Ant Petal project. They are the tasks used
+ to start/stop the containers and the <code>runservertests</code>
+ task. It is now recommended to use the Ant Petal.
+ </action>
+ <action dev="VMA" type="update">
+ Due to the new addition of 2 new Cactus subprojects: The Ant Petal
+ and the Eclipse Petal, the Cactus project is now delivering
+ several zips instead of one. Namely they are:
+ <code>jakarta-cactus-petal-ant-[J2EE API]-[version].zip</code>,
+ <code>jakarta-cactus-petal-eclipse-[J2EE API]-[version].zip</code>,
+ <code>jakarta-cactus-sample-servlet-[J2EE API]-[version].zip</code>
+ and
+ <code>jakarta-cactus-documentation-[J2EE API]-[version].zip</code>.
+ </action>
+ <action dev="VMA" type="update">
+ Improved (and normalized) build system. This change should not
+ be affect nor be visible by Cactus end-users.
+ </action>
<action dev="VMA" type="update">
Improved test classe names in the Servlet Sample application.
+ </action>
+ <action dev="VMA" type="update">
+ The Servlet Sample build is now using the Cactus Ant Petal.
+ </action>
+ <action dev="VMA" type="add">
+ New Cactus front end: The Cactus Ant Petal. It provides a generic
+ and directly reusable Ant directory structure for easily running
+ Cactus tests from one's own Ant build.
</action>
<action dev="VMA" type="update">
Modified the build process to generate the Cactus web site by
1.10 +0 -2 jakarta-cactus/documentation/docs/xdocs/sitemap.xml
Index: sitemap.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/sitemap.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sitemap.xml 28 Jan 2003 15:48:18 -0000 1.9
+++ sitemap.xml 3 Feb 2003 08:36:05 -0000 1.10
@@ -44,8 +44,6 @@
<resource id="getting_started" target="getting_started.html"/>
<resource id="mock_vs_cactus" target="mock_vs_cactus.html"/>
<resource id="javadoc" target="javadoc.html"/>
- <resource id="javadoc_12" target="javadoc_12.html"/>
- <resource id="javadoc_13" target="javadoc_13.html"/>
<resource id="faq" target="faq.html"/>
<resource id="eclipse_plugin" target="petals/eclipse/eclipse_plugin.html"/>
<resource id="howto_classpath" target="petals/manual/howto_classpath.html"/>
1.26 +4 -4 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl
Index: document2html.xsl
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- document2html.xsl 28 Jan 2003 16:08:43 -0000 1.25
+++ document2html.xsl 3 Feb 2003 08:36:05 -0000 1.26
@@ -36,7 +36,7 @@
<!-- Version of the "other" documentation (for switching between the
documentation for the current development version and the latest stable
release), to be passed in from the build -->
- <xsl:param name="project.other.version"/>
+ <xsl:param name="project.version.previous"/>
<!-- ==================================================================== -->
<!-- Global variables -->
@@ -163,12 +163,12 @@
<xsl:text>..</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$project.other.version"/>
+ <xsl:value-of select="$project.version.previous"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:text>v</xsl:text>
- <xsl:value-of select="$project.other.version"/>
+ <xsl:value-of select="$project.version.previous"/>
</a>
</font>
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org