You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2004/11/05 16:51:59 UTC

svn commit: rev 56679 - in cocoon/trunk/tools: bin src src/anttasks targets

Author: vgritsenko
Date: Fri Nov  5 07:51:58 2004
New Revision: 56679

Modified:
   cocoon/trunk/tools/bin/appendcp.bat   (contents, props changed)
   cocoon/trunk/tools/bin/create-repository-jars.sh   (contents, props changed)
   cocoon/trunk/tools/src/anttasks/DocumentCache.java
   cocoon/trunk/tools/src/anttasks/SitemapTask.java
   cocoon/trunk/tools/src/blocks-build.xsl
   cocoon/trunk/tools/targets/compile-build.xml
   cocoon/trunk/tools/targets/webapp-build.xml
Log:
sync with 2.1: new property include.sources-jars


Modified: cocoon/trunk/tools/bin/appendcp.bat
==============================================================================
--- cocoon/trunk/tools/bin/appendcp.bat	(original)
+++ cocoon/trunk/tools/bin/appendcp.bat	Fri Nov  5 07:51:58 2004
@@ -1,16 +1,16 @@
-rem  Copyright 1999-2004 The Apache Software Foundation
-rem
-rem  Licensed under the Apache License, Version 2.0 (the "License");
-rem  you may not use this file except in compliance with the License.
-rem  You may obtain a copy of the License at
-rem
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem  Unless required by applicable law or agreed to in writing, software
-rem  distributed under the License is distributed on an "AS IS" BASIS,
-rem  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem  See the License for the specific language governing permissions and
-rem  limitations under the License.
-
-set CLASSPATH=%CLASSPATH%;%1
-
+rem  Copyright 1999-2004 The Apache Software Foundation
+rem
+rem  Licensed under the Apache License, Version 2.0 (the "License");
+rem  you may not use this file except in compliance with the License.
+rem  You may obtain a copy of the License at
+rem
+rem      http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem  Unless required by applicable law or agreed to in writing, software
+rem  distributed under the License is distributed on an "AS IS" BASIS,
+rem  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem  See the License for the specific language governing permissions and
+rem  limitations under the License.
+
+set CLASSPATH=%CLASSPATH%;%1
+

Modified: cocoon/trunk/tools/bin/create-repository-jars.sh
==============================================================================
--- cocoon/trunk/tools/bin/create-repository-jars.sh	(original)
+++ cocoon/trunk/tools/bin/create-repository-jars.sh	Fri Nov  5 07:51:58 2004
@@ -1,292 +1,292 @@
-#!/bin/sh -x
-
-# Copyright 2004 The Apache Software Foundation
-#
-#  Licensed 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.
-
-# $Id: create-repository-jars.sh,v 1.13 2004/03/17 07:04:37 crossley Exp $
-
-# This script will do the following:
-#   - checkout/update a cocoon-2.1 repository
-#   - make a local.build.properties, that excludes all documentation stuff
-#   - build all jars and the war file
-#   - copy all jars and the war to the appropriate locations (repository structure)
-
-# The cvs repository name
-if [ "$REPOSITORY_NAME" = "" ]; then
-  REPOSITORY_NAME=cocoon-2.1
-fi
-
-# What is the default revision/branch/tag to use
-# In case of a HEAD revision a SNAPSHOT version will be created and
-# any old snapshots will be removed to save some space
-if [ "$REVISION" = "" ]; then
-  REVISION="" # it's a HEAD
-fi
-
-# What is the default CVSROOT to be used for checkout
-if [ "$CVSROOT" = "" ]; then
-  CVSROOT=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
-fi
-
-# Where is the local cocoon cvs repository we use to maintain.
-# If this directory doesn't exists it will do a 
-#   'cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY -r $REVISION $REPOSITORY_NAME'
-#   to create it.
-#   
-# If it exists it will do a 
-#   'cvs upd -dPACr $REVISION'
-#   in there to update to the requested revision (see REVISION below)
-if [ "$LOCAL_REPOSITORY" = "" ]; then
-  LOCAL_REPOSITORY=$HOME/cvs/cocoon-2.1
-fi
-
-# On which host should the artifacts be published
-if [ "$REMOTEHOST" = "" ]; then
-  REMOTEHOST=www.apache.org
-fi
-
-# Where is the path on the remote host the repository is located at
-if [ "$REMOTEPATH" = "" ]; then
-  REMOTEPATH=/www/www.apache.org/dist/java-repository/cocoon
-fi
-
-# Where is the md5sum command to be used
-if [ "$MD5SUM" = "" ]; then
-  MD5SUM=/sbin/md5
-fi
-
-# ------- NO NEED TO CHANGE ANYTHING BELOW HERE ----------
-
-if [ "$JAVA_HOME" = "" ]; then
-  echo "You need to set the JAVA_HOME environment variable to the installed JDK 1.3"
-  exit 1
-fi
-
-$JAVA_HOME/bin/java -version
-
-# parse for options
-NOCVS=0
-NOBUILD=0
-NOCLEAN=0
-NOJARS=0
-NOWAR=0
-BUILD_SRC_DIST=0
-while getopts ":BCdhJkW" option
-do
-  case $option in
-    B) NOBUILD=1;;
-    C) NOCVS=1;;
-    d) BUILD_SRC_DIST=1;;
-    h) echo "Usage: `basename $0` [-B] [-C] [-d] [-J] [-h] [-k] [-W] [RELEASE-TAG]"
-       echo "       -B          don't do a build"
-       echo "       -C          don't do a cvs update"
-       echo "       -d          build a src dist"
-       echo "       -h          this usage note"
-       echo "       -J          don't deploy the jar files"
-       echo "       -k          keep the build tree (don't do a clean-dist)"
-       echo "       -W          don't deploy the war file"
-       echo "       RELEASE-TAG the tag to do a cvs update for"
-       echo "                   if the RELEASE-TAG is HEAD a snapshot version"
-       echo "                   will be produced"
-       exit 0
-       ;;
-    J) NOJARS=1;;
-    k) NOCLEAN=1;;
-    W) NOWAR=1;;
-    *     ) echo "Unimplemented option $option chosen.";;
-  esac
-done
-
-shift $(($OPTIND - 1))
-if [ "$1" != "" -a "$1" != "HEAD" ]; then
-  REVISION=$1
-fi
-
-# check if the local repository exists and do a checkout/update accordingly
-if [ -d "$LOCAL_REPOSITORY" ]; then
-  cd $LOCAL_REPOSITORY
-  if [ $NOCVS = 0 ]; then
-    echo
-    echo "updating the local repository at $LOCAL_REPOSITORY with"
-    if [ "$REVISION" = "" ]; then
-      echo "    cvs up -dPAC"
-      echo
-      cvs up -dPAC
-    else
-      echo "    cvs up -dPACr $REVISION"
-      echo
-      cvs up -dPACr $REVISION
-    fi
-  fi
-else
-  DIRNAME=`dirname $LOCAL_REPOSITORY`
-  BASENAME=`basename $LOCAL_REPOSITORY`
-  if [ ! -d $DIRNAME ]; then
-    mkdir -p $DIRNAME 2>/dev/null >/dev/null
-  fi
-  cd $DIRNAME 
-  echo
-  echo "checking out into the local repository at $LOCAL_REPOSITORY with "
-  if [ "$REVISION" = "" ]; then
-    echo "    cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY $REPOSITORY_NAME"
-    echo
-    cvs -d $CVSROOT co -Pd $BASENAME $REPOSITORY_NAME
-  else
-    echo "    cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY -r $REVISION $REPOSITORY_NAME"
-    echo
-    cvs -d $CVSROOT co -Pd $BASENAME -r $REVISION $REPOSITORY_NAME
-  fi
-  cd $LOCAL_REPOSITORY
-fi
-
-# cleanup the repository, prepare and do a build if not suppressed by command line option
-RC=0 # set in advace in case we don't do a build
-if [ $NOBUILD = 0 ]; then
-  # build the local.blocks.properties file
-  echo
-  echo "generating local.blocks.properties file"
-  echo
-  cat blocks.properties \
-    >local.blocks.properties
-
-  # build the local.build.properties file
-  echo
-  echo "generating local.build.properties file"
-  echo
-  cat build.properties \
-    | sed 's/#exclude.webapp.documentation/exclude.webapp.documentation/' \
-    | sed 's/#exclude.webapp.javadocs/exclude.webapp.javadocs/' \
-    | sed 's/#exclude.webapp.samples/exclude.webapp.samples/' \
-    | sed 's/#exclude.documentation/exclude.documentation/' \
-    | sed 's/#exclude.javadocs/exclude.javadocs/' \
-    | sed 's/#exclude.validate.xdocs/exclude.validate.xdocs/' \
-    | sed 's/#config.allow-reloads/config.allow-reloads/' \
-    | sed 's/#config.enable-uploads/config.enable-uploads/' >local.build.properties
-
-  # build everything
-  echo
-  if [ $NOCLEAN = 0 ]; then
-    echo "clean the local repository, build the webapp, and the war files"
-    CLEAN=clean-dist
-  else
-    echo "build the webapp, and the war files"
-    CLEAN=""
-  fi
-  echo
-  ./build.sh $CLEAN webapp war | tee $LOCAL_REPOSITORY/build.log
-  # The build script dosn't report on failures so we have to do that by hand
-  tail -10 $LOCAL_REPOSITORY/build.log|grep "BUILD SUCCESSFUL"
-  if [ $? = 0 ]; then
-    RC=0
-  else
-    RC=1
-  fi
-fi
-
-if [ $RC -ne 0 ]; then
-  echo "The build has failed"
-  exit $RC
-fi
-
-# copy all the jars produced over to the remote repository space
-VERSION=`ls build | grep cocoon | sed s/cocoon-//`
-if [ "$REVISION" = "" ]; then 
-  TVERSION=`date "+%Y%m%d.%H%M%S"` 
-else
-  TVERSION=$VERSION
-fi
-
-if [ $NOJARS = 0 ]; then
-  # create the target directory if they do not exists and make them group writable
-  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/jars 2>/dev/null >/dev/null; \
-                 chmod -R g+w $REMOTEPATHi/jars"
-  JARS=`find build/cocoon-$VERSION -name "*.jar"`
-  for i in $JARS; do
-    FILE=`echo $i | sed 's/.*[/]//' | sed s/[.]jar//`
-    isBlock=`echo $FILE|grep block`
-    if [ ! -z "$isBlock" ]; then
-      BLOCKPART="-`echo $FILE | sed 's/-block//'`"
-    else
-      BLOCKPART=`echo $FILE | sed 's/cocoon//'`
-    fi
-    if [ "$REVISION" = "" ]; then
-      # remove all snapshots in the remote repository
-      SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/jars/cocoon$BLOCKPART-????????.??????.jar 2>/dev/null"` 
-    fi
-    scp $i $REMOTEHOST:$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar
-    if [ "$REVISION" = "" ]; then
-      if [ ! -z "$SNAPSHOT" ]; then
-        RM="rm $SNAPSHOT;"
-      else
-        RM=""
-      fi
-      CMD="$RM \
-           cd $REMOTEPATH/jars; \
-           ln -fs cocoon$BLOCKPART-$TVERSION.jar cocoon$BLOCKPART-SNAPSHOT.jar; \
-           echo $TVERSION >cocoon$BLOCKPART-snapshot.version;"
-    else
-      CMD=""
-    fi
-    ssh $REMOTEHOST "$CMD \
-                     $MD5SUM <$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar | \
-                       sed 's/ .*$//' >$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar.md5; \
-                     chmod g+w $REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.*"
-  done
-fi
-
-# copy the war file to the web space
-if [ "$NOWAR" = "0" ]; then
-  # create the target directory if they do not exists and make them group writable
-  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/wars 2>/dev/null >/dev/null; \
-                   chmod -R g+w $REMOTEPATH/wars"
-  WAR=build/cocoon-$VERSION/cocoon.war
-  if [ "$REVISION" = "" ]; then
-    SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/wars/cocoon-war-????????.??????.war 2>/dev/null"` 
-  fi
-  scp $WAR $REMOTEHOST:$REMOTEPATH/wars/cocoon-war-$TVERSION.war
-  if [ "$REVISION" = "" ]; then
-    if [ ! -z "$SNAPSHOT" ]; then
-      RM="rm $SNAPSHOT;"
-    else
-      RM=""
-    fi
-    CMD="$RM \
-         cd $REMOTEPATH/wars; \
-         ln -fs cocoon-war-$TVERSION.war cocoon-war-SNAPSHOT.war; \
-         echo $TVERSION >cocoon-war-snapshot.version;"
-  else
-    CMD=""
-  fi
-  ssh $REMOTEHOST "$CMD \
-                   $MD5SUM <$REMOTEPATH/wars/cocoon-war-$TVERSION.war | \
-                     sed 's/ .*$//' >$REMOTEPATH/jars/cocoon-war-$TVERSION.jar.md5; \
-                   chmod g+w $REMOTEPATH/jars/cocoon-war-$TVERSION.*"
-fi
-
-# create a distribution
-if [ "$BUILD_SRC_DIST" = "1" ]; then
-  # create the target directory if they do not exists and make them group writable
-  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/distributions 2>/dev/null >/dev/null; \
-                   chmod -R g+w $REMOTEPATH/distributions"
-  ./build.sh clean-dist
-  cd ..
-  if [ "$REVISION" = "" ]; then
-    TVERSION=SNAPSHOT
-  fi
-  ln -sf $REPOSITORY_NAME cocoon-src-$TVERSION
-  zip -r cocoon-src-$TVERSION.zip cocoon-src-$TVERSION
-  rm cocoon-src-$TVERSION
-  scp cocoon-src-$TVERSION.zip $REMOTEHOST:$REMOTEPATH/distributions/cocoon-src-$TVERSION.zip
-  rm cocoon-src-$TVERSION.zip
-fi
+#!/bin/sh -x
+
+# Copyright 2004 The Apache Software Foundation
+#
+#  Licensed 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.
+
+# $Id$
+
+# This script will do the following:
+#   - checkout/update a cocoon-2.1 repository
+#   - make a local.build.properties, that excludes all documentation stuff
+#   - build all jars and the war file
+#   - copy all jars and the war to the appropriate locations (repository structure)
+
+# The cvs repository name
+if [ "$REPOSITORY_NAME" = "" ]; then
+  REPOSITORY_NAME=cocoon-2.1
+fi
+
+# What is the default revision/branch/tag to use
+# In case of a HEAD revision a SNAPSHOT version will be created and
+# any old snapshots will be removed to save some space
+if [ "$REVISION" = "" ]; then
+  REVISION="" # it's a HEAD
+fi
+
+# What is the default CVSROOT to be used for checkout
+if [ "$CVSROOT" = "" ]; then
+  CVSROOT=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
+fi
+
+# Where is the local cocoon cvs repository we use to maintain.
+# If this directory doesn't exists it will do a 
+#   'cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY -r $REVISION $REPOSITORY_NAME'
+#   to create it.
+#   
+# If it exists it will do a 
+#   'cvs upd -dPACr $REVISION'
+#   in there to update to the requested revision (see REVISION below)
+if [ "$LOCAL_REPOSITORY" = "" ]; then
+  LOCAL_REPOSITORY=$HOME/cvs/cocoon-2.1
+fi
+
+# On which host should the artifacts be published
+if [ "$REMOTEHOST" = "" ]; then
+  REMOTEHOST=www.apache.org
+fi
+
+# Where is the path on the remote host the repository is located at
+if [ "$REMOTEPATH" = "" ]; then
+  REMOTEPATH=/www/www.apache.org/dist/java-repository/cocoon
+fi
+
+# Where is the md5sum command to be used
+if [ "$MD5SUM" = "" ]; then
+  MD5SUM=/sbin/md5
+fi
+
+# ------- NO NEED TO CHANGE ANYTHING BELOW HERE ----------
+
+if [ "$JAVA_HOME" = "" ]; then
+  echo "You need to set the JAVA_HOME environment variable to the installed JDK 1.3"
+  exit 1
+fi
+
+$JAVA_HOME/bin/java -version
+
+# parse for options
+NOCVS=0
+NOBUILD=0
+NOCLEAN=0
+NOJARS=0
+NOWAR=0
+BUILD_SRC_DIST=0
+while getopts ":BCdhJkW" option
+do
+  case $option in
+    B) NOBUILD=1;;
+    C) NOCVS=1;;
+    d) BUILD_SRC_DIST=1;;
+    h) echo "Usage: `basename $0` [-B] [-C] [-d] [-J] [-h] [-k] [-W] [RELEASE-TAG]"
+       echo "       -B          don't do a build"
+       echo "       -C          don't do a cvs update"
+       echo "       -d          build a src dist"
+       echo "       -h          this usage note"
+       echo "       -J          don't deploy the jar files"
+       echo "       -k          keep the build tree (don't do a clean-dist)"
+       echo "       -W          don't deploy the war file"
+       echo "       RELEASE-TAG the tag to do a cvs update for"
+       echo "                   if the RELEASE-TAG is HEAD a snapshot version"
+       echo "                   will be produced"
+       exit 0
+       ;;
+    J) NOJARS=1;;
+    k) NOCLEAN=1;;
+    W) NOWAR=1;;
+    *     ) echo "Unimplemented option $option chosen.";;
+  esac
+done
+
+shift $(($OPTIND - 1))
+if [ "$1" != "" -a "$1" != "HEAD" ]; then
+  REVISION=$1
+fi
+
+# check if the local repository exists and do a checkout/update accordingly
+if [ -d "$LOCAL_REPOSITORY" ]; then
+  cd $LOCAL_REPOSITORY
+  if [ $NOCVS = 0 ]; then
+    echo
+    echo "updating the local repository at $LOCAL_REPOSITORY with"
+    if [ "$REVISION" = "" ]; then
+      echo "    cvs up -dPAC"
+      echo
+      cvs up -dPAC
+    else
+      echo "    cvs up -dPACr $REVISION"
+      echo
+      cvs up -dPACr $REVISION
+    fi
+  fi
+else
+  DIRNAME=`dirname $LOCAL_REPOSITORY`
+  BASENAME=`basename $LOCAL_REPOSITORY`
+  if [ ! -d $DIRNAME ]; then
+    mkdir -p $DIRNAME 2>/dev/null >/dev/null
+  fi
+  cd $DIRNAME 
+  echo
+  echo "checking out into the local repository at $LOCAL_REPOSITORY with "
+  if [ "$REVISION" = "" ]; then
+    echo "    cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY $REPOSITORY_NAME"
+    echo
+    cvs -d $CVSROOT co -Pd $BASENAME $REPOSITORY_NAME
+  else
+    echo "    cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY -r $REVISION $REPOSITORY_NAME"
+    echo
+    cvs -d $CVSROOT co -Pd $BASENAME -r $REVISION $REPOSITORY_NAME
+  fi
+  cd $LOCAL_REPOSITORY
+fi
+
+# cleanup the repository, prepare and do a build if not suppressed by command line option
+RC=0 # set in advace in case we don't do a build
+if [ $NOBUILD = 0 ]; then
+  # build the local.blocks.properties file
+  echo
+  echo "generating local.blocks.properties file"
+  echo
+  cat blocks.properties \
+    >local.blocks.properties
+
+  # build the local.build.properties file
+  echo
+  echo "generating local.build.properties file"
+  echo
+  cat build.properties \
+    | sed 's/#exclude.webapp.documentation/exclude.webapp.documentation/' \
+    | sed 's/#exclude.webapp.javadocs/exclude.webapp.javadocs/' \
+    | sed 's/#exclude.webapp.samples/exclude.webapp.samples/' \
+    | sed 's/#exclude.documentation/exclude.documentation/' \
+    | sed 's/#exclude.javadocs/exclude.javadocs/' \
+    | sed 's/#exclude.validate.xdocs/exclude.validate.xdocs/' \
+    | sed 's/#config.allow-reloads/config.allow-reloads/' \
+    | sed 's/#config.enable-uploads/config.enable-uploads/' >local.build.properties
+
+  # build everything
+  echo
+  if [ $NOCLEAN = 0 ]; then
+    echo "clean the local repository, build the webapp, and the war files"
+    CLEAN=clean-dist
+  else
+    echo "build the webapp, and the war files"
+    CLEAN=""
+  fi
+  echo
+  ./build.sh $CLEAN webapp war | tee $LOCAL_REPOSITORY/build.log
+  # The build script dosn't report on failures so we have to do that by hand
+  tail -10 $LOCAL_REPOSITORY/build.log|grep "BUILD SUCCESSFUL"
+  if [ $? = 0 ]; then
+    RC=0
+  else
+    RC=1
+  fi
+fi
+
+if [ $RC -ne 0 ]; then
+  echo "The build has failed"
+  exit $RC
+fi
+
+# copy all the jars produced over to the remote repository space
+VERSION=`ls build | grep cocoon | sed s/cocoon-//`
+if [ "$REVISION" = "" ]; then 
+  TVERSION=`date "+%Y%m%d.%H%M%S"` 
+else
+  TVERSION=$VERSION
+fi
+
+if [ $NOJARS = 0 ]; then
+  # create the target directory if they do not exists and make them group writable
+  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/jars 2>/dev/null >/dev/null; \
+                 chmod -R g+w $REMOTEPATHi/jars"
+  JARS=`find build/cocoon-$VERSION -name "*.jar"`
+  for i in $JARS; do
+    FILE=`echo $i | sed 's/.*[/]//' | sed s/[.]jar//`
+    isBlock=`echo $FILE|grep block`
+    if [ ! -z "$isBlock" ]; then
+      BLOCKPART="-`echo $FILE | sed 's/-block//'`"
+    else
+      BLOCKPART=`echo $FILE | sed 's/cocoon//'`
+    fi
+    if [ "$REVISION" = "" ]; then
+      # remove all snapshots in the remote repository
+      SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/jars/cocoon$BLOCKPART-????????.??????.jar 2>/dev/null"` 
+    fi
+    scp $i $REMOTEHOST:$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar
+    if [ "$REVISION" = "" ]; then
+      if [ ! -z "$SNAPSHOT" ]; then
+        RM="rm $SNAPSHOT;"
+      else
+        RM=""
+      fi
+      CMD="$RM \
+           cd $REMOTEPATH/jars; \
+           ln -fs cocoon$BLOCKPART-$TVERSION.jar cocoon$BLOCKPART-SNAPSHOT.jar; \
+           echo $TVERSION >cocoon$BLOCKPART-snapshot.version;"
+    else
+      CMD=""
+    fi
+    ssh $REMOTEHOST "$CMD \
+                     $MD5SUM <$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar | \
+                       sed 's/ .*$//' >$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar.md5; \
+                     chmod g+w $REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.*"
+  done
+fi
+
+# copy the war file to the web space
+if [ "$NOWAR" = "0" ]; then
+  # create the target directory if they do not exists and make them group writable
+  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/wars 2>/dev/null >/dev/null; \
+                   chmod -R g+w $REMOTEPATH/wars"
+  WAR=build/cocoon-$VERSION/cocoon.war
+  if [ "$REVISION" = "" ]; then
+    SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/wars/cocoon-war-????????.??????.war 2>/dev/null"` 
+  fi
+  scp $WAR $REMOTEHOST:$REMOTEPATH/wars/cocoon-war-$TVERSION.war
+  if [ "$REVISION" = "" ]; then
+    if [ ! -z "$SNAPSHOT" ]; then
+      RM="rm $SNAPSHOT;"
+    else
+      RM=""
+    fi
+    CMD="$RM \
+         cd $REMOTEPATH/wars; \
+         ln -fs cocoon-war-$TVERSION.war cocoon-war-SNAPSHOT.war; \
+         echo $TVERSION >cocoon-war-snapshot.version;"
+  else
+    CMD=""
+  fi
+  ssh $REMOTEHOST "$CMD \
+                   $MD5SUM <$REMOTEPATH/wars/cocoon-war-$TVERSION.war | \
+                     sed 's/ .*$//' >$REMOTEPATH/jars/cocoon-war-$TVERSION.jar.md5; \
+                   chmod g+w $REMOTEPATH/jars/cocoon-war-$TVERSION.*"
+fi
+
+# create a distribution
+if [ "$BUILD_SRC_DIST" = "1" ]; then
+  # create the target directory if they do not exists and make them group writable
+  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/distributions 2>/dev/null >/dev/null; \
+                   chmod -R g+w $REMOTEPATH/distributions"
+  ./build.sh clean-dist
+  cd ..
+  if [ "$REVISION" = "" ]; then
+    TVERSION=SNAPSHOT
+  fi
+  ln -sf $REPOSITORY_NAME cocoon-src-$TVERSION
+  zip -r cocoon-src-$TVERSION.zip cocoon-src-$TVERSION
+  rm cocoon-src-$TVERSION
+  scp cocoon-src-$TVERSION.zip $REMOTEHOST:$REMOTEPATH/distributions/cocoon-src-$TVERSION.zip
+  rm cocoon-src-$TVERSION.zip
+fi

Modified: cocoon/trunk/tools/src/anttasks/DocumentCache.java
==============================================================================
--- cocoon/trunk/tools/src/anttasks/DocumentCache.java	(original)
+++ cocoon/trunk/tools/src/anttasks/DocumentCache.java	Fri Nov  5 07:51:58 2004
@@ -125,7 +125,7 @@
         Properties props = new Properties();
         if (null != doctype) {
             if (null != doctype.getPublicId()) {
-                props.put(OutputKeys.DOCTYPE_PUBLIC, doctype.getPublicId());  
+                props.put(OutputKeys.DOCTYPE_PUBLIC, doctype.getPublicId());
             }
             if (null != doctype.getSystemId()) {
                 props.put(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId());

Modified: cocoon/trunk/tools/src/anttasks/SitemapTask.java
==============================================================================
--- cocoon/trunk/tools/src/anttasks/SitemapTask.java	(original)
+++ cocoon/trunk/tools/src/anttasks/SitemapTask.java	Fri Nov  5 07:51:58 2004
@@ -321,7 +321,7 @@
             final String htmlName = docFile.getName().substring(0, docFile.getName().length()-3) + "html";
             Node oldEntry = XPathAPI.selectSingleNode(sectionNode, "menu-item[@href='"+htmlName+"']");
             Node newEntry = indexDoc.createElement("menu-item");
-            ((Element)newEntry).setAttribute("href", htmlName);  
+            ((Element)newEntry).setAttribute("href", htmlName);
             final String label = capitalize(component.getName()) + " " + capitalize(component.getType());
             ((Element)newEntry).setAttribute("label", label);
             if ( oldEntry != null ) {
@@ -715,7 +715,7 @@
             }
         }
     
-}
+    }
     
     // Class Constants
     private static final String LOG_ENABLED = "org.apache.avalon.framework.logger.LogEnabled";

Modified: cocoon/trunk/tools/src/blocks-build.xsl
==============================================================================
--- cocoon/trunk/tools/src/blocks-build.xsl	(original)
+++ cocoon/trunk/tools/src/blocks-build.xsl	Fri Nov  5 07:51:58 2004
@@ -438,6 +438,17 @@
         </then>
       </if>
 
+      <if>
+        <istrue value="${{include.sources-jars}}"/>
+        <then>
+          <jar jarfile="${{build.blocks}}/{$block-name}-block.src.jar">
+            <fileset dir="${{blocks}}/{$block-name}/java">
+              <include name="**/*.java"/>
+            </fileset>
+          </jar>
+        </then>
+      </if>
+
       <!-- exclude sample classes from the block package -->
       <mkdir dir="${{build.blocks}}/{$block-name}/samples"/>
       <javac destdir="${{build.blocks}}/{$block-name}/samples"
@@ -601,6 +612,7 @@
         </then>
       </if>
     </target>
+
 
     <target name="{@name}-prepare" unless="internal.exclude.block.{$block-name}">
       <xsl:if test="depend">

Modified: cocoon/trunk/tools/targets/compile-build.xml
==============================================================================
--- cocoon/trunk/tools/targets/compile-build.xml	(original)
+++ cocoon/trunk/tools/targets/compile-build.xml	Fri Nov  5 07:51:58 2004
@@ -73,12 +73,11 @@
            nowarn="${compiler.nowarn}"
            compiler="${compiler}"
            classpathref="classpath"/>
-
   </target>
 
   <!-- compiles deprecated code -->
   <target name="compile-deprecated" depends="prepare"
-      unless="internal.exclude.deprecated">
+          unless="internal.exclude.deprecated">
     <mkdir dir="${build.deprecated}"/>
 
 <!--
@@ -154,6 +153,16 @@
         </jar>
       </then>
     </if>
+    <if>
+      <istrue value="${include.sources-jars}"/>
+      <then>
+        <jar jarfile="${build}/${name}.src.jar">
+          <fileset dir="${java}">
+            <include name="**/*.java"/>
+          </fileset>
+        </jar>
+      </then>
+    </if>
   </target>
 
   <!-- package deprecated code -->
@@ -173,6 +182,16 @@
         </jar>
       </then>
     </if>
+    <if>
+      <istrue value="${include.sources-jars}"/>
+      <then>
+        <jar jarfile="${build}/${name}-deprecated.src.jar" update="yes">
+          <fileset dir="${deprecated.src}">
+            <include name="**/*.java"/>
+          </fileset>
+        </jar>
+      </then>
+    </if>
   </target>
 
   <!-- package testcase code -->
@@ -185,6 +204,16 @@
       <istrue value="${include.sources-in-jars}"/>
       <then>
         <jar jarfile="${build}/${name}-testcase.jar" update="yes">
+          <fileset dir="${test}">
+            <include name="**/*.java"/>
+          </fileset>
+        </jar>
+      </then>
+    </if>
+    <if>
+      <istrue value="${include.sources-jars}"/>
+      <then>
+        <jar jarfile="${build}/${name}-testcase.src.jar">
           <fileset dir="${test}">
             <include name="**/*.java"/>
           </fileset>

Modified: cocoon/trunk/tools/targets/webapp-build.xml
==============================================================================
--- cocoon/trunk/tools/targets/webapp-build.xml	(original)
+++ cocoon/trunk/tools/targets/webapp-build.xml	Fri Nov  5 07:51:58 2004
@@ -28,10 +28,10 @@
     <copy file="${webapp}/welcome.xslt" tofile="${build.webapp}/welcome.xslt" filtering="on"/>
     <copy file="${webapp}/sitemap.xmap" tofile="${build.webapp}/sitemap.xmap"/>
 
-	<!-- generate sitemap entries 
+    <!-- generate sitemap entries 
     <sitemap-components sitemap="${build.webapp}/sitemap.xmap" source="${java}"/>
     -->
-    
+
     <copy todir="${build.webapp}/stylesheets" filtering="on">
       <fileset dir="${webapp}/stylesheets">
         <include name="**/*.xslt"/>
@@ -50,7 +50,8 @@
       </fileset>
     </copy>
 
-    <copy file="${build}/${name}.jar" tofile="${build.webapp.lib}/${name}-${version}.jar"/>
+    <copy file="${build}/${name}.jar"
+          tofile="${build.webapp.lib}/${name}-${version}.jar"/>
 
     <copy todir="${build.webapp.lib}">
       <fileset dir="${lib}/endorsed">
@@ -82,6 +83,20 @@
       </fileset>
       <mapper type="glob" from="*-block.jar" to="cocoon-*-block.jar"/>
     </copy>
+
+    <if>
+      <istrue value="${include.sources-jars}"/>
+      <then>
+        <copy file="${build}/${name}.src.jar"
+              tofile="${build.webapp.lib}/${name}-${version}.src.jar"/>
+        <copy todir="${build.webapp.lib}">
+          <fileset dir="${build.blocks}">
+            <include name="*-block.src.jar"/>
+          </fileset>
+          <mapper type="glob" from="*-block.src.jar" to="cocoon-*-block.src.jar"/>
+        </copy>
+      </then>
+    </if>
 
     <ant antfile="${build.temp}/blocks-build.xml"
          inheritAll="true"