Author: thomas.heute(a)jboss.com
Date: 2007-07-17 18:53:37 -0400 (Tue, 17 Jul 2007)
New Revision: 7810
Added:
branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/
branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-frames.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-text.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-xdoc.xsl
Modified:
branches/JBoss_Portal_Branch_2_6/tools/bin/ant
branches/JBoss_Portal_Branch_2_6/tools/bin/ant.bat
branches/JBoss_Portal_Branch_2_6/tools/bin/antRun
branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.bat
branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.pl
branches/JBoss_Portal_Branch_2_6/tools/bin/complete-ant-cmd.pl
branches/JBoss_Portal_Branch_2_6/tools/bin/lcp.bat
branches/JBoss_Portal_Branch_2_6/tools/bin/runant.pl
branches/JBoss_Portal_Branch_2_6/tools/bin/runant.py
branches/JBoss_Portal_Branch_2_6/tools/etc/changelog.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/coverage-frames.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend-frames.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/junit-frames.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/junit-noframes.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/log.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/maudit-frames.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/mmetrics-frames.xsl
branches/JBoss_Portal_Branch_2_6/tools/etc/tagdiff.xsl
branches/JBoss_Portal_Branch_2_6/tools/lib/ant-junit.jar
branches/JBoss_Portal_Branch_2_6/tools/lib/ant-launcher.jar
branches/JBoss_Portal_Branch_2_6/tools/lib/ant-nodeps.jar
branches/JBoss_Portal_Branch_2_6/tools/lib/ant.jar
branches/JBoss_Portal_Branch_2_6/tools/lib/xercesImpl.jar
branches/JBoss_Portal_Branch_2_6/tools/lib/xml-apis.jar
Log:
Update ant to 1.7.0
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/ant
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/ant 2007-07-17 19:26:55 UTC (rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/ant 2007-07-17 22:53:37 UTC (rev 7810)
@@ -1,24 +1,80 @@
#! /bin/sh
-# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-# reserved.
+# 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.
-# load system-wide ant configuration
-if [ -f "/etc/ant.conf" ] ; then
- . /etc/ant.conf
-fi
+# Extract launch and ant arguments, (see details below).
+ant_exec_args=
+no_config=false
+use_jikes_default=false
+ant_exec_debug=false
+show_help=false
+for arg in "$@" ; do
+ if [ "$arg" = "--noconfig" ] ; then
+ no_config=true
+ elif [ "$arg" = "--usejikes" ] ; then
+ use_jikes_default=true
+ elif [ "$arg" = "--execdebug" ] ; then
+ ant_exec_debug=true
+ elif [ my"$arg" = my"--h" -o my"$arg" =
my"--help" ] ; then
+ show_help=true
+ ant_exec_args="$ant_exec_args -h"
+ else
+ if [ my"$arg" = my"-h" -o my"$arg" =
my"-help" ] ; then
+ show_help=true
+ fi
+ ant_exec_args="$ant_exec_args \"$arg\""
+ fi
+done
-# provide default values for people who don't use RPMs
-if [ -z "$rpm_mode" ] ; then
- rpm_mode=false;
+# Source/default ant configuration
+if $no_config ; then
+ rpm_mode=false
+ usejikes=$use_jikes_default
+else
+ # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
+ if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ];
then
+ if [ -f "/etc/ant.conf" ] ; then
+ . /etc/ant.conf
+ fi
+ fi
+
+ # load user ant configuration
+ if [ -f "$HOME/.ant/ant.conf" ] ; then
+ . $HOME/.ant/ant.conf
+ fi
+ if [ -f "$HOME/.antrc" ] ; then
+ . "$HOME/.antrc"
+ fi
+
+ # provide default configuration values
+ if [ -z "$rpm_mode" ] ; then
+ rpm_mode=false
+ fi
+ if [ -z "$usejikes" ] ; then
+ usejikes=$use_jikes_default
+ fi
fi
-if [ -z "$usejikes" ] ; then
- usejikes=false;
-fi
-# load user ant configuration
-if [ -f "$HOME/.antrc" ] ; then
- . "$HOME/.antrc"
+# Setup Java environment in rpm mode
+if $rpm_mode ; then
+ if [ -f /usr/share/java-utils/java-functions ] ; then
+ . /usr/share/java-utils/java-functions
+ set_jvm
+ set_javacmd
+ fi
fi
# OS specific support. $var _must_ be set to either true or false.
@@ -28,43 +84,29 @@
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true
if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
;;
esac
-if [ -z "$ANT_HOME" ] ; then
- # try to find ANT
- if [ -d /opt/ant ] ; then
- ANT_HOME=/opt/ant
- fi
-
- if [ -d "${HOME}/opt/ant" ] ; then
- ANT_HOME="${HOME}/opt/ant"
- fi
-
+if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
## resolve links - $0 may be a link to ant's home
PRG="$0"
progname=`basename "$0"`
- saveddir=`pwd`
# need this for relative symlinks
- cd `dirname "$PRG"`
-
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
else
- PRG=`dirname "$PRG"`"/$link"
+ PRG=`dirname "$PRG"`"/$link"
fi
done
-
+
ANT_HOME=`dirname "$PRG"`/..
- cd "$saveddir"
-
# make it fully qualified
ANT_HOME=`cd "$ANT_HOME" && pwd`
fi
@@ -75,90 +117,122 @@
ANT_HOME=`cygpath --unix "$ANT_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# set ANT_LIB location
ANT_LIB="${ANT_HOME}/lib"
-if [ -z "$JAVACMD" ] ; then
+if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
+ # IBM's JDK on AIX uses strange locations for the executables
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
JAVACMD="$JAVA_HOME/jre/sh/java"
+ elif [ -x "$JAVA_HOME/jre/bin/java" ] ; then
+ JAVACMD="$JAVA_HOME/jre/bin/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
- JAVACMD=java
+ JAVACMD=`which java 2> /dev/null `
+ if [ -z "$JAVACMD" ] ; then
+ JAVACMD=java
+ fi
fi
fi
-
+
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit 1
fi
-if [ -n "$CLASSPATH" ] ; then
- LOCALCLASSPATH="$CLASSPATH"
-fi
+# Build local classpath using just the launcher in non-rpm mode or
+# use the Jpackage helper in rpm mode with basic and default jars
+# specified in the ant.conf configuration. Because the launcher is
+# used, libraries linked in ANT_HOME/lib will also be included, but this
+# is discouraged as it is not java-version safe. A user should
+# request optional jars and their dependencies via the OPT_JAR_LIST
+# variable
+if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
+ LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl
xml-commons-apis)"
-# in rpm_mode get ant/optional/xml parser&api from JAVALIBDIR
-if $rpm_mode; then
- JAVALIBDIR=/usr/share/java
- for i in ant ant-optional jaxp_parser xml_apis
- do
- if [ -z "$LOCALCLASSPATH" ] ; then
- LOCALCLASSPATH="$JAVALIBDIR/$i.jar"
- else
- LOCALCLASSPATH="$JAVALIBDIR/$i.jar":"$LOCALCLASSPATH"
- fi
- done
+ # If no optional jars have been specified then build the default list
+ if [ -z "$OPT_JAR_LIST" ] ; then
+ for file in /etc/ant.d/*; do
+ if [ -f "$file" ]; then
+ case "$file" in
+ *~) ;;
+ *#*) ;;
+ *.rpmsave) ;;
+ *.rpmnew) ;;
+ *)
+ for dep in `cat "$file"`; do
+ case "$OPT_JAR_LIST" in
+ *"$dep"*) ;;
+ *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
+ esac
+ done
+ esac
+ fi
+ done
+ fi
- # in rpm mode ant/lib is in /usr/share/java/ant
- ANT_LIB="${JAVALIBDIR}/ant"
-fi
-
-# add in the dependency .jar files in non-RPM mode (the default)
-for i in "${ANT_LIB}"/*.jar
-do
- # if the directory is empty, then it will return the input string
- # this is stupid, so case for it
- if [ -f "$i" ] ; then
- if [ -z "$LOCALCLASSPATH" ] ; then
- LOCALCLASSPATH="$i"
- else
- LOCALCLASSPATH="$i":"$LOCALCLASSPATH"
+ # If the user requested to try to add some other jars to the classpath
+ if [ -n "$OPT_JAR_LIST" ] ; then
+ _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
+ if [ -n "$_OPTCLASSPATH" ] ; then
+ LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
fi
fi
-done
-if [ -n "$JAVA_HOME" ] ; then
+ # Explicitly add javac path to classpath, assume JAVA_HOME set
+ # properly in rpm mode
if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
fi
-
if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
fi
+ # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
+ # user CLASSPATH first and ant-found jars after.
+ # In that case, the user CLASSPATH will override ant-found jars
+ #
+ # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
+ # with ant-found jars first and user CLASSPATH after
+ if [ -n "$CLASSPATH" ] ; then
+ # merge local and specified classpath
+ if [ -z "$LOCALCLASSPATH" ] ; then
+ LOCALCLASSPATH="$CLASSPATH"
+ elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
+ LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
+ else
+ LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
+ fi
+
+ # remove class path from launcher -cp option
+ CLASSPATH=""
+ fi
+else
+ # not using rpm_mode; use launcher to determine classpaths
+ if [ -z "$LOCALCLASSPATH" ] ; then
+ LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
+ else
+ LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
+ fi
+fi
+
+if [ -n "$JAVA_HOME" ] ; then
# OSX hack to make Ant work with jikes
if $darwin ; then
-
OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
- if [ -d ${OSXHACK} ] ; then
- for i in ${OSXHACK}/*.jar
+ OSXHACK="${JAVA_HOME}/../Classes"
+ if [ -d "${OSXHACK}" ] ; then
+ for i in "${OSXHACK}"/*.jar
do
JIKESPATH="$JIKESPATH:$i"
done
fi
fi
-else
- echo "Warning: JAVA_HOME environment variable is not set."
- echo " If build fails because sun.* classes could not be found"
- echo " you will need to set the JAVA_HOME environment variable"
- echo " to the installation directory of java."
fi
# Allow Jikes support (off by default)
@@ -166,27 +240,87 @@
ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
fi
-# For Cygwin, switch paths to Windows format before running java
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
if $cygwin; then
- ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
- CYGHOME=`cygpath --path --windows "$HOME"`
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null
2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ ANT_HOME=`cygpath --$format "$ANT_HOME"`
+ ANT_LIB=`cygpath --$format "$ANT_LIB"`
+ JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
+ LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
+ LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+ if [ -n "$CLASSPATH" ] ; then
+ CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
+ CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+ fi
+ CYGHOME=`cygpath --$format "$HOME"`
fi
+# Show script help if requested
+if $show_help ; then
+ echo $0 '[script options] [options] [target [target2 [target3] ..]]'
+ echo 'Script Options:'
+ echo ' --help, --h print this message and ant help'
+ echo ' --noconfig suppress sourcing of /etc/ant.conf,'
+ echo ' $HOME/.ant/ant.conf, and $HOME/.antrc'
+ echo ' configuration files'
+ echo ' --usejikes enable use of jikes by default, unless'
+ echo ' set explicitly in configuration files'
+ echo ' --execdebug print ant exec line generated by this'
+ echo ' launch script'
+ echo ' '
+fi
+# add a second backslash to variables terminated by a backslash under cygwin
+if $cygwin; then
+ case "$ANT_HOME" in
+ *\\ )
+ ANT_HOME="$ANT_HOME\\"
+ ;;
+ esac
+ case "$CYGHOME" in
+ *\\ )
+ CYGHOME="$CYGHOME\\"
+ ;;
+ esac
+ case "$JIKESPATH" in
+ *\\ )
+ JIKESPATH="$JIKESPATH\\"
+ ;;
+ esac
+ case "$LOCALCLASSPATH" in
+ *\\ )
+ LOCALCLASSPATH="$LOCALCLASSPATH\\"
+ ;;
+ esac
+ case "$CLASSPATH" in
+ *\\ )
+ CLASSPATH="$CLASSPATH\\"
+ ;;
+ esac
+fi
+# Execute ant using eval/exec to preserve spaces in paths,
+# java options, and ant args
+ant_sys_opts=
if [ -n "$CYGHOME" ]; then
if [ -n "$JIKESPATH" ]; then
- JIKESPATH=`cygpath --path --windows "$JIKESPATH"`
- "$JAVACMD" -classpath "$LOCALCLASSPATH"
-Dant.home="${ANT_HOME}" -Djikes.class.path="$JIKESPATH"
-Dcygwin.user.home="$CYGHOME" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS
"$@"
+ ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\"
-Dcygwin.user.home=\"$CYGHOME\""
else
- "$JAVACMD" -classpath "$LOCALCLASSPATH"
-Dant.home="${ANT_HOME}" -Dcygwin.user.home="$CYGHOME" $ANT_OPTS
org.apache.tools.ant.Main $ANT_ARGS "$@"
+ ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
fi
else
if [ -n "$JIKESPATH" ]; then
- "$JAVACMD" -classpath "$LOCALCLASSPATH"
-Dant.home="${ANT_HOME}" -Djikes.class.path="$JIKESPATH" $ANT_OPTS
org.apache.tools.ant.Main $ANT_ARGS "$@"
- else
- "$JAVACMD" -classpath "$LOCALCLASSPATH"
-Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS
"$@"
+ ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
fi
fi
-
+ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath
\"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\"
-Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts
org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\"
$ant_exec_args"
+if $ant_exec_debug ; then
+ echo $ant_exec_command
+fi
+eval $ant_exec_command
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/ant.bat
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/ant.bat 2007-07-17 19:26:55 UTC (rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/ant.bat 2007-07-17 22:53:37 UTC (rev 7810)
@@ -1,17 +1,61 @@
@echo off
-REM Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-REM reserved.
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. 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.
+REM This is an inordinately troublesome piece of code, particularly because it
+REM tries to work on both Win9x and WinNT-based systems. If we could abandon '9x
+REM support, things would be much easier, but sadly, it is not yet time.
+REM Be cautious about editing this, and only add WinNT specific stuff in code that
+REM only runs on WinNT.
+
+if "%HOME%"=="" goto homeDrivePathPre
if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
+:homeDrivePathPre
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call
"%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"
+
+:userProfilePre
+if "%USERPROFILE%"=="" goto alpha
+if "%USERPROFILE%"=="%HOME%" goto alpha
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha
+if exist "%USERPROFILE%\antrc_pre.bat" call
"%USERPROFILE%\antrc_pre.bat"
+
+:alpha
+
if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+if "%ANT_HOME%"=="" goto setDefaultAntHome
+
+:stripAntHome
+if not _%ANT_HOME:~-1%==_\ goto checkClasspath
+set ANT_HOME=%ANT_HOME:~0,-1%
+goto stripAntHome
+
+:setDefaultAntHome
rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
+set ANT_HOME=%~dp0..
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
+:checkClasspath
+set _USE_CLASSPATH=yes
+rem CLASSPATH must not be used if it is equal to ""
+if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no
+if "%CLASSPATH%"=="" set _USE_CLASSPATH=no
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
@@ -20,31 +64,48 @@
shift
:setupArgs
if ""%1""=="""" goto doneStart
+if ""%1""==""-noclasspath"" goto clearclasspath
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
-rem This label provides a place for the argument list loop to break out
+
+rem here is there is a -noclasspath in the options
+:clearclasspath
+set _USE_CLASSPATH=no
+shift
+goto setupArgs
+
+rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
+
:doneStart
+if _USE_CLASSPATH==no goto findAntHome
+
+:stripClasspath
+if not _%CLASSPATH:~-1%==_\ goto findAntHome
+set CLASSPATH=%CLASSPATH:~0,-1%
+goto stripClasspath
+
+:findAntHome
rem find ANT_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%" goto checkJava
+if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
-rem check for ant in Program Files on system drive
-if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
-set ANT_HOME=%SystemDrive%\Program Files\ant
+rem check for ant in Program Files
+if not exist "%ProgramFiles%\ant" goto checkSystemDrive
+set ANT_HOME=%ProgramFiles%\ant
goto checkJava
:checkSystemDrive
rem check for ant in root directory of system drive
-if not exist %SystemDrive%\ant\nul goto checkCDrive
+if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
set ANT_HOME=%SystemDrive%\ant
goto checkJava
:checkCDrive
rem check for ant in C:\ant for Win9X users
-if not exist C:\ant\nul goto noAntHome
+if not exist C:\ant\lib\ant.jar goto noAntHome
set ANT_HOME=C:\ant
goto checkJava
@@ -53,43 +114,113 @@
goto end
:checkJava
-set LOCALCLASSPATH=%CLASSPATH%
-for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat"
%%i
+set _JAVACMD=%JAVACMD%
if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-set _JAVACMD=%JAVA_HOME%\bin\java.exe
-if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\tools.jar"
-if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\classes.zip"
+if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto checkJikes
:noJavaHome
-set _JAVACMD=java.exe
-echo.
-echo Warning: JAVA_HOME environment variable is not set.
-echo If build fails because sun.* classes could not be found
-echo you will need to set the JAVA_HOME environment variable
-echo to the installation directory of java.
-echo.
+if "%_JAVACMD%" == "" set _JAVACMD=java.exe
:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes
:runAnt
-"%_JAVACMD%" -classpath "%LOCALCLASSPATH%"
"-Dant.home=%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main
%ANT_CMD_LINE_ARGS%
+if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
+:runAntWithClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp
"%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
goto end
+:runAntNoClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%
%ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
+goto end
+
:runAntWithJikes
-"%_JAVACMD%" -classpath "%LOCALCLASSPATH%"
"-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" %ANT_OPTS%
org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
+
+if not _%JIKESPATH:~-1%==_\ goto checkJikesAndClasspath
+set JIKESPATH=%JIKESPATH:~0,-1%
+goto runAntWithJikes
+
+:checkJikesAndClasspath
+
+if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
+
+:runAntWithJikesAndClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%"
%ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
goto end
+:runAntWithJikesNoClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
+goto end
+
+:onError
+rem Windows 9x way of checking the error code. It matches via brute force.
+for %%i in (1 10 100) do set err%%i=
+for %%i in (0 1 2) do if errorlevel %%i00 set err100=%%i
+if %err100%==2 goto onError200
+if %err100%==0 set err100=
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%%i0 set err10=%%i
+if "%err100%"=="" if %err10%==0 set err10=
+:onError1
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%err10%%%i set err1=%%i
+goto onErrorEnd
+:onError200
+for %%i in (0 1 2 3 4 5) do if errorlevel 2%%i0 set err10=%%i
+if err10==5 for %%i in (0 1 2 3 4 5) do if errorlevel 25%%i set err1=%%i
+if not err10==5 goto onError1
+:onErrorEnd
+set ANT_ERROR=%err100%%err10%%err1%
+for %%i in (1 10 100) do set err%%i=
+
:end
-set LOCALCLASSPATH=
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
+rem bug ID 32069: resetting an undefined env variable changes the errorlevel.
+if not "%_JAVACMD%"=="" set _JAVACMD=
+if not "%_ANT_CMD_LINE_ARGS%"=="" set ANT_CMD_LINE_ARGS=
+if "%ANT_ERROR%"=="0" goto mainEnd
+
+rem Set the return code if we are not in NT. We can only set
+rem a value of 1, but it's better than nothing.
+if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
+
+rem Set the ERRORLEVEL if we are running NT.
+if "%OS%"=="Windows_NT" color 00
+
+goto omega
+
+:mainEnd
+
+rem If there were no errors, we run the post script.
if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
-:mainEnd
+if "%HOME%"=="" goto homeDrivePathPost
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
+:homeDrivePathPost
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call
"%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"
+
+:userProfilePost
+if "%USERPROFILE%"=="" goto omega
+if "%USERPROFILE%"=="%HOME%" goto omega
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega
+if exist "%USERPROFILE%\antrc_post.bat" call
"%USERPROFILE%\antrc_post.bat"
+
+:omega
+
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/antRun
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/antRun 2007-07-17 19:26:55 UTC (rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/antRun 2007-07-17 22:53:37 UTC (rev 7810)
@@ -1,7 +1,19 @@
#! /bin/sh
-# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-# reserved.
+# 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.
# Args: DIR command
cd "$1"
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.bat
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.bat 2007-07-17 19:26:55 UTC (rev
7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.bat 2007-07-17 22:53:37 UTC (rev
7810)
@@ -1,19 +1,37 @@
@echo off
-REM Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-REM reserved.
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. 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.
if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
if ""%1""=="""" goto runCommand
rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
+if "%OS%"=="Windows_NT" goto nt_cd
+if "%OS%"=="WINNT" goto nt_cd
+cd ""%1""
+goto end_cd
+:nt_cd
+cd /d ""%1""
+:end_cd
shift
rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
+rem of arguments (up to the command line limit, anyway).
set ANT_RUN_CMD=%1
if ""%1""=="""" goto runCommand
shift
@@ -28,4 +46,5 @@
%ANT_RUN_CMD%
if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.pl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.pl 2007-07-17 19:26:55 UTC (rev
7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/antRun.pl 2007-07-17 22:53:37 UTC (rev
7810)
@@ -1,4 +1,20 @@
#!/usr/bin/perl
+#
+# 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.
+#
#######################################################################
#
# antRun.pl
@@ -7,7 +23,6 @@
# this is akin to antRun.bat, and antRun the SH script
#
# created: 2001-10-18
-# last modified: 2001-11-13
# author: Jeff Tulley jtulley(a)novell.com
#######################################################################
#be fussy about variables
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/complete-ant-cmd.pl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/complete-ant-cmd.pl 2007-07-17 19:26:55 UTC
(rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/complete-ant-cmd.pl 2007-07-17 22:53:37 UTC
(rev 7810)
@@ -1,8 +1,20 @@
#!/usr/bin/perl
#
-# Copyright (c) 2001 The Apache Software Foundation. All rights
-# reserved.
+# 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.
+#
# A script to allow Bash or Z-Shell to complete an Ant command-line.
#
# To install for Bash 2.0 or better, add the following to ~/.bashrc:
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/lcp.bat
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/lcp.bat 2007-07-17 19:26:55 UTC (rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/lcp.bat 2007-07-17 22:53:37 UTC (rev 7810)
@@ -1,5 +1,20 @@
-REM Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-REM reserved.
+REM
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. 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.
+REM
+REM
set _CLASSPATHCOMPONENT=%1
if ""%1""=="""" goto gotAllArgs
@@ -12,5 +27,5 @@
goto argCheck
:gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT%
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/runant.pl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/runant.pl 2007-07-17 19:26:55 UTC (rev
7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/runant.pl 2007-07-17 22:53:37 UTC (rev
7810)
@@ -1,8 +1,20 @@
#!/usr/bin/perl
#
-# Copyright (c) 2001-2002 The Apache Software Foundation. All rights
-# reserved.
+# 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.
+#
#######################################################################
#
# runant.pl
@@ -18,7 +30,6 @@
# the code is not included.
#
# created: 2000-8-24
-# last modified: 2000-8-24
# author: Steve Loughran steve_l(a)sourceforge.net
#######################################################################
#
@@ -39,7 +50,7 @@
#use warnings;
#and set $debug to 1 to turn on trace info
-my $debug=0;
+my $debug=1;
#######################################################################
#
@@ -61,6 +72,8 @@
$onnetware = 1;
}
+my $oncygwin = ($^O eq "cygwin");
+
#ISSUE: what java wants to split up classpath varies from platform to platform
#and perl is not too hot at hinting which box it is on.
#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here
as needed.
@@ -72,53 +85,7 @@
}
#build up standard classpath
-my $localpath=$ENV{CLASSPATH};
-if ($localpath eq "")
- {
- print "warning: no initial classpath\n" if ($debug);
- $localpath="";
- }
-if ($onnetware == 1)
-{
-# avoid building a command line bigger than 512 characters - make localpath
-# only include the "extra" stuff, and add in the system classpath as an
expanded
-# variable.
- $localpath="";
-}
-
-#add jar files. I am sure there is a perl one liner to do this.
-my $jarpattern="$HOME/lib/*.jar";
-my @jarfiles =glob($jarpattern);
-print "jarfiles=@jarfiles\n" if ($debug);
-my $jar;
-foreach $jar (@jarfiles )
- {
- $localpath.="$s$jar";
- }
-
-#if Java home is defined, look for tools.jar & classes.zip and add to classpath
-my $JAVA_HOME = $ENV{JAVA_HOME};
-if ($JAVA_HOME ne "")
- {
- my $tools="$JAVA_HOME/lib/tools.jar";
- if (-e "$tools")
- {
- $localpath .= "$s$tools";
- }
- my $classes="$JAVA_HOME/lib/classes.zip";
- if (-e $classes)
- {
- $localpath .= "$s$classes";
- }
- }
-else
- {
- print "\n\nWarning: JAVA_HOME environment variable is not set.\n".
- "If the build fails because sun.* classes could not be
found\n".
- "you will need to set the JAVA_HOME environment variable\n".
- "to the installation directory of java\n";
- }
-
+my $localpath = "$HOME/lib/ant-launcher.jar";
#set JVM options and Ant arguments, if any
my @ANT_OPTS=split(" ", $ENV{ANT_OPTS});
my @ANT_ARGS=split(" ", $ENV{ANT_ARGS});
@@ -131,22 +98,46 @@
#construct arguments to java
my @ARGS;
-if ($onnetware == 1)
-{
-# make classpath literally $CLASSPATH; and then the contents of $localpath
-# this is to avoid pushing us over the 512 character limit
-# even skip the ; - that is already in $localpath
- push @ARGS, "-classpath", "\$CLASSPATH$localpath";
+push @ARGS, @ANT_OPTS;
+
+my $CYGHOME = "";
+
+my $classpath=$ENV{CLASSPATH};
+if ($oncygwin == 1) {
+ $localpath = `cygpath --path --windows $localpath`;
+ chomp ($localpath);
+ if (! $classpath eq "")
+ {
+ $classpath = `cygpath --path --windows "$classpath"`;
+ chomp ($classpath);
+ }
+ $HOME = `cygpath --path --windows $HOME`;
+ chomp ($HOME);
+ $CYGHOME = `cygpath --path --windows $ENV{HOME}`;
+ chomp ($CYGHOME);
}
-else
+push @ARGS, "-classpath", "$localpath";
+push @ARGS, "-Dant.home=$HOME";
+if ( ! $CYGHOME eq "" )
{
- push @ARGS, "-classpath", "$localpath";
+ push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\""
}
-push @ARGS, "-Dant.home=$HOME";
-push @ARGS, @ANT_OPTS;
-push @ARGS, "org.apache.tools.ant.Main", @ANT_ARGS;
+push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS;
push @ARGS, @ARGV;
-
+if (! $classpath eq "")
+{
+ if ($onnetware == 1)
+ {
+ # make classpath literally $CLASSPATH
+ # this is to avoid pushing us over the 512 character limit
+ # even skip the ; - that is already in $localpath
+ push @ARGS, "-lib", "\$CLASSPATH";
+ }
+ else
+ {
+ push @ARGS, "-lib", "$classpath";
+ }
+}
print "\n $JAVACMD @ARGS\n\n" if ($debug);
my $returnValue = system $JAVACMD, @ARGS;
Modified: branches/JBoss_Portal_Branch_2_6/tools/bin/runant.py
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/bin/runant.py 2007-07-17 19:26:55 UTC (rev
7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/bin/runant.py 2007-07-17 22:53:37 UTC (rev
7810)
@@ -1,23 +1,35 @@
#!/usr/bin/python
+# 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.
+#
+
"""
runant.py
- This script is a translation of the runant.pl written by Steve Loughran.
- It runs ant with/out arguments, it should be quite portable (thanks to
- the python os library)
- This script has been tested with Python2.0/Win2K
+ This script is a translation of the runant.pl written by Steve Loughran.
+ It runs ant with/out arguments, it should be quite portable (thanks to
+ the python os library)
+ This script has been tested with Python2.0/Win2K
- Copyright (c) 2001 The Apache Software Foundation. All rights
- reserved.
-
created: 2001-04-11
author: Pierre Dittgen pierre.dittgen(a)criltelecom.com
Assumptions:
- the "java" executable/script is on the command path
- - ANT_HOME has been set
"""
import os, os.path, string, sys
@@ -25,75 +37,66 @@
debug = 0
#######################################################################
-#
-# check to make sure environment is setup
-#
-if not os.environ.has_key('ANT_HOME'):
- print '\n\nANT_HOME *MUST* be set!\n\n'
- sys.exit(1)
-else:
- ANT_HOME = os.environ['ANT_HOME']
-if not os.environ.has_key('JAVACMD'):
- JAVACMD = 'java'
+# If ANT_HOME is not set default to script's parent directory
+if os.environ.has_key('ANT_HOME'):
+ ANT_HOME = os.environ['ANT_HOME']
else:
- JAVACMD = os.environ['JAVACMD']
+ ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
-# Sets the separator char for CLASSPATH
-SEPARATOR = ':'
-if os.name == 'dos' or os.name == 'nt':
- SEPARATOR = ';'
+# set ANT_LIB location
+ANT_LIB = os.path.join(ANT_HOME, 'lib')
-# Build up standard classpath
-localpath = ''
-if os.environ.has_key('CLASSPATH'):
- localpath = os.environ['CLASSPATH']
+# set JAVACMD (check variables JAVACMD and JAVA_HOME)
+JAVACMD = None
+if not os.environ.has_key('JAVACMD'):
+ if os.environ.has_key('JAVA_HOME'):
+ if not os.path.exists(os.environ['JAVA_HOME']):
+ print "Warning: JAVA_HOME is not defined correctly."
+ else:
+ JAVACMD = os.path.join(os.environ['JAVA_HOME'], 'bin',
'java')
+ else:
+ print "Warning: JAVA_HOME not set."
else:
- if debug:
- print 'Warning: no initial classpath\n'
+ JAVACMD = os.environ['JAVACMD']
+if not JAVACMD:
+ JAVACMD = 'java'
-# Add jar files
-LIBDIR = os.path.join(ANT_HOME, 'lib')
-jarfiles = []
-for file in os.listdir(LIBDIR):
- if file[-4:] == '.jar':
- jarfiles.append(os.path.join(LIBDIR,file))
-if debug:
- print 'Jar files:'
- for jar in jarfiles:
- print jar
-localpath = localpath + SEPARATOR + string.join(jarfiles, SEPARATOR)
+launcher_jar = os.path.join(ANT_LIB, 'ant-launcher.jar')
+if not os.path.exists(launcher_jar):
+ print 'Unable to locate ant-launcher.jar. Expected to find it in %s' % \
+ ANT_LIB
-# If JAVA_HOME is defined, look for tools.jar & classes.zip
-# and add to classpath
-if os.environ.has_key('JAVA_HOME') and os.environ['JAVA_HOME'] !=
'':
- JAVA_HOME = os.environ['JAVA_HOME']
- TOOLS = os.path.join(JAVA_HOME, os.path.join('lib', 'tools.jar'))
- if os.path.exists(TOOLS):
- localpath = localpath + SEPARATOR + TOOLS
- CLASSES = os.path.join(JAVA_HOME, os.path.join('lib', 'classes.zip'))
- if os.path.exists(CLASSES):
- localpath = localpath + SEPARATOR + CLASSES
-else:
- print '\n\nWarning: JAVA_HOME environment variable is not set.\n', \
- 'If the build fails because sun.* classes could not be found\n', \
- 'you will need to set the JAVA_HOME environment variable\n', \
- 'to the installation directory of java\n'
+# Build up standard classpath (LOCALCLASSPATH)
+LOCALCLASSPATH = launcher_jar
+if os.environ.has_key('LOCALCLASSPATH'):
+ LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH']
-# Jikes
-ANT_OPTS = []
+ANT_OPTS = ""
if os.environ.has_key('ANT_OPTS'):
- ANT_OPTS = string.split(os.environ['ANT_OPTS'])
+ ANT_OPTS = os.environ['ANT_OPTS']
+
+OPTS = ""
if os.environ.has_key('JIKESPATH'):
- ANT_OPTS.append('-Djikes.class.path=' + os.environ['JIKESPATH'])
+ OPTS = '-Djikes.class.path=\"%s\"' %
os.environ['JIKESPATH']
+ANT_ARGS = ""
+if os.environ.has_key('ANT_ARGS'):
+ ANT_ARGS = os.environ['ANT_ARGS']
+
+CLASSPATH = ""
+if os.environ.has_key('CLASSPATH'):
+ CLASSPATH = os.environ['CLASSPATH']
+
# Builds the commandline
-cmdline = '%s -classpath %s -Dant.home=%s %s org.apache.tools.ant.Main %s' \
- % (JAVACMD, localpath, ANT_HOME, string.join(ANT_OPTS,' '), \
- string.join(sys.argv[1:], ' '))
+cmdline = ('%s %s -classpath %s -Dant.home=%s %s ' + \
+ 'org.apache.tools.ant.launch.Launcher %s -lib %s %s') \
+ % (JAVACMD, ANT_OPTS, LOCALCLASSPATH, ANT_HOME, OPTS, ANT_ARGS, \
+ CLASSPATH, string.join(sys.argv[1:], ' '))
if debug:
- print '\n%s\n\n' % (cmdline)
+ print '\n%s\n\n' % (cmdline)
+sys.stdout.flush()
# Run the biniou!
os.system(cmdline)
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/changelog.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/changelog.xsl 2007-07-17 19:26:55 UTC (rev
7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/changelog.xsl 2007-07-17 22:53:37 UTC (rev
7810)
@@ -5,58 +5,22 @@
version='1.0'>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
+ 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.
+
+-->
<xsl:param name="title"/>
<xsl:param name="module"/>
<xsl:param name="cvsweb"/>
@@ -93,13 +57,13 @@
td {
padding-left: 20px;
}
- .dateAndAuthor {
+ .dateAndAuthor {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
text-align: left;
background: #a6caf0;
padding-left: 3px;
- }
+ }
a {
color: #000000;
}
@@ -112,7 +76,7 @@
<h1>
<a name="top"><xsl:value-of
select="$title"/></a>
</h1>
- <p style="text-align: right">Designed for use with <a
href="http://jakarta.apache.org/ant/">Ant</a>.</p>
+ <p style="text-align: right">Designed for use with <a
href="http://ant.apache.org/">Apache Ant</a>.</p>
<hr/>
<table border="0" width="100%"
cellspacing="1">
Added: branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-frames.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-frames.xsl
(rev 0)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-frames.xsl 2007-07-17
22:53:37 UTC (rev 7810)
@@ -0,0 +1,293 @@
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
+
xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+
+<!--
+ 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.
+-->
+
+ <xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
+ <xsl:decimal-format decimal-separator="."
grouping-separator="," />
+
+ <xsl:param name="output.dir" select="'.'"/>
+ <xsl:param name="basedir" select="'.'"/>
+
+ <xsl:template match="checkstyle">
+ <!-- create the index.html -->
+ <redirect:write file="{$output.dir}/index.html">
+ <xsl:call-template name="index.html"/>
+ </redirect:write>
+
+ <!-- create the stylesheet.css -->
+ <redirect:write file="{$output.dir}/stylesheet.css">
+ <xsl:call-template name="stylesheet.css"/>
+ </redirect:write>
+
+ <!-- create the overview-summary.html at the root -->
+ <redirect:write file="{$output.dir}/overview-frame.html">
+ <xsl:apply-templates select="." mode="overview"/>
+ </redirect:write>
+
+ <!-- create the all-classes.html at the root -->
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
+ <xsl:apply-templates select="."
mode="all.classes"/>
+ </redirect:write>
+
+ <!-- process all files -->
+ <xsl:apply-templates select="file[count(error) != 0]"/>
+ </xsl:template>
+
+ <xsl:template name="index.html">
+ <html>
+ <head>
+ <title>CheckStyle Audit</title>
+ </head>
+ <frameset cols="20%,80%">
+ <frame src="allclasses-frame.html"
name="fileListFrame"/>
+ <frame src="overview-frame.html"
name="fileFrame"/>
+ </frameset>
+ <noframes>
+ <h2>Frame Alert</h2>
+ <p>
+ This document is designed to be viewed using the frames feature.
+ If you see this message, you are using a non-frame-capable web
client.
+ </p>
+ </noframes>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="pageHeader">
+ <table border="0" cellpadding="0"
cellspacing="0" width="100%">
+ <tr>
+ <td class="text-align:right"><h2>CheckStyle
Audit</h2></td>
+ </tr>
+ <tr>
+ <td class="text-align:right">Designed for use with
+ <a
href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and
+ <a
href='http://ant.apache.org/'>Ant</a>.</td>
+ </tr>
+ </table>
+ <hr size="1"/>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="overview">
+ <html>
+ <head>
+ <link rel="stylesheet" type="text/css"
href="stylesheet.css"/>
+ </head>
+ <body>
+ <!-- page header -->
+ <xsl:call-template name="pageHeader"/>
+
+ <!-- Summary part -->
+ <xsl:apply-templates select="."
mode="summary"/>
+ <hr size="1" width="100%"
align="left"/>
+
+ <!-- File list part -->
+ <xsl:apply-templates select="."
mode="filelist"/>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="stylesheet.css">
+ .bannercell {
+ border: 0px;
+ padding: 0px;
+ }
+ body {
+ margin-left: 10;
+ margin-right: 10;
+ font:normal 80% arial,helvetica,sanserif;
+ background-color:#FFFFFF;
+ color:#000000;
+ }
+ .oddrow td {
+ background: #efefef;
+ }
+ .evenrow td {
+ background: #fff;
+ }
+ th, td {
+ text-align: left;
+ vertical-align: top;
+ }
+ th {
+ font-weight:bold;
+ background: #ccc;
+ color: black;
+ }
+ table, th, td {
+ font-size:100%;
+ border: none
+ }
+ table.log tr td, tr th {
+
+ }
+ h2 {
+ font-weight:bold;
+ font-size:140%;
+ margin-bottom: 5;
+ }
+ h3 {
+ font-size:100%;
+ font-weight:bold;
+ background: #525D76;
+ color: white;
+ text-decoration: none;
+ padding: 5px;
+ margin-right: 2px;
+ margin-left: 2px;
+ margin-bottom: 0;
+ }
+ </xsl:template>
+
+ <!--
+ Creates an all-classes.html file that contains a link to all files.
+ -->
+ <xsl:template match="checkstyle" mode="all.classes">
+ <html>
+ <head>
+ <link rel="stylesheet" type="text/css"
href="stylesheet.css"/>
+ </head>
+ <body>
+ <h2>Files</h2>
+ <p>
+ <table width="100%">
+ <!-- For each file create its part -->
+ <xsl:apply-templates select="file[count(error) !=
0]" mode="all.classes">
+ <xsl:sort select="substring-after(@name,
$basedir)"/>
+ </xsl:apply-templates>
+ </table>
+ </p>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="filelist">
+ <h3>Files</h3>
+ <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
+ <tr>
+ <th>Name</th>
+ <th>Errors</th>
+ </tr>
+ <xsl:apply-templates select="file[count(error) != 0]"
mode="filelist">
+ <xsl:sort select="count(error)" order="descending"
data-type="number"/>
+ </xsl:apply-templates>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="file" mode="filelist">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td nowrap="nowrap">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>files/</xsl:text><xsl:value-of
select="substring-after(@name,
$basedir)"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="substring-after(@name,
$basedir)"/>
+ </a>
+ </td>
+ <td><xsl:value-of select="count(error)"/></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="file" mode="all.classes">
+ <tr>
+ <td nowrap="nowrap">
+ <a target="fileFrame">
+ <xsl:attribute name="href">
+ <xsl:text>files/</xsl:text><xsl:value-of
select="substring-after(@name,
$basedir)"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="substring-after(@name,
$basedir)"/>
+ </a>
+ </td>
+ </tr>
+ </xsl:template>
+
+ <!--
+ transform string like a/b/c to ../../../
+ @param path the path to transform into a descending directory path
+ -->
+ <xsl:template name="path">
+ <xsl:param name="path"/>
+ <xsl:if test="contains($path,'/')">
+ <xsl:text>../</xsl:text>
+ <xsl:call-template name="path">
+ <xsl:with-param name="path"><xsl:value-of
select="substring-after($path,'/')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not(contains($path,'/')) and not($path =
'')">
+ <xsl:text>../</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="file">
+ <redirect:write file="{$output.dir}/files/{substring-after(@name,
$basedir)}.html">
+ <html>
+ <head>
+ <link rel="stylesheet" type="text/css">
+ <xsl:attribute name="href"><xsl:call-template
name="path"><xsl:with-param name="path"
select="substring-after(@name,
$basedir)"/></xsl:call-template><xsl:text>stylesheet.css</xsl:text></xsl:attribute>
+ </link>
+ </head>
+ <body>
+ <xsl:call-template name="pageHeader"/>
+ <h3>File <xsl:value-of select="substring-after(@name,
$basedir)"/></h3>
+ <table class="log" border="0"
cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Error Description</th>
+ <th>Line:Column</th>
+ </tr>
+ <xsl:for-each select="error">
+ <tr>
+ <xsl:call-template
name="alternated-row"/>
+ <td><a
title="{@source}"><xsl:value-of
select="@message"/></a></td>
+ <td align="center"><xsl:value-of
select="@line"/><xsl:if test="@column">:<xsl:value-of
select="@column"/></xsl:if></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+ </redirect:write>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="summary">
+ <h3>Summary</h3>
+ <xsl:variable name="fileCount" select="count(file)"/>
+ <xsl:variable name="errorCount"
select="count(file/error)"/>
+ <xsl:variable name="fileErrorCount"
select="count(file[count(error) != 0])"/>
+ <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
+ <tr>
+ <th>Total Files</th>
+ <th>Files With Errors</th>
+ <th>Errors</th>
+ </tr>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="$fileCount"/></td>
+ <td><xsl:value-of
select="$fileErrorCount"/></td>
+ <td><xsl:value-of
select="$errorCount"/></td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template name="alternated-row">
+ <xsl:attribute name="class">
+ <xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
+ <xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-text.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-text.xsl
(rev 0)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-text.xsl 2007-07-17
22:53:37 UTC (rev 7810)
@@ -0,0 +1,33 @@
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+
+<!--
+ 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.
+-->
+
+ <xsl:strip-space elements="checkstyle"/>
+ <xsl:preserve-space elements="file"/>
+ <xsl:output method="text"/>
+ <xsl:template match="checkstyle/file/error">
+ <xsl:value-of select="../@name"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="@line"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="@column"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@message"/>
+ </xsl:template>
+</xsl:stylesheet>
+
Added: branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-xdoc.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-xdoc.xsl
(rev 0)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/checkstyle/checkstyle-xdoc.xsl 2007-07-17
22:53:37 UTC (rev 7810)
@@ -0,0 +1,129 @@
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
+
xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+
+<!--
+ 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.
+-->
+
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:decimal-format decimal-separator="."
grouping-separator="," />
+
+ <xsl:param name="output.dir" select="'.'"/>
+ <xsl:param name="basedir" select="'.'"/>
+
+ <xsl:template match="checkstyle">
+ <document>
+ <properties>
+ <title>Checkstyle Audit</title>
+ </properties>
+
+ <body>
+ <xsl:apply-templates select="." mode="summary"/>
+ <!-- File list part -->
+ <xsl:apply-templates select="." mode="filelist"/>
+ <xsl:apply-templates select="file[count(error) != 0]"/>
+ </body>
+ </document>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="filelist">
+ <section name="Files">
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Errors</th>
+ </tr>
+ <xsl:apply-templates select="file[count(error) != 0]"
mode="filelist">
+ <xsl:sort select="count(error)" order="descending"
data-type="number"/>
+ </xsl:apply-templates>
+ </table>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="file" mode="filelist">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td nowrap="nowrap">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>files</xsl:text><xsl:value-of
select="substring-after(@name,
$basedir)"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="substring-after(@name,
$basedir)"/>
+ </a>
+ </td>
+ <td><xsl:value-of select="count(error)"/></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="file">
+ <redirect:write file="{$output.dir}/files{substring-after(@name,
$basedir)}.xml">
+ <document>
+ <properties>
+ <title>Checkstyle Audit</title>
+ </properties>
+
+ <body>
+ <section name="Details for {substring-after(@name,
$basedir)}">
+ <table>
+ <tr>
+ <th>Error Description</th>
+ <th>Line</th>
+ </tr>
+ <xsl:for-each select="error">
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><a title="{@source}"><xsl:value-of
select="@message"/></a></td>
+ <td><xsl:value-of
select="@line"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </section>
+ </body>
+ </document>
+ </redirect:write>
+ </xsl:template>
+
+ <xsl:template match="checkstyle" mode="summary">
+ <section name="Summary">
+ <xsl:variable name="fileCount" select="count(file)"/>
+ <xsl:variable name="errorCount"
select="count(file/error)"/>
+ <xsl:variable name="fileErrorCount"
select="count(file[count(error) != 0])"/>
+ <table>
+ <tr>
+ <th>Files</th>
+ <th>Files With Errors</th>
+ <th>Errors</th>
+ </tr>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="$fileCount"/></td>
+ <td><xsl:value-of
select="$fileErrorCount"/></td>
+ <td><xsl:value-of
select="$errorCount"/></td>
+ </tr>
+ </table>
+ </section>
+ </xsl:template>
+
+ <xsl:template name="alternated-row">
+ <xsl:attribute name="class">
+ <xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
+ <xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+</xsl:stylesheet>
+
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/coverage-frames.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/coverage-frames.xsl 2007-07-17 19:26:55 UTC
(rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/coverage-frames.xsl 2007-07-17 22:53:37 UTC
(rev 7810)
@@ -1,139 +1,102 @@
-<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
-
xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
- extension-element-prefixes="redirect">
-<xsl:output method="html" indent="yes"/>
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
+
xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+<xsl:output method="html" indent="yes"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","
/>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ 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.
+-->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
-
<!--
-
+
Sample stylesheet to be used with JProbe 3.0 XML output.
-
+
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-
+
It is best used with JProbe Coverage Ant task that gives you the benefit
of a reference classpath so that you have the list of classes/methods
that are not used at all in a given classpath.
-
+
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
-
+
-->
<!-- default output directory is current directory -->
<xsl:param name="output.dir" select="'.'"/>
<!-- ======================================================================
- Root element
+ Root element
======================================================================= -->
<xsl:template match="/snapshot">
- <!-- create the index.html -->
- <redirect:write file="{$output.dir}/index.html">
- <xsl:call-template name="index.html"/>
- </redirect:write>
+ <!-- create the index.html -->
+ <redirect:write file="{$output.dir}/index.html">
+ <xsl:call-template name="index.html"/>
+ </redirect:write>
- <!-- create the stylesheet.css -->
- <redirect:write file="{$output.dir}/stylesheet.css">
- <xsl:call-template name="stylesheet.css"/>
- </redirect:write>
+ <!-- create the stylesheet.css -->
+ <redirect:write file="{$output.dir}/stylesheet.css">
+ <xsl:call-template name="stylesheet.css"/>
+ </redirect:write>
- <!-- create the overview-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-summary.html">
- <xsl:apply-templates select="." mode="overview.packages"/>
- </redirect:write>
+ <!-- create the overview-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-summary.html">
+ <xsl:apply-templates select="."
mode="overview.packages"/>
+ </redirect:write>
- <!-- create the all-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-frame.html">
- <xsl:apply-templates select="." mode="all.packages"/>
- </redirect:write>
-
- <!-- create the all-classes.html at the root -->
- <redirect:write file="{$output.dir}/allclasses-frame.html">
- <xsl:apply-templates select="." mode="all.classes"/>
- </redirect:write>
-
- <!-- process all packages -->
- <xsl:apply-templates select="./package" mode="write"/>
+ <!-- create the all-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-frame.html">
+ <xsl:apply-templates select="." mode="all.packages"/>
+ </redirect:write>
+
+ <!-- create the all-classes.html at the root -->
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
+ <xsl:apply-templates select="." mode="all.classes"/>
+ </redirect:write>
+
+ <!-- process all packages -->
+ <xsl:apply-templates select="./package" mode="write"/>
</xsl:template>
<!-- =======================================================================
- Frameset definition. Entry point for the report.
- 3 frames: packageListFrame, classListFrame, classFrame
+ Frameset definition. Entry point for the report.
+ 3 frames: packageListFrame, classListFrame, classFrame
======================================================================= -->
<xsl:template name="index.html">
<html>
- <head><title>Coverage Results.</title></head>
- <frameset cols="20%,80%">
- <frameset rows="30%,70%">
- <frame src="overview-frame.html" name="packageListFrame"/>
- <frame src="allclasses-frame.html" name="classListFrame"/>
- </frameset>
- <frame src="overview-summary.html" name="classFrame"/>
- </frameset>
- <noframes>
- <h2>Frame Alert</h2>
- <p>
- This document is designed to be viewed using the frames feature. If you see this
message, you are using a non-frame-capable web client.
- </p>
- </noframes>
+ <head><title>Coverage Results.</title></head>
+ <frameset cols="20%,80%">
+ <frameset rows="30%,70%">
+ <frame src="overview-frame.html"
name="packageListFrame"/>
+ <frame src="allclasses-frame.html"
name="classListFrame"/>
+ </frameset>
+ <frame src="overview-summary.html" name="classFrame"/>
+ </frameset>
+ <noframes>
+ <h2>Frame Alert</h2>
+ <p>
+ This document is designed to be viewed using the frames feature. If you see this
message, you are using a non-frame-capable web client.
+ </p>
+ </noframes>
</html>
</xsl:template>
<!-- =======================================================================
- Stylesheet CSS used
+ Stylesheet CSS used
======================================================================= -->
<!-- this is the stylesheet css to use for nearly everything -->
<xsl:template name="stylesheet.css">
@@ -148,10 +111,10 @@
background-color:#FFFFFF;
color:#000000;
}
- .a td {
+ .a td {
background: #efefef;
}
- .b td {
+ .b td {
background: #fff;
}
th, td {
@@ -168,7 +131,7 @@
border: none
}
table.log tr td, tr th {
-
+
}
h2 {
font-weight:bold;
@@ -189,115 +152,115 @@
</xsl:template>
<!-- =======================================================================
- List of all classes in all packages
- This will be the first page in the classListFrame
+ List of all classes in all packages
+ This will be the first page in the classListFrame
======================================================================= -->
<xsl:template match="snapshot" mode="all.classes">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link"/>
- </head>
- <body>
- <h2>Classes</h2>
- <table width="100%">
- <xsl:for-each select="package/class">
- <xsl:sort select="@name"/>
- <xsl:variable name="package.name"
select="(ancestor::package)[last()]/@name"/>
- <xsl:variable name="link">
- <xsl:if test="not($package.name='')">
- <xsl:value-of
select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
- </xsl:if><xsl:value-of
select="@name"/><xsl:text>.html</xsl:text>
- </xsl:variable>
- <tr>
- <td nowrap="nowrap">
- <a target="classFrame" href="{$link}"><xsl:value-of
select="@name"/></a>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link"/>
+ </head>
+ <body>
+ <h2>Classes</h2>
+ <table width="100%">
+ <xsl:for-each select="package/class">
+ <xsl:sort select="@name"/>
+ <xsl:variable name="package.name"
select="(ancestor::package)[last()]/@name"/>
+ <xsl:variable name="link">
+ <xsl:if test="not($package.name='')">
+ <xsl:value-of
select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
+ </xsl:if><xsl:value-of
select="@name"/><xsl:text>.html</xsl:text>
+ </xsl:variable>
+ <tr>
+ <td nowrap="nowrap">
+ <a target="classFrame"
href="{$link}"><xsl:value-of select="@name"/></a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
</xsl:template>
<!-- list of all packages -->
<xsl:template match="snapshot" mode="all.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link"/>
- </head>
- <body>
- <h2><a href="overview-summary.html"
target="classFrame">Home</a></h2>
- <h2>Packages</h2>
- <table width="100%">
- <xsl:for-each select="package">
- <xsl:sort select="@name" order="ascending"/>
- <tr>
- <td nowrap="nowrap">
- <a
href="{translate((a)name,'.','/')}/package-summary.html"
target="classFrame">
- <xsl:value-of select="@name"/>
- </a>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link"/>
+ </head>
+ <body>
+ <h2><a href="overview-summary.html"
target="classFrame">Home</a></h2>
+ <h2>Packages</h2>
+ <table width="100%">
+ <xsl:for-each select="package">
+ <xsl:sort select="@name"
order="ascending"/>
+ <tr>
+ <td nowrap="nowrap">
+ <a
href="{translate((a)name,'.','/')}/package-summary.html"
target="classFrame">
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
</xsl:template>
<!-- overview of statistics in packages -->
<xsl:template match="snapshot" mode="overview.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link"/>
- </head>
- <body
onload="open('allclasses-frame.html','classListFrame')">
- <xsl:call-template name="pageHeader"/>
- <h3>Summary</h3>
- <table class="log" cellpadding="5" cellspacing="2"
width="100%">
- <tr>
- <!--th width="10%" nowrap="nowrap">Date</th>
- <th width="10%" nowrap="nowrap">Elapsed time</th-->
- <th width="10%" nowrap="nowrap">Reported
Classes</th>
- <th width="10%" nowrap="nowrap">Methods Hit</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
- <tr class="a">
- <!--td nowrap="nowrap"><xsl:value-of
select="execution_log/@program_start"/></td>
- <td><xsl:value-of select="format-number(execution_log/@elapsed_time div
1000,'0.0')"/>secs</td-->
- <td><xsl:value-of select="count(package/class)"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_methods div
cov.data/(a)total_methods,'0.0%')"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_lines div
cov.data/(a)total_lines,'0.0%')"/></td>
- </tr>
- </table>
- <table border="0" width="100%">
- <tr>
- <td style="text-align: justify;">
- To ensure accurate test runs on Java applications, developers need to know how much of
- the code has been tested, and where to find any untested code. Coverage helps you
- locate untested code, and measure precisely how much code has been exercised.
- The result is a higher quality application in a shorter period of time.
- <p/>
- </td>
- </tr>
- </table>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link"/>
+ </head>
+ <body
onload="open('allclasses-frame.html','classListFrame')">
+ <xsl:call-template name="pageHeader"/>
+ <h3>Summary</h3>
+ <table class="log" cellpadding="5"
cellspacing="2" width="100%">
+ <tr>
+ <!--th width="10%"
nowrap="nowrap">Date</th>
+ <th width="10%" nowrap="nowrap">Elapsed
time</th-->
+ <th width="10%" nowrap="nowrap">Reported
Classes</th>
+ <th width="10%" nowrap="nowrap">Methods
Hit</th>
+ <th width="10%" nowrap="nowrap">Lines
Hit</th>
+ </tr>
+ <tr class="a">
+ <!--td nowrap="nowrap"><xsl:value-of
select="execution_log/@program_start"/></td>
+ <td><xsl:value-of
select="format-number(execution_log/@elapsed_time div
1000,'0.0')"/>secs</td-->
+ <td><xsl:value-of
select="count(package/class)"/></td>
+ <td><xsl:value-of
select="format-number(cov.data/@hit_methods div
cov.data/(a)total_methods,'0.0%')"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_lines
div cov.data/(a)total_lines,'0.0%')"/></td>
+ </tr>
+ </table>
+ <table border="0" width="100%">
+ <tr>
+ <td style="text-align: justify;">
+ To ensure accurate test runs on Java applications, developers need to know how
much of
+ the code has been tested, and where to find any untested code. Coverage helps
you
+ locate untested code, and measure precisely how much code has been exercised.
+ The result is a higher quality application in a shorter period of time.
+ <p/>
+ </td>
+ </tr>
+ </table>
- <h3>Packages</h3>
- <table class="log" cellpadding="5" cellspacing="2"
width="100%">
- <xsl:apply-templates select="package[1]"
mode="stats.header"/>
- <!-- display packages and sort them via their coverage rate -->
- <xsl:for-each select="package">
- <xsl:sort data-type="number" select="cov.data/@hit_lines div
cov.data/@total_lines"/>
- <tr>
- <xsl:call-template name="alternate-row"/>
- <td><a
href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of
select="@name"/></a></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_methods div
cov.data/(a)total_methods,'0.0%')"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_lines div
cov.data/(a)total_lines,'0.0%')"/></td>
- </tr>
- </xsl:for-each>
- </table>
- <xsl:call-template name="pageFooter"/>
- </body>
- </html>
+ <h3>Packages</h3>
+ <table class="log" cellpadding="5"
cellspacing="2" width="100%">
+ <xsl:apply-templates select="package[1]"
mode="stats.header"/>
+ <!-- display packages and sort them via their coverage rate -->
+ <xsl:for-each select="package">
+ <xsl:sort data-type="number"
select="cov.data/@hit_lines div cov.data/@total_lines"/>
+ <tr>
+ <xsl:call-template name="alternate-row"/>
+ <td><a
href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of
select="@name"/></a></td>
+ <td><xsl:value-of
select="format-number(cov.data/@hit_methods div
cov.data/(a)total_methods,'0.0%')"/></td>
+ <td><xsl:value-of
select="format-number(cov.data/@hit_lines div
cov.data/(a)total_lines,'0.0%')"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </body>
+ </html>
</xsl:template>
<!--
@@ -305,123 +268,123 @@
, the summary page, and the info for each class
-->
<xsl:template match="package" mode="write">
- <xsl:variable name="package.dir">
- <xsl:if test="not(@name = '')"><xsl:value-of
select="translate(@name,'.','/')"/></xsl:if>
- <xsl:if test="@name = ''">.</xsl:if>
- </xsl:variable>
+ <xsl:variable name="package.dir">
+ <xsl:if test="not(@name = '')"><xsl:value-of
select="translate(@name,'.','/')"/></xsl:if>
+ <xsl:if test="@name = ''">.</xsl:if>
+ </xsl:variable>
- <!-- create a classes-list.html in the package directory -->
- <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
- <xsl:apply-templates select="." mode="classes.list"/>
- </redirect:write>
-
- <!-- create a package-summary.html in the package directory -->
- <redirect:write
file="{$output.dir}/{$package.dir}/package-summary.html">
- <xsl:apply-templates select="." mode="package.summary"/>
- </redirect:write>
-
- <!-- for each class, creates a @name.html -->
- <xsl:for-each select="class">
- <redirect:write file="{$output.dir}/{$package.dir}/{(a)name}.html">
- <xsl:apply-templates select="." mode="class.details"/>
- </redirect:write>
- </xsl:for-each>
+ <!-- create a classes-list.html in the package directory -->
+ <redirect:write
file="{$output.dir}/{$package.dir}/package-frame.html">
+ <xsl:apply-templates select="." mode="classes.list"/>
+ </redirect:write>
+
+ <!-- create a package-summary.html in the package directory -->
+ <redirect:write
file="{$output.dir}/{$package.dir}/package-summary.html">
+ <xsl:apply-templates select="."
mode="package.summary"/>
+ </redirect:write>
+
+ <!-- for each class, creates a @name.html -->
+ <xsl:for-each select="class">
+ <redirect:write
file="{$output.dir}/{$package.dir}/{(a)name}.html">
+ <xsl:apply-templates select="."
mode="class.details"/>
+ </redirect:write>
+ </xsl:for-each>
</xsl:template>
<!-- list of classes in a package -->
<xsl:template match="package" mode="classes.list">
- <html>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="@name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <table width="100%">
- <tr>
- <td nowrap="nowrap">
- <H2><a href="package-summary.html"
target="classFrame"><xsl:value-of
select="@name"/></a></H2>
- </td>
- </tr>
- </table>
-
- <H2>Classes</H2>
- <TABLE WIDTH="100%">
- <xsl:for-each select="class">
- <xsl:sort select="@name"/>
- <tr>
- <td nowrap="nowrap">
- <a href="{(a)name}.html"
target="classFrame"><xsl:value-of select="@name"/></a>
- </td>
- </tr>
- </xsl:for-each>
- </TABLE>
- </BODY>
- </html>
+ <html>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"
select="@name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <table width="100%">
+ <tr>
+ <td nowrap="nowrap">
+ <H2><a href="package-summary.html"
target="classFrame"><xsl:value-of
select="@name"/></a></H2>
+ </td>
+ </tr>
+ </table>
+
+ <H2>Classes</H2>
+ <TABLE WIDTH="100%">
+ <xsl:for-each select="class">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td nowrap="nowrap">
+ <a href="{(a)name}.html"
target="classFrame"><xsl:value-of select="@name"/></a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </TABLE>
+ </BODY>
+ </html>
</xsl:template>
<!-- summary of a package -->
<xsl:template match="package" mode="package.summary">
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="@name"/>
- </xsl:call-template>
- </HEAD>
- <!-- when loading this package, it will open the classes into the frame -->
- <BODY
onload="open('package-frame.html','classListFrame')">
- <xsl:call-template name="pageHeader"/>
- <h3>Package <xsl:value-of select="@name"/></h3>
- <table class="log" cellpadding="5" cellspacing="2"
width="100%">
- <xsl:apply-templates select="." mode="stats.header"/>
- <xsl:apply-templates select="." mode="stats"/>
- </table>
-
- <xsl:if test="count(class) > 0">
- <H3>Classes</H3>
- <table class="log" cellpadding="5" cellspacing="2"
width="100%">
- <xsl:apply-templates select="." mode="stats.header"/>
- <xsl:apply-templates select="class" mode="stats">
- <xsl:sort data-type="number" select="cov.data/@hit_lines div
cov.data/@total_lines"/>
- </xsl:apply-templates>
- </table>
- </xsl:if>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"
select="@name"/>
+ </xsl:call-template>
+ </HEAD>
+ <!-- when loading this package, it will open the classes into the frame
-->
+ <BODY
onload="open('package-frame.html','classListFrame')">
+ <xsl:call-template name="pageHeader"/>
+ <h3>Package <xsl:value-of select="@name"/></h3>
+ <table class="log" cellpadding="5"
cellspacing="2" width="100%">
+ <xsl:apply-templates select="."
mode="stats.header"/>
+ <xsl:apply-templates select="." mode="stats"/>
+ </table>
+
+ <xsl:if test="count(class) > 0">
+ <H3>Classes</H3>
+ <table class="log" cellpadding="5"
cellspacing="2" width="100%">
+ <xsl:apply-templates select="."
mode="stats.header"/>
+ <xsl:apply-templates select="class"
mode="stats">
+ <xsl:sort data-type="number"
select="cov.data/@hit_lines div cov.data/@total_lines"/>
+ </xsl:apply-templates>
+ </table>
+ </xsl:if>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
</xsl:template>
<!-- details of a class -->
<xsl:template match="class" mode="class.details">
- <xsl:variable name="package.name"
select="(ancestor::package)[last()]/@name"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"
select="$package.name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <xsl:call-template name="pageHeader"/>
- <H3>Class <xsl:if test="not($package.name =
'')"><xsl:value-of
select="$package.name"/>.</xsl:if><xsl:value-of
select="@name"/></H3>
+ <xsl:variable name="package.name"
select="(ancestor::package)[last()]/@name"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"
select="$package.name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <xsl:call-template name="pageHeader"/>
+ <H3>Class <xsl:if test="not($package.name =
'')"><xsl:value-of
select="$package.name"/>.</xsl:if><xsl:value-of
select="@name"/></H3>
- <!-- class summary -->
- <table class="log" cellpadding="5" cellspacing="2"
width="100%">
- <xsl:apply-templates select="." mode="stats.header"/>
- <xsl:apply-templates select="." mode="stats"/>
- </table>
-
- <!-- details of methods -->
- <H3>Methods</H3>
- <table class="log" cellpadding="5" cellspacing="2"
width="100%">
- <xsl:apply-templates select="method[1]"
mode="stats.header"/>
- <xsl:apply-templates select="method" mode="stats">
- <xsl:sort data-type="number" select="cov.data/@hit_lines div
cov.data/@total_lines"/>
- </xsl:apply-templates>
- </table>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <!-- class summary -->
+ <table class="log" cellpadding="5"
cellspacing="2" width="100%">
+ <xsl:apply-templates select="."
mode="stats.header"/>
+ <xsl:apply-templates select="." mode="stats"/>
+ </table>
+ <!-- details of methods -->
+ <H3>Methods</H3>
+ <table class="log" cellpadding="5"
cellspacing="2" width="100%">
+ <xsl:apply-templates select="method[1]"
mode="stats.header"/>
+ <xsl:apply-templates select="method"
mode="stats">
+ <xsl:sort data-type="number"
select="cov.data/@hit_lines div cov.data/@total_lines"/>
+ </xsl:apply-templates>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
+
</xsl:template>
<!-- Page Header -->
@@ -434,66 +397,58 @@
<img
src="http://jakarta.apache.org/images/jakarta-logo.gif"
alt="http://jakarta.apache.org" align="left"
border="0"/>
</a>
</td>
- <td style="text-align:right"><h2>Source Code
Coverage</h2></td>
- </tr>
- <tr>
- <td style="text-align:right">Designed for use with <a
href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a
href='http://jakarta.apache.org'>Ant</a>.</td>
- </tr>
+ <td style="text-align:right"><h2>Source Code
Coverage</h2></td>
+ </tr>
+ <tr>
+ <td style="text-align:right">Designed for use with <a
href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a
href='http://jakarta.apache.org'>Ant</a>.</td>
+ </tr>
</table>
- <hr size="1"/>
+ <hr size="1"/>
</xsl:template>
<!-- Page Footer -->
<xsl:template name="pageFooter">
- <table width="100%">
- <tr><td><hr noshade="yes"
size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76"
size="-1"><em>
- Copyright © 1999-2001, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</xsl:template>
<xsl:template name="table.header">
- <tr>
- <th width="80%">Name</th>
- <th width="10%" nowrap="nowrap">Methods Hit</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
+ <tr>
+ <th width="80%">Name</th>
+ <th width="10%" nowrap="nowrap">Methods Hit</th>
+ <th width="10%" nowrap="nowrap">Lines Hit</th>
+ </tr>
</xsl:template>
<xsl:template match="method" mode="stats.header">
- <tr>
- <th width="90%">Name</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
+ <tr>
+ <th width="90%">Name</th>
+ <th width="10%" nowrap="nowrap">Lines Hit</th>
+ </tr>
</xsl:template>
<xsl:template match="method" mode="stats">
- <tr>
- <xsl:call-template name="alternate-row"/>
- <td><xsl:value-of select="@name"/></td>
- <td>
- <xsl:value-of select="format-number(cov.data/@hit_lines div
cov.data/(a)total_lines,'0.0%')"/>
- </td>
- </tr>
+ <tr>
+ <xsl:call-template name="alternate-row"/>
+ <td><xsl:value-of select="@name"/></td>
+ <td>
+ <xsl:value-of select="format-number(cov.data/@hit_lines div
cov.data/(a)total_lines,'0.0%')"/>
+ </td>
+ </tr>
</xsl:template>
<xsl:template match="package|class" mode="stats.header">
- <tr>
- <th width="80%">Name</th>
- <th width="10%" nowrap="nowrap">Methods Hit</th>
- <th width="10%" nowrap="nowrap">Lines Hit</th>
- </tr>
+ <tr>
+ <th width="80%">Name</th>
+ <th width="10%" nowrap="nowrap">Methods Hit</th>
+ <th width="10%" nowrap="nowrap">Lines Hit</th>
+ </tr>
</xsl:template>
<xsl:template match="package|class" mode="stats">
- <tr>
- <xsl:call-template name="alternate-row"/>
- <td><xsl:value-of select="@name"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_methods div
cov.data/(a)total_methods,'0.0%')"/></td>
- <td><xsl:value-of select="format-number(cov.data/@hit_lines div
cov.data/(a)total_lines,'0.0%')"/></td>
- </tr>
+ <tr>
+ <xsl:call-template name="alternate-row"/>
+ <td><xsl:value-of select="@name"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_methods div
cov.data/(a)total_methods,'0.0%')"/></td>
+ <td><xsl:value-of select="format-number(cov.data/@hit_lines div
cov.data/(a)total_lines,'0.0%')"/></td>
+ </tr>
</xsl:template>
<!--
@@ -501,23 +456,23 @@
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
- <xsl:param name="path"/>
- <xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
- <xsl:call-template name="path">
- <xsl:with-param name="path"><xsl:value-of
select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="not(contains($path,'.')) and not($path =
'')">
- <xsl:text>../</xsl:text>
- </xsl:if>
+ <xsl:param name="path"/>
+ <xsl:if test="contains($path,'.')">
+ <xsl:text>../</xsl:text>
+ <xsl:call-template name="path">
+ <xsl:with-param name="path"><xsl:value-of
select="substring-after($path,'.')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not(contains($path,'.')) and not($path =
'')">
+ <xsl:text>../</xsl:text>
+ </xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
- <xsl:param name="package.name"/>
- <LINK REL ="stylesheet" TYPE="text/css"
TITLE="Style"><xsl:attribute name="href"><xsl:if
test="not($package.name = 'unnamed package')"><xsl:call-template
name="path"><xsl:with-param name="path"
select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
+ <xsl:param name="package.name"/>
+ <LINK REL ="stylesheet" TYPE="text/css"
TITLE="Style"><xsl:attribute name="href"><xsl:if
test="not($package.name = 'unnamed package')"><xsl:call-template
name="path"><xsl:with-param name="path"
select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
</xsl:template>
<!-- alternated row style -->
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend-frames.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend-frames.xsl 2007-07-17 19:26:55 UTC
(rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend-frames.xsl 2007-07-17 22:53:37 UTC
(rev 7810)
@@ -1,68 +1,32 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
+ 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.
+
+-->
<!--
Sample stylesheet to be used with JDepend XML output.
-
+
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-
+
@author <a href="mailto:jtulley@novell.com">Jeff Tulley</a>
-->
@@ -103,7 +67,7 @@
<redirect:write file="{$output.dir}/all-packages.html">
<xsl:apply-templates select="Packages"
mode="all.packages"/>
</redirect:write>
-
+
<!-- create the all-cycles.html at the root -->
<redirect:write file="{$output.dir}/all-cycles.html">
<xsl:apply-templates select="Cycles" mode="all.cycles"/>
@@ -150,7 +114,7 @@
table.details tr td{
background:#eeeee0;
}
-
+
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
@@ -212,7 +176,7 @@
<th><a
href="overview-explanations.html#EXabstractness">Abstractness</a></th>
<th><a
href="overview-explanations.html#EXinstability">Instability</a></th>
<th><a
href="overview-explanations.html#EXdistance">Distance</a></th>
-
+
</tr>
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
@@ -264,12 +228,12 @@
[<a href="overview-cycles.html">cycles</a>]
[<a href="overview-explanations.html">explanations</a>]
</td></tr></table>
-
+
<xsl:for-each select="./Packages/Package">
<xsl:if test="count(error) = 0">
<h3><a><xsl:attribute name="name">PK<xsl:value-of
select="@name"/></xsl:attribute>
<xsl:value-of select="@name"/></a></h3>
-
+
<table width="100%"><tr>
<td><a
href="overview-explanations.html#EXafferent">Afferent Couplings</a>:
<xsl:value-of select="Stats/Ca"/></td>
<td><a
href="overview-explanations.html#EXefferent">Efferent Couplings</a>:
<xsl:value-of select="Stats/Ce"/></td>
@@ -277,7 +241,7 @@
<td><a
href="overview-explanations.html#EXinstability">Instability</a>:
<xsl:value-of select="Stats/I"/></td>
<td><a
href="overview-explanations.html#EXdistance">Distance</a>:
<xsl:value-of select="Stats/D"/></td>
</tr></table>
-
+
<table width="100%" class="details">
<tr>
<th>Abstract Classes</th>
@@ -360,7 +324,7 @@
[<a href="#NVcycles">cycles</a>]
[<a href="#NVexplanations">explanations</a>]
</td></tr></table> -->
-
+
<xsl:if test="count(Cycles/Package) = 0">
<p>There are no cyclic dependancies.</p>
</xsl:if>
@@ -380,7 +344,7 @@
</body>
</html>
</xsl:template>
-
+
<xsl:template match="JDepend" mode="explanations">
<html>
<head>
@@ -396,16 +360,16 @@
[<a href="overview-cycles.html">cycles</a>]
[explanations]
</td></tr></table>
-
+
<p>The following explanations are for quick reference and are lifted directly
from the original <a
href="http://www.clarkware.com/software/JDepend.html">JDepend
documentation</a>.</p>
-
+
<h3><a name="EXnumber">Number of Classes</a></h3>
<p>The number of concrete and abstract classes (and interfaces) in the package
is an indicator of the extensibility of the package.</p>
<h3><a name="EXafferent">Afferent Couplings</a></h3>
<p>The number of other packages that depend upon classes within the package is
an indicator of the package's responsibility. </p>
<h3><a name="EXefferent">Efferent Couplings</a></h3>
<p>The number of other packages that the classes in the package depend upon is
an indicator of the package's independence. </p>
- <h3><a name="EXabstractness">Abstractness</a></h3>
+ <h3><a name="EXabstractness">Abstractness</a></h3>
<p>The ratio of the number of abstract classes (and interfaces) in the analyzed
package to the total number of classes in the analyzed package. </p>
<p>The range for this metric is 0 to 1, with A=0 indicating a completely
concrete package and A=1 indicating a completely abstract package. </p>
<h3><a name="EXinstability">Instability</a></h3>
@@ -415,12 +379,12 @@
<p>The perpendicular distance of a package from the idealized line A + I = 1.
This metric is an indicator of the package's balance between abstractness and
stability. </p>
<p>A package squarely on the main sequence is optimally balanced with respect
to its abstractness and stability. Ideal packages are either completely abstract and
stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
<p>The range for this metric is 0 to 1, with D=0 indicating a package that is
coincident with the main sequence and D=1 indicating a package that is as far from the
main sequence as possible. </p>
-
+
</body>
</html>
</xsl:template>
-
-
+
+
<!--
Creates an html file that contains a link to all package links in
overview-packages.html.
@bug there will be a problem here, I don't know yet how to handle unnamed package
:(
@@ -506,7 +470,7 @@
</td>
</tr>
</xsl:template>
-
+
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>JDepend Analysis</h1>
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend.xsl 2007-07-17 19:26:55 UTC (rev
7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/jdepend.xsl 2007-07-17 22:53:37 UTC (rev
7810)
@@ -1,312 +1,275 @@
-<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ 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.
+-->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
-
<xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
<xsl:template match="JDepend">
- <html>
- <head>
- <title>JDepend Analysis</title>
-
- <style type="text/css">
- body {
- font:normal 68% verdana,arial,helvetica;
- color:#000000;
- }
- table tr td, tr th {
- font-size: 68%;
- }
- table.details tr th{
- font-weight: bold;
- text-align:left;
- background:#a6caf0;
- }
- table.details tr td{
- background:#eeeee0;
- }
-
- p {
- line-height:1.5em;
- margin-top:0.5em; margin-bottom:1.0em;
- margin-left:2em;
- margin-right:2em;
- }
- h1 {
- margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
- }
- h2 {
- margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
- }
- h3 {
- margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
- }
- h4 {
- margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
- }
- h5 {
- margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
- }
- h6 {
- margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
- }
- .Error {
- font-weight:bold; color:red;
- }
- .Failure {
- font-weight:bold; color:purple;
- }
- .Properties {
- text-align:right;
- }
- </style>
-
-
- </head>
- <body>
- <!--h1>JDepend Report</h1>
- <ul>
- <xsl:for-each select="./Packages/Package">
- <xsl:sort select="@name"/>
- <li><xsl:value-of select="@name"/></li>
- </xsl:for-each>
- </ul-->
-
- <h1><a name="top">JDepend Analysis</a></h1>
- <p align="right">Designed for use with <a
href="http://www.clarkware.com/software/JDepend.html">JDepen... and
<a href="http://jakarta.apache.org">Ant</a>.</p>
- <hr size="2" />
-
- <table width="100%"><tr><td>
- <a name="NVsummary"><h2>Summary</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <table width="100%" class="details">
- <tr>
- <th>Package</th>
- <th>Total Classes</th>
- <th><a href="#EXnumber">Abstract Classes</a></th>
- <th><a href="#EXnumber">Concrete Classes</a></th>
- <th><a href="#EXafferent">Afferent
Couplings</a></th>
- <th><a href="#EXefferent">Efferent
Couplings</a></th>
- <th><a href="#EXabstractness">Abstractness</a></th>
- <th><a href="#EXinstability">Instability</a></th>
- <th><a href="#EXdistance">Distance</a></th>
-
- </tr>
- <xsl:for-each select="./Packages/Package">
- <xsl:if test="count(error) = 0">
- <tr>
- <td align="left">
- <a>
- <xsl:attribute name="href">#PK<xsl:value-of
select="@name"/>
- </xsl:attribute>
- <xsl:value-of select="@name"/>
- </a>
- </td>
- <td align="right"><xsl:value-of
select="Stats/TotalClasses"/></td>
- <td align="right"><xsl:value-of
select="Stats/AbstractClasses"/></td>
- <td align="right"><xsl:value-of
select="Stats/ConcreteClasses"/></td>
- <td align="right"><xsl:value-of
select="Stats/Ca"/></td>
- <td align="right"><xsl:value-of
select="Stats/Ce"/></td>
- <td align="right"><xsl:value-of
select="Stats/A"/></td>
- <td align="right"><xsl:value-of
select="Stats/I"/></td>
- <td align="right"><xsl:value-of
select="Stats/D"/></td>
-
+ <html>
+ <head>
+ <title>JDepend Analysis</title>
+
+ <style type="text/css">
+ body {
+ font:normal 68% verdana,arial,helvetica;
+ color:#000000;
+ }
+ table tr td, tr th {
+ font-size: 68%;
+ }
+ table.details tr th{
+ font-weight: bold;
+ text-align:left;
+ background:#a6caf0;
+ }
+ table.details tr td{
+ background:#eeeee0;
+ }
+
+ p {
+ line-height:1.5em;
+ margin-top:0.5em; margin-bottom:1.0em;
+ margin-left:2em;
+ margin-right:2em;
+ }
+ h1 {
+ margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
+ }
+ h2 {
+ margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
+ }
+ h3 {
+ margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
+ }
+ h4 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+ }
+ h5 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+ }
+ h6 {
+ margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+ }
+ .Error {
+ font-weight:bold; color:red;
+ }
+ .Failure {
+ font-weight:bold; color:purple;
+ }
+ .Properties {
+ text-align:right;
+ }
+ </style>
+
+
+ </head>
+ <body>
+ <!--h1>JDepend Report</h1>
+ <ul>
+ <xsl:for-each select="./Packages/Package">
+ <xsl:sort select="@name"/>
+ <li><xsl:value-of select="@name"/></li>
+ </xsl:for-each>
+ </ul-->
+
+ <h1><a name="top">JDepend Analysis</a></h1>
+ <p align="right">Designed for use with <a
href="http://www.clarkware.com/software/JDepend.html">JDepen... and
<a href="http://jakarta.apache.org">Ant</a>.</p>
+ <hr size="2" />
+
+ <table width="100%"><tr><td>
+ <a name="NVsummary"><h2>Summary</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <table width="100%" class="details">
+ <tr>
+ <th>Package</th>
+ <th>Total Classes</th>
+ <th><a href="#EXnumber">Abstract
Classes</a></th>
+ <th><a href="#EXnumber">Concrete
Classes</a></th>
+ <th><a href="#EXafferent">Afferent
Couplings</a></th>
+ <th><a href="#EXefferent">Efferent
Couplings</a></th>
+ <th><a
href="#EXabstractness">Abstractness</a></th>
+ <th><a
href="#EXinstability">Instability</a></th>
+ <th><a
href="#EXdistance">Distance</a></th>
+
+ </tr>
+ <xsl:for-each select="./Packages/Package">
+ <xsl:if test="count(error) = 0">
+ <tr>
+ <td align="left">
+ <a>
+ <xsl:attribute name="href">#PK<xsl:value-of
select="@name"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ <td align="right"><xsl:value-of
select="Stats/TotalClasses"/></td>
+ <td align="right"><xsl:value-of
select="Stats/AbstractClasses"/></td>
+ <td align="right"><xsl:value-of
select="Stats/ConcreteClasses"/></td>
+ <td align="right"><xsl:value-of
select="Stats/Ca"/></td>
+ <td align="right"><xsl:value-of
select="Stats/Ce"/></td>
+ <td align="right"><xsl:value-of
select="Stats/A"/></td>
+ <td align="right"><xsl:value-of
select="Stats/I"/></td>
+ <td align="right"><xsl:value-of
select="Stats/D"/></td>
+
- </tr>
- </xsl:if>
- </xsl:for-each>
- <xsl:for-each select="./Packages/Package">
- <xsl:if test="count(error) > 0">
- <tr>
- <td align="left">
- <xsl:value-of select="@name"/>
- </td>
- <td align="left" colspan="8"><xsl:value-of
select="error"/></td>
- </tr>
- </xsl:if>
- </xsl:for-each>
- </table>
-
- <table width="100%"><tr><td>
- <a name="NVpackages"><h2>Packages</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <xsl:for-each select="./Packages/Package">
- <xsl:if test="count(error) = 0">
- <h3><a><xsl:attribute name="name">PK<xsl:value-of
select="@name"/></xsl:attribute>
- <xsl:value-of select="@name"/></a></h3>
-
- <table width="100%"><tr>
- <td><a href="#EXafferent">Afferent Couplings</a>:
<xsl:value-of select="Stats/Ca"/></td>
- <td><a href="#EXefferent">Efferent Couplings</a>:
<xsl:value-of select="Stats/Ce"/></td>
- <td><a href="#EXabstractness">Abstractness</a>:
<xsl:value-of select="Stats/A"/></td>
- <td><a href="#EXinstability">Instability</a>:
<xsl:value-of select="Stats/I"/></td>
- <td><a href="#EXdistance">Distance</a>: <xsl:value-of
select="Stats/D"/></td>
- </tr></table>
-
- <table width="100%" class="details">
- <tr>
- <th>Abstract Classes</th>
- <th>Concrete Classes</th>
- <th>Used by Packages</th>
- <th>Uses Packages</th>
- </tr>
- <tr>
- <td valign="top" width="25%">
- <xsl:if test="count(AbstractClasses/Class)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="AbstractClasses/Class">
- <xsl:value-of select="node()"/><br/>
- </xsl:for-each>
- </td>
- <td valign="top" width="25%">
- <xsl:if test="count(ConcreteClasses/Class)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="ConcreteClasses/Class">
- <xsl:value-of select="node()"/><br/>
- </xsl:for-each>
- </td>
- <td valign="top" width="25%">
- <xsl:if test="count(UsedBy/Package)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="UsedBy/Package">
- <a>
- <xsl:attribute name="href">#PK<xsl:value-of
select="node()"/></xsl:attribute>
- <xsl:value-of select="node()"/>
- </a><br/>
- </xsl:for-each>
- </td>
- <td valign="top" width="25%">
- <xsl:if test="count(DependsUpon/Package)=0">
- <i>None</i>
- </xsl:if>
- <xsl:for-each select="DependsUpon/Package">
- <a>
- <xsl:attribute name="href">#PK<xsl:value-of
select="node()"/></xsl:attribute>
- <xsl:value-of select="node()"/>
- </a><br/>
- </xsl:for-each>
- </td>
- </tr>
- </table>
- </xsl:if>
- </xsl:for-each>
-
- <table width="100%"><tr><td>
- <a name="NVcycles"><h2>Cycles</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <xsl:if test="count(Cycles/Package) = 0">
- <p>There are no cyclic dependancies.</p>
- </xsl:if>
- <xsl:for-each select="Cycles/Package">
- <h3><xsl:value-of select="@Name"/></h3><p>
- <xsl:for-each select="Package">
- <xsl:value-of select="."/><br/>
- </xsl:for-each></p>
- </xsl:for-each>
-
- <table width="100%"><tr><td>
- <a name="NVexplanations"><h2>Explanations</h2></a>
- </td><td align="right">
- [<a href="#NVsummary">summary</a>]
- [<a href="#NVpackages">packages</a>]
- [<a href="#NVcycles">cycles</a>]
- [<a href="#NVexplanations">explanations</a>]
- </td></tr></table>
-
- <p>The following explanations are for quick reference and are lifted directly from
the original <a
href="http://www.clarkware.com/software/JDepend.html">JDepend
documentation</a>.</p>
-
- <h3><a name="EXnumber">Number of Classes</a></h3>
- <p>The number of concrete and abstract classes (and interfaces) in the package is
an indicator of the extensibility of the package.</p>
- <h3><a name="EXafferent">Afferent Couplings</a></h3>
- <p>The number of other packages that depend upon classes within the package is an
indicator of the package's responsibility. </p>
- <h3><a name="EXefferent">Efferent Couplings</a></h3>
- <p>The number of other packages that the classes in the package depend upon is an
indicator of the package's independence. </p>
- <h3><a name="EXabstractness">Abstractness</a></h3>
- <p>The ratio of the number of abstract classes (and interfaces) in the analyzed
package to the total number of classes in the analyzed package. </p>
- <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete
package and A=1 indicating a completely abstract package. </p>
- <h3><a name="EXinstability">Instability</a></h3>
- <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This
metric is an indicator of the package's resilience to change. </p>
- <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable
package and I=1 indicating a completely instable package. </p>
- <h3><a name="EXdistance">Distance</a></h3>
- <p>The perpendicular distance of a package from the idealized line A + I = 1.
This metric is an indicator of the package's balance between abstractness and
stability. </p>
- <p>A package squarely on the main sequence is optimally balanced with respect to
its abstractness and stability. Ideal packages are either completely abstract and stable
(x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
- <p>The range for this metric is 0 to 1, with D=0 indicating a package that is
coincident with the main sequence and D=1 indicating a package that is as far from the
main sequence as possible. </p>
-
- </body>
- </html>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="./Packages/Package">
+ <xsl:if test="count(error) > 0">
+ <tr>
+ <td align="left">
+ <xsl:value-of select="@name"/>
+ </td>
+ <td align="left" colspan="8"><xsl:value-of
select="error"/></td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+
+ <table width="100%"><tr><td>
+ <a name="NVpackages"><h2>Packages</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <xsl:for-each select="./Packages/Package">
+ <xsl:if test="count(error) = 0">
+ <h3><a><xsl:attribute
name="name">PK<xsl:value-of
select="@name"/></xsl:attribute>
+ <xsl:value-of select="@name"/></a></h3>
+
+ <table width="100%"><tr>
+ <td><a href="#EXafferent">Afferent
Couplings</a>: <xsl:value-of select="Stats/Ca"/></td>
+ <td><a href="#EXefferent">Efferent
Couplings</a>: <xsl:value-of select="Stats/Ce"/></td>
+ <td><a
href="#EXabstractness">Abstractness</a>: <xsl:value-of
select="Stats/A"/></td>
+ <td><a href="#EXinstability">Instability</a>:
<xsl:value-of select="Stats/I"/></td>
+ <td><a href="#EXdistance">Distance</a>:
<xsl:value-of select="Stats/D"/></td>
+ </tr></table>
+
+ <table width="100%" class="details">
+ <tr>
+ <th>Abstract Classes</th>
+ <th>Concrete Classes</th>
+ <th>Used by Packages</th>
+ <th>Uses Packages</th>
+ </tr>
+ <tr>
+ <td valign="top" width="25%">
+ <xsl:if test="count(AbstractClasses/Class)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="AbstractClasses/Class">
+ <xsl:value-of select="node()"/><br/>
+ </xsl:for-each>
+ </td>
+ <td valign="top" width="25%">
+ <xsl:if test="count(ConcreteClasses/Class)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="ConcreteClasses/Class">
+ <xsl:value-of select="node()"/><br/>
+ </xsl:for-each>
+ </td>
+ <td valign="top" width="25%">
+ <xsl:if test="count(UsedBy/Package)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="UsedBy/Package">
+ <a>
+ <xsl:attribute
name="href">#PK<xsl:value-of
select="node()"/></xsl:attribute>
+ <xsl:value-of select="node()"/>
+ </a><br/>
+ </xsl:for-each>
+ </td>
+ <td valign="top" width="25%">
+ <xsl:if test="count(DependsUpon/Package)=0">
+ <i>None</i>
+ </xsl:if>
+ <xsl:for-each select="DependsUpon/Package">
+ <a>
+ <xsl:attribute
name="href">#PK<xsl:value-of
select="node()"/></xsl:attribute>
+ <xsl:value-of select="node()"/>
+ </a><br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </table>
+ </xsl:if>
+ </xsl:for-each>
+
+ <table width="100%"><tr><td>
+ <a name="NVcycles"><h2>Cycles</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <xsl:if test="count(Cycles/Package) = 0">
+ <p>There are no cyclic dependancies.</p>
+ </xsl:if>
+ <xsl:for-each select="Cycles/Package">
+ <h3><xsl:value-of select="@Name"/></h3><p>
+ <xsl:for-each select="Package">
+ <xsl:value-of select="."/><br/>
+ </xsl:for-each></p>
+ </xsl:for-each>
+
+ <table width="100%"><tr><td>
+ <a name="NVexplanations"><h2>Explanations</h2></a>
+ </td><td align="right">
+ [<a href="#NVsummary">summary</a>]
+ [<a href="#NVpackages">packages</a>]
+ [<a href="#NVcycles">cycles</a>]
+ [<a href="#NVexplanations">explanations</a>]
+ </td></tr></table>
+
+ <p>The following explanations are for quick reference and are lifted directly
from the original <a
href="http://www.clarkware.com/software/JDepend.html">JDepend
documentation</a>.</p>
+
+ <h3><a name="EXnumber">Number of Classes</a></h3>
+ <p>The number of concrete and abstract classes (and interfaces) in the
package is an indicator of the extensibility of the package.</p>
+ <h3><a name="EXafferent">Afferent
Couplings</a></h3>
+ <p>The number of other packages that depend upon classes within the package
is an indicator of the package's responsibility. </p>
+ <h3><a name="EXefferent">Efferent
Couplings</a></h3>
+ <p>The number of other packages that the classes in the package depend upon
is an indicator of the package's independence. </p>
+ <h3><a name="EXabstractness">Abstractness</a></h3>
+ <p>The ratio of the number of abstract classes (and interfaces) in the
analyzed package to the total number of classes in the analyzed package. </p>
+ <p>The range for this metric is 0 to 1, with A=0 indicating a completely
concrete package and A=1 indicating a completely abstract package. </p>
+ <h3><a name="EXinstability">Instability</a></h3>
+ <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)).
This metric is an indicator of the package's resilience to change. </p>
+ <p>The range for this metric is 0 to 1, with I=0 indicating a completely
stable package and I=1 indicating a completely instable package. </p>
+ <h3><a name="EXdistance">Distance</a></h3>
+ <p>The perpendicular distance of a package from the idealized line A + I =
1. This metric is an indicator of the package's balance between abstractness and
stability. </p>
+ <p>A package squarely on the main sequence is optimally balanced with
respect to its abstractness and stability. Ideal packages are either completely abstract
and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p>
+ <p>The range for this metric is 0 to 1, with D=0 indicating a package that
is coincident with the main sequence and D=1 indicating a package that is as far from the
main sequence as possible. </p>
+
+ </body>
+ </html>
</xsl:template>
</xsl:stylesheet>
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/junit-frames.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/junit-frames.xsl 2007-07-17 19:26:55 UTC
(rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/junit-frames.xsl 2007-07-17 22:53:37 UTC
(rev 7810)
@@ -1,73 +1,34 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+
xmlns:redirect="http://xml.apache.org/xalan/redirect"
+ xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="."
grouping-separator=","/>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ 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.
+ -->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+<!--
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
+ Sample stylesheet to be used with Ant JUnitReport output.
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
-
-<!--
-
- Sample stylesheet to be used with An JUnitReport output.
-
It creates a set of HTML files a la javadoc where you can browse easily
through all packages and classes.
-
- @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
- @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/>
-
+
-->
<xsl:param name="output.dir" select="'.'"/>
@@ -92,13 +53,32 @@
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
-
+
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
-
- <!-- process all packages -->
+
+ <!-- create the all-tests.html at the root -->
+ <redirect:write file="{$output.dir}/all-tests.html">
+ <xsl:apply-templates select="." mode="all.tests"/>
+ </redirect:write>
+
+ <!-- create the alltests-fails.html at the root -->
+ <redirect:write file="{$output.dir}/alltests-fails.html">
+ <xsl:apply-templates select="." mode="all.tests">
+ <xsl:with-param name="type" select="'fails'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+
+ <!-- create the alltests-errors.html at the root -->
+ <redirect:write file="{$output.dir}/alltests-errors.html">
+ <xsl:apply-templates select="." mode="all.tests">
+ <xsl:with-param name="type"
select="'errors'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+
+ <!-- process all packages -->
<xsl:for-each select="./testsuite[not(./@package =
preceding-sibling::testsuite/@package)]">
<xsl:call-template name="package">
<xsl:with-param name="name" select="@package"/>
@@ -112,7 +92,7 @@
<xsl:variable name="package.dir">
<xsl:if test="not($name = '')"><xsl:value-of
select="translate($name,'.','/')"/></xsl:if>
<xsl:if test="$name = ''">.</xsl:if>
- </xsl:variable>
+ </xsl:variable>
<!--Processing package <xsl:value-of select="@name"/> in
<xsl:value-of select="$output.dir"/> -->
<!-- create a classes-list.html in the package directory -->
<redirect:write
file="{$output.dir}/{$package.dir}/package-frame.html">
@@ -120,21 +100,45 @@
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
-
+
<!-- create a package-summary.html in the package directory -->
<redirect:write
file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:call-template name="package.summary">
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</redirect:write>
-
+
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will
be overwritten -->
- <xsl:for-each select="/testsuites/testsuite[@package = $name]">
- <redirect:write
file="{$output.dir}/{$package.dir}/{(a)name}.html">
- <xsl:apply-templates select="."
mode="class.details"/>
- </redirect:write>
- </xsl:for-each>
+ <xsl:for-each select="/testsuites/testsuite[@package = $name]">
+ <redirect:write
file="{$output.dir}/{$package.dir}/{@id}_{(a)name}.html">
+ <xsl:apply-templates select="." mode="class.details"/>
+ </redirect:write>
+ <xsl:if test="string-length(./system-out)!=0">
+ <redirect:write
file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-out.txt">
+ <xsl:value-of disable-output-escaping="yes"
select="./system-out"/>
+ </redirect:write>
+ </xsl:if>
+ <xsl:if test="string-length(./system-err)!=0">
+ <redirect:write
file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-err.txt">
+ <xsl:value-of disable-output-escaping="yes"
select="./system-err"/>
+ </redirect:write>
+ </xsl:if>
+ <xsl:if test="@failures != 0">
+ <redirect:write
file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-fails.html">
+ <xsl:apply-templates select="." mode="class.details">
+ <xsl:with-param name="type"
select="'fails'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+ </xsl:if>
+ <xsl:if test="@errors != 0">
+ <redirect:write
file="{$output.dir}/{$package.dir}/{@id}_{(a)name}-errors.html">
+ <xsl:apply-templates select="." mode="class.details">
+ <xsl:with-param name="type"
select="'errors'"/>
+ </xsl:apply-templates>
+ </redirect:write>
+ </xsl:if>
+ </xsl:for-each>
</xsl:template>
<xsl:template name="index.html">
@@ -209,13 +213,79 @@
}
</xsl:template>
+<!-- Create list of all/failed/errored tests -->
+<xsl:template match="testsuites" mode="all.tests">
+ <xsl:param name="type" select="'all'"/>
+ <html>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <xsl:text>All Failures</xsl:text>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <xsl:text>All Errors</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>All Tests</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <head>
+ <title>Unit Test Results: <xsl:value-of
select="$title"/></title>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <xsl:attribute
name="onload">open('allclasses-frame.html','classListFrame')</xsl:attribute>
+ <xsl:call-template name="pageHeader"/>
+ <h2><xsl:value-of select="$title"/></h2>
+ <table class="details" border="0"
cellpadding="5" cellspacing="2" width="95%">
+ <xsl:call-template name="testcase.test.header">
+ <xsl:with-param name="show.class"
select="'yes'"/>
+ </xsl:call-template>
+ <!--
+ test can even not be started at all (failure to load the class)
+ so report the error directly
+ -->
+ <xsl:if test="./error">
+ <tr class="Error">
+ <td colspan="4">
+ <xsl:apply-templates select="./error"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <xsl:apply-templates select=".//testcase[failure]"
mode="print.test">
+ <xsl:with-param name="show.class"
select="'yes'"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <xsl:apply-templates select=".//testcase[error]"
mode="print.test">
+ <xsl:with-param name="show.class"
select="'yes'"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select=".//testcase"
mode="print.test">
+ <xsl:with-param name="show.class"
select="'yes'"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </body>
+ </html>
+</xsl:template>
+
+
<!-- ======================================================================
This page is created for every testsuite class.
It prints a summary of the testsuite and detailed information about
testcase methods.
====================================================================== -->
<xsl:template match="testsuite" mode="class.details">
+ <xsl:param name="type" select="'all'"/>
<xsl:variable name="package.name" select="@package"/>
<xsl:variable name="class.name"><xsl:if
test="not($package.name = '')"><xsl:value-of
select="$package.name"/>.</xsl:if><xsl:value-of
select="@name"/></xsl:variable>
<html>
@@ -232,7 +302,8 @@
<script type="text/javascript"
language="JavaScript"><![CDATA[
function displayProperties (name) {
var win =
window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
- var doc = win.document.open();
+ var doc = win.document;
+ doc.open();
doc.write("<html><head><title>Properties of " +
name + "</title>");
doc.write("<style type=\"text/css\">");
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000;
}");
@@ -255,32 +326,52 @@
doc.close();
win.focus();
}
- ]]>
+ ]]>
</script>
</head>
<body>
- <xsl:call-template name="pageHeader"/>
+ <xsl:call-template name="pageHeader"/>
<h3>Class <xsl:value-of
select="$class.name"/></h3>
-
+
<table class="details" border="0"
cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
<xsl:apply-templates select="."
mode="print.test"/>
</table>
-
- <h2>Tests</h2>
+
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <h2>Failures</h2>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <h2>Errors</h2>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2>Tests</h2>
+ </xsl:otherwise>
+ </xsl:choose>
<table class="details" border="0"
cellpadding="5" cellspacing="2" width="95%">
- <xsl:call-template name="testcase.test.header"/>
- <!--
- test can even not be started at all (failure to load the class)
- so report the error directly
- -->
+ <xsl:call-template name="testcase.test.header"/>
+ <!--
+ test can even not be started at all (failure to load the class)
+ so report the error directly
+ -->
<xsl:if test="./error">
<tr class="Error">
<td colspan="4"><xsl:apply-templates
select="./error"/></td>
</tr>
</xsl:if>
- <xsl:apply-templates select="./testcase"
mode="print.test"/>
+ <xsl:choose>
+ <xsl:when test="$type = 'fails'">
+ <xsl:apply-templates select="./testcase[failure]"
mode="print.test"/>
+ </xsl:when>
+ <xsl:when test="$type = 'errors'">
+ <xsl:apply-templates select="./testcase[error]"
mode="print.test"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="./testcase"
mode="print.test"/>
+ </xsl:otherwise>
+ </xsl:choose>
</table>
<div class="Properties">
<a>
@@ -288,6 +379,22 @@
Properties »
</a>
</div>
+ <xsl:if test="string-length(./system-out)!=0">
+ <div class="Properties">
+ <a>
+ <xsl:attribute name="href">./<xsl:value-of
select="@id"/>_<xsl:value-of
select="@name"/>-out.txt</xsl:attribute>
+ System.out »
+ </a>
+ </div>
+ </xsl:if>
+ <xsl:if test="string-length(./system-err)!=0">
+ <div class="Properties">
+ <a>
+ <xsl:attribute name="href">./<xsl:value-of
select="@id"/>_<xsl:value-of
select="@name"/>-err.txt</xsl:attribute>
+ System.err »
+ </a>
+ </div>
+ </xsl:if>
</body>
</html>
</xsl:template>
@@ -324,18 +431,21 @@
<table width="100%">
<tr>
<td nowrap="nowrap">
- <h2><a href="package-summary.html"
target="classFrame"><xsl:value-of
select="$name"/></a></h2>
+ <h2><a href="package-summary.html"
target="classFrame">
+ <xsl:value-of select="$name"/>
+ <xsl:if test="$name =
''"><none></xsl:if>
+ </a></h2>
</td>
</tr>
</table>
-
+
<h2>Classes</h2>
<table width="100%">
<xsl:for-each select="/testsuites/testsuite[./@package =
$name]">
<xsl:sort select="@name"/>
<tr>
<td nowrap="nowrap">
- <a href="{(a)name}.html"
target="classFrame"><xsl:value-of select="@name"/></a>
+ <a href="{@id}_{(a)name}.html"
target="classFrame"><xsl:value-of select="@name"/></a>
</td>
</tr>
</xsl:for-each>
@@ -376,7 +486,7 @@
<xsl:attribute name="href">
<xsl:if test="not($package.name='')">
<xsl:value-of
select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
- </xsl:if><xsl:value-of
select="@name"/><xsl:text>.html</xsl:text>
+ </xsl:if><xsl:value-of
select="@id"/>_<xsl:value-of
select="@name"/><xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
@@ -413,8 +523,9 @@
<xsl:template match="testsuite" mode="all.packages">
<tr>
<td nowrap="nowrap">
- <a
href="{translate((a)package,'.','/')}/package-summary.html"
target="classFrame">
+ <a
href="./{translate((a)package,'.','/')}/package-summary.html"
target="classFrame">
<xsl:value-of select="@package"/>
+ <xsl:if test="@package =
''"><none></xsl:if>
</a>
</td>
</tr>
@@ -454,9 +565,9 @@
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><xsl:value-of select="$testCount"/></td>
- <td><xsl:value-of select="$failureCount"/></td>
- <td><xsl:value-of select="$errorCount"/></td>
+ <td><a title="Display all tests"
href="all-tests.html"><xsl:value-of
select="$testCount"/></a></td>
+ <td><a title="Display all failures"
href="alltests-fails.html"><xsl:value-of
select="$failureCount"/></a></td>
+ <td><a title="Display all errors"
href="alltests-errors.html"><xsl:value-of
select="$errorCount"/></a></td>
<td>
<xsl:call-template name="display-percent">
<xsl:with-param name="value"
select="$successRate"/>
@@ -467,7 +578,6 @@
<xsl:with-param name="value"
select="$timeCount"/>
</xsl:call-template>
</td>
-
</tr>
</table>
<table border="0" width="95%">
@@ -477,7 +587,7 @@
</td>
</tr>
</table>
-
+
<h2>Packages</h2>
<table class="details" border="0"
cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
@@ -494,7 +604,10 @@
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><a
href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of
select="@package"/></a></td>
+ <td><a
href="./{translate((a)package,'.','/')}/package-summary.html">
+ <xsl:value-of select="@package"/>
+ <xsl:if test="@package =
''"><none></xsl:if>
+ </a></td>
<td><xsl:value-of
select="sum($insamepackage/@tests)"/></td>
<td><xsl:value-of
select="sum($insamepackage/@errors)"/></td>
<td><xsl:value-of
select="sum($insamepackage/@failures)"/></td>
@@ -503,6 +616,8 @@
<xsl:with-param name="value"
select="sum($insamepackage/@time)"/>
</xsl:call-template>
</td>
+ <td><xsl:value-of
select="$insamepackage/@timestamp"/></td>
+ <td><xsl:value-of
select="$insamepackage/@hostname"/></td>
</tr>
</xsl:for-each>
</table>
@@ -523,12 +638,12 @@
<xsl:attribute
name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
<xsl:call-template name="pageHeader"/>
<h3>Package <xsl:value-of select="$name"/></h3>
-
+
<!--table border="0" cellpadding="5"
cellspacing="2" width="95%">
<xsl:call-template name="class.metrics.header"/>
<xsl:apply-templates select="."
mode="print.metrics"/>
</table-->
-
+
<xsl:variable name="insamepackage"
select="/testsuites/testsuite[./@package = $name]"/>
<xsl:if test="count($insamepackage) > 0">
<h2>Classes</h2>
@@ -553,13 +668,13 @@
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of
select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
+ </xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path =
'')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
@@ -577,7 +692,7 @@
<table width="100%">
<tr>
<td align="left"></td>
- <td align="right">Designed for use with <a
href="http://www.junit.org/">JUnit</a> and <a
href="http://jakarta.apache.org/">Ant</a>.</td>
+ <td align="right">Designed for use with <a
href="http://www.junit.org/">JUnit</a> and <a
href="http://ant.apache.org/">Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
@@ -591,12 +706,18 @@
<th>Errors</th>
<th>Failures</th>
<th nowrap="nowrap">Time(s)</th>
+ <th nowrap="nowrap">Time Stamp</th>
+ <th>Host</th>
</tr>
</xsl:template>
<!-- method header -->
<xsl:template name="testcase.test.header">
+ <xsl:param name="show.class" select="''"/>
<tr valign="top">
+ <xsl:if test="boolean($show.class)">
+ <th>Class</th>
+ </xsl:if>
<th>Name</th>
<th>Status</th>
<th width="80%">Type</th>
@@ -607,7 +728,7 @@
<!-- class information -->
<xsl:template match="testsuite" mode="print.test">
- <tr valign="top">
+ <tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="(a)errors[.&gt;
0]">Error</xsl:when>
@@ -615,18 +736,39 @@
<xsl:otherwise>Pass</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><a href="{@name}.html"><xsl:value-of
select="@name"/></a></td>
- <td><xsl:apply-templates select="@tests"/></td>
- <td><xsl:apply-templates select="@errors"/></td>
- <td><xsl:apply-templates select="@failures"/></td>
+ <td><a title="Display all tests"
href="{@id}_{@name}.html"><xsl:value-of
select="@name"/></a></td>
+ <td><a title="Display all tests"
href="{@id}_{@name}.html"><xsl:apply-templates
select="@tests"/></a></td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="@errors != 0">
+ <a title="Display only errors"
href="{@id}_{@name}-errors.html"><xsl:apply-templates
select="@errors"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="@errors"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="@failures != 0">
+ <a title="Display only failures"
href="{@id}_{@name}-fails.html"><xsl:apply-templates
select="@failures"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="@failures"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
<td><xsl:call-template name="display-time">
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
+ <td><xsl:apply-templates select="@timestamp"/></td>
+ <td><xsl:apply-templates select="@hostname"/></td>
</tr>
</xsl:template>
<xsl:template match="testcase" mode="print.test">
+ <xsl:param name="show.class" select="''"/>
<tr valign="top">
<xsl:attribute name="class">
<xsl:choose>
@@ -635,7 +777,23 @@
<xsl:otherwise>TableRowColor</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <td><xsl:value-of select="@name"/></td>
+ <xsl:variable name="class.href">
+ <xsl:value-of select="concat(translate(../(a)package,'.','/'),
'/', ../@id, '_', ../@name, '.html')"/>
+ </xsl:variable>
+ <xsl:if test="boolean($show.class)">
+ <td><a href="{$class.href}"><xsl:value-of
select="../@name"/></a></td>
+ </xsl:if>
+ <td>
+ <a name="{@name}"/>
+ <xsl:choose>
+ <xsl:when test="boolean($show.class)">
+ <a href="{concat($class.href, '#',
@name)}"><xsl:value-of select="@name"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
<xsl:choose>
<xsl:when test="failure">
<td>Failure</td>
@@ -690,21 +848,9 @@
<xsl:template name="JS-escape">
<xsl:param name="string"/>
- <xsl:choose>
- <xsl:when test="contains($string,"'")">
- <xsl:value-of
select="substring-before($string,"'")"/>\'<xsl:call-template
name="JS-escape">
- <xsl:with-param name="string"
select="substring-after($string,"'")"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($string,'\')">
- <xsl:value-of
select="substring-before($string,'\')"/>\\<xsl:call-template
name="JS-escape">
- <xsl:with-param name="string"
select="substring-after($string,'\')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$string"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="tmp1"
select="stringutils:replace(string($string),'\','\\')"/>
+ <xsl:param name="tmp2"
select="stringutils:replace(string($tmp1),"'","\'")"/>
+ <xsl:value-of select="$tmp2"/>
</xsl:template>
@@ -714,18 +860,7 @@
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
- <xsl:choose>
- <xsl:when test="contains($word,'
')">
- <xsl:value-of
select="substring-before($word,'
')"/>
- <br/>
- <xsl:call-template name="br-replace">
- <xsl:with-param name="word"
select="substring-after($word,'
')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$word"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:value-of disable-output-escaping="yes"
select='stringutils:replace(string($word),"
","<br/>")'/>
</xsl:template>
<xsl:template name="display-time">
@@ -738,4 +873,3 @@
<xsl:value-of select="format-number($value,'0.00%')"/>
</xsl:template>
</xsl:stylesheet>
-
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/junit-noframes.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/junit-noframes.xsl 2007-07-17 19:26:55 UTC
(rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/junit-noframes.xsl 2007-07-17 22:53:37 UTC
(rev 7810)
@@ -1,71 +1,33 @@
-<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
+
xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils">
<xsl:output method="html" indent="yes"
encoding="US-ASCII"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
<xsl:decimal-format decimal-separator="." grouping-separator=","
/>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ 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.
+ -->
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+<!--
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
+ Sample stylesheet to be used with Ant JUnitReport output.
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
-
-<!--
-
- Sample stylesheet to be used with An JUnitReport output.
-
It creates a non-framed report that can be useful to send via
e-mail or such.
-
- @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
- @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/>
-
+
-->
<xsl:template match="testsuites">
<html>
@@ -87,7 +49,7 @@
table.details tr td{
background:#eeeee0;
}
-
+
p {
line-height:1.5em;
margin-top:0.5em; margin-bottom:1.0em;
@@ -123,7 +85,7 @@
<script type="text/javascript" language="JavaScript">
var TestCases = new Array();
var cur;
- <xsl:for-each select="./testsuite">
+ <xsl:for-each select="./testsuite">
<xsl:apply-templates select="properties"/>
</xsl:for-each>
@@ -131,7 +93,8 @@
<script type="text/javascript"
language="JavaScript"><![CDATA[
function displayProperties (name) {
var win =
window.open('','JUnitSystemProperties','scrollbars=1,resizable=1');
- var doc = win.document.open();
+ var doc = win.document;
+ doc.open();
doc.write("<html><head><title>Properties of " +
name + "</title>");
doc.write("<style>")
doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000;
}");
@@ -154,39 +117,39 @@
doc.close();
win.focus();
}
- ]]>
+ ]]>
</script>
</head>
<body>
<a name="top"></a>
- <xsl:call-template name="pageHeader"/>
-
+ <xsl:call-template name="pageHeader"/>
+
<!-- Summary part -->
<xsl:call-template name="summary"/>
<hr size="1" width="95%" align="left"/>
-
+
<!-- Package List part -->
<xsl:call-template name="packagelist"/>
<hr size="1" width="95%" align="left"/>
-
+
<!-- For each package create its part -->
<xsl:call-template name="packages"/>
<hr size="1" width="95%" align="left"/>
-
+
<!-- For each class create the part -->
<xsl:call-template name="classes"/>
-
+
</body>
</html>
</xsl:template>
-
-
-
+
+
+
<!-- ================================================================== -->
<!-- Write a list of all packages with an hyperlink to the anchor of -->
<!-- of the package name. -->
<!-- ================================================================== -->
- <xsl:template name="packagelist">
+ <xsl:template name="packagelist">
<h2>Packages</h2>
Note: package statistics are not computed recursively, they only sum up all of
its testsuites numbers.
<table class="details" border="0"
cellpadding="5" cellspacing="2" width="95%">
@@ -199,7 +162,7 @@
<xsl:variable name="errorCount"
select="sum($testsuites-in-package/@errors)"/>
<xsl:variable name="failureCount"
select="sum($testsuites-in-package/@failures)"/>
<xsl:variable name="timeCount"
select="sum($testsuites-in-package/@time)"/>
-
+
<!-- write a summary for the package -->
<tr valign="top">
<!-- set a nice color depending if there is an error/failure
-->
@@ -218,12 +181,14 @@
<xsl:with-param name="value"
select="$timeCount"/>
</xsl:call-template>
</td>
+ <td><xsl:value-of
select="$testsuites-in-package/@timestamp"/></td>
+ <td><xsl:value-of
select="$testsuites-in-package/@hostname"/></td>
</tr>
</xsl:for-each>
- </table>
+ </table>
</xsl:template>
-
-
+
+
<!-- ================================================================== -->
<!-- Write a package level report -->
<!-- It creates a table with values from the document: -->
@@ -235,10 +200,10 @@
<xsl:sort select="@package"/>
<a name="{@package}"></a>
<h3>Package <xsl:value-of
select="@package"/></h3>
-
+
<table class="details" border="0"
cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testsuite.test.header"/>
-
+
<!-- match the testsuites of this package -->
<xsl:apply-templates select="/testsuites/testsuite[./@package
= current()/@package]" mode="print.test"/>
</table>
@@ -247,14 +212,14 @@
<p/>
</xsl:for-each>
</xsl:template>
-
+
<xsl:template name="classes">
<xsl:for-each select="testsuite">
<xsl:sort select="@name"/>
<!-- create an anchor to this class name -->
<a name="{@name}"></a>
<h3>TestCase <xsl:value-of select="@name"/></h3>
-
+
<table class="details" border="0"
cellpadding="5" cellspacing="2" width="95%">
<xsl:call-template name="testcase.test.header"/>
<!--
@@ -275,11 +240,11 @@
</a>
</div>
<p/>
-
+
<a href="#top">Back to top</a>
</xsl:for-each>
</xsl:template>
-
+
<xsl:template name="summary">
<h2>Summary</h2>
<xsl:variable name="testCount"
select="sum(testsuite/@tests)"/>
@@ -326,7 +291,7 @@
</tr>
</table>
</xsl:template>
-
+
<!--
Write properties into a JavaScript data structure.
This is based on the original idea by Erik Hatcher (ehatcher(a)apache.org)
@@ -338,14 +303,14 @@
cur['<xsl:value-of select="@name"/>'] =
'<xsl:call-template name="JS-escape"><xsl:with-param
name="string" select="@value"/></xsl:call-template>';
</xsl:for-each>
</xsl:template>
-
+
<!-- Page HEADER -->
<xsl:template name="pageHeader">
<h1>Unit Test Results</h1>
<table width="100%">
<tr>
<td align="left"></td>
- <td align="right">Designed for use with <a
href='http://www.junit.org'>JUnit</a> and <a
href='http://jakarta.apache.org/ant'>Ant</a>.</td>
+ <td align="right">Designed for use with <a
href='http://www.junit.org'>JUnit</a> and <a
href='http://ant.apache.org/ant'>Ant</a>.</td>
</tr>
</table>
<hr size="1"/>
@@ -369,6 +334,8 @@
<th>Errors</th>
<th>Failures</th>
<th nowrap="nowrap">Time(s)</th>
+ <th nowrap="nowrap">Time Stamp</th>
+ <th>Host</th>
</tr>
</xsl:template>
@@ -393,7 +360,7 @@
<xsl:when test="(a)errors[.&gt;
0]">Error</xsl:when>
</xsl:choose>
</xsl:attribute>
-
+
<!-- print testsuite information -->
<td><a href="#{@name}"><xsl:value-of
select="@name"/></a></td>
<td><xsl:value-of select="@tests"/></td>
@@ -404,6 +371,8 @@
<xsl:with-param name="value" select="@time"/>
</xsl:call-template>
</td>
+ <td><xsl:apply-templates select="@timestamp"/></td>
+ <td><xsl:apply-templates select="@hostname"/></td>
</tr>
</xsl:template>
@@ -467,21 +436,9 @@
<xsl:template name="JS-escape">
<xsl:param name="string"/>
- <xsl:choose>
- <xsl:when test="contains($string,"'")">
- <xsl:value-of
select="substring-before($string,"'")"/>\'<xsl:call-template
name="JS-escape">
- <xsl:with-param name="string"
select="substring-after($string,"'")"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($string,'\')">
- <xsl:value-of
select="substring-before($string,'\')"/>\\<xsl:call-template
name="JS-escape">
- <xsl:with-param name="string"
select="substring-after($string,'\')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$string"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="tmp1"
select="stringutils:replace(string($string),'\','\\')"/>
+ <xsl:param name="tmp2"
select="stringutils:replace(string($tmp1),"'","\'")"/>
+ <xsl:value-of select="$tmp2"/>
</xsl:template>
@@ -491,18 +448,7 @@
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
- <xsl:choose>
- <xsl:when test="contains($word,'
')">
- <xsl:value-of
select="substring-before($word,'
')"/>
- <br/>
- <xsl:call-template name="br-replace">
- <xsl:with-param name="word"
select="substring-after($word,'
')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$word"/>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:value-of disable-output-escaping="yes"
select='stringutils:replace(string($word),"
","<br/>")'/>
</xsl:template>
<xsl:template name="display-time">
@@ -516,4 +462,3 @@
</xsl:template>
</xsl:stylesheet>
-
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/log.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/log.xsl 2007-07-17 19:26:55 UTC (rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/log.xsl 2007-07-17 22:53:37 UTC (rev 7810)
@@ -1,58 +1,22 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2000-2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
+ 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.
+
+-->
<!--
@@ -149,7 +113,7 @@
</a>
</td>
<td style="text-align:right;vertical-align:bottom">
- <a
href="htp://jakarta.apache.org/ant">Jakarta Ant</a>
+ <a
href="http://ant.apache.org/">Apache Ant</a>
</td>
</tr>
</table>
@@ -160,15 +124,6 @@
<xsl:apply-templates select="build"/>
- <!-- FOOTER -->
- <table width="100%">
- <tr><td><hr noshade="yes"
size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76"
size="-1"><em>
- Copyright © 2000-2002, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</body>
</html>
</xsl:template>
@@ -199,10 +154,10 @@
</tr>
</table>
<table border="1" cellspacing="2" cellpadding="3"
width="100%" style="font-size:80%">
- <tr class="a"><td
width="1">ant.file</td><td><xsl:value-of
select="substring-after(message[contains(text(),'ant.file')],
'->')"/></td></tr>
- <tr class="b"><td
width="1">ant.version</td><td><xsl:value-of
select="substring-after(message[contains(text(),'ant.version')],
'->')"/></td></tr>
- <tr class="a"><td
width="1">java.version</td><td><xsl:value-of
select="substring-after(message[contains(text(),'java.vm.version')],
'->')"/></td></tr>
- <tr class="b"><td
width="1">os.name</td><td><xsl:value-of
select="substring-after(message[contains(text(),'os.name')],
'->')"/></td></tr>
+ <tr class="a"><td
width="1">ant.file</td><td><xsl:value-of
select="substring-after(//message[contains(text(),'ant.file')],
'->')"/></td></tr>
+ <tr class="b"><td
width="1">ant.version</td><td><xsl:value-of
select="substring-after(//message[contains(text(),'ant.version')],
'->')"/></td></tr>
+ <tr class="a"><td
width="1">java.version</td><td><xsl:value-of
select="substring-after(//message[contains(text(),'java.vm.version')],
'->')"/></td></tr>
+ <tr class="b"><td
width="1">os.name</td><td><xsl:value-of
select="substring-after(//message[contains(text(),'os.name')],
'->')"/></td></tr>
</table>
<!-- build information -->
<h3>Build events</h3>
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/maudit-frames.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/maudit-frames.xsl 2007-07-17 19:26:55 UTC
(rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/maudit-frames.xsl 2007-07-17 22:53:37 UTC
(rev 7810)
@@ -1,67 +1,30 @@
-<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
-
xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
- extension-element-prefixes="redirect">
-<xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
+
xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
+ extension-element-prefixes="redirect">
+<xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","
/>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
+ 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.
+-->
<!--
Stylesheet to transform an XML file generated by the Ant MAudit task into
a set of JavaDoc-like HTML page to make pages more convenient to be browsed.
-
+
It use the Xalan redirect extension to write to multiple output files.
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
@@ -71,86 +34,86 @@
<xsl:template match="classes">
- <!-- create the index.html -->
- <redirect:write file="{$output.dir}/index.html">
- <xsl:call-template name="index.html"/>
- </redirect:write>
+ <!-- create the index.html -->
+ <redirect:write file="{$output.dir}/index.html">
+ <xsl:call-template name="index.html"/>
+ </redirect:write>
- <!-- create the stylesheet.css -->
- <redirect:write file="{$output.dir}/stylesheet.css">
- <xsl:call-template name="stylesheet.css"/>
- </redirect:write>
+ <!-- create the stylesheet.css -->
+ <redirect:write file="{$output.dir}/stylesheet.css">
+ <xsl:call-template name="stylesheet.css"/>
+ </redirect:write>
- <!-- create the overview-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-summary.html">
- <xsl:apply-templates select="." mode="overview.packages"/>
- </redirect:write>
+ <!-- create the overview-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-summary.html">
+ <xsl:apply-templates select="."
mode="overview.packages"/>
+ </redirect:write>
- <!-- create the all-packages.html at the root -->
- <redirect:write file="{$output.dir}/overview-frame.html">
- <xsl:apply-templates select="." mode="all.packages"/>
- </redirect:write>
-
- <!-- create the all-classes.html at the root -->
- <redirect:write file="{$output.dir}/allclasses-frame.html">
- <xsl:apply-templates select="." mode="all.classes"/>
- </redirect:write>
-
- <!-- process all packages -->
- <xsl:for-each select="./class[not(./@package =
preceding-sibling::class/@package)]">
- <xsl:call-template name="package">
- <xsl:with-param name="name" select="@package"/>
- </xsl:call-template>
- </xsl:for-each>
+ <!-- create the all-packages.html at the root -->
+ <redirect:write file="{$output.dir}/overview-frame.html">
+ <xsl:apply-templates select="." mode="all.packages"/>
+ </redirect:write>
+
+ <!-- create the all-classes.html at the root -->
+ <redirect:write file="{$output.dir}/allclasses-frame.html">
+ <xsl:apply-templates select="." mode="all.classes"/>
+ </redirect:write>
+
+ <!-- process all packages -->
+ <xsl:for-each select="./class[not(./@package =
preceding-sibling::class/@package)]">
+ <xsl:call-template name="package">
+ <xsl:with-param name="name" select="@package"/>
+ </xsl:call-template>
+ </xsl:for-each>
</xsl:template>
<xsl:template name="package">
- <xsl:param name="name"/>
- <xsl:variable name="package.dir">
- <xsl:if test="not($name = '')"><xsl:value-of
select="translate($name,'.','/')"/></xsl:if>
- <xsl:if test="$name = ''">.</xsl:if>
- </xsl:variable>
- <!--Processing package <xsl:value-of select="@name"/> in
<xsl:value-of select="$output.dir"/> -->
- <!-- create a classes-list.html in the package directory -->
- <redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
- <xsl:call-template name="classes.list">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </redirect:write>
-
- <!-- create a package-summary.html in the package directory -->
- <redirect:write
file="{$output.dir}/{$package.dir}/package-summary.html">
- <xsl:call-template name="package.summary">
- <xsl:with-param name="name" select="$name"/>
- </xsl:call-template>
- </redirect:write>
-
- <!-- for each class, creates a @name.html -->
- <!-- @bug there will be a problem with inner classes having the same name, it will be
overwritten -->
- <xsl:for-each select="/classes/class[@package = $name]">
- <redirect:write file="{$output.dir}/{$package.dir}/{(a)name}.html">
- <xsl:apply-templates select="." mode="class.details"/>
- </redirect:write>
- </xsl:for-each>
+ <xsl:param name="name"/>
+ <xsl:variable name="package.dir">
+ <xsl:if test="not($name = '')"><xsl:value-of
select="translate($name,'.','/')"/></xsl:if>
+ <xsl:if test="$name = ''">.</xsl:if>
+ </xsl:variable>
+ <!--Processing package <xsl:value-of select="@name"/> in
<xsl:value-of select="$output.dir"/> -->
+ <!-- create a classes-list.html in the package directory -->
+ <redirect:write
file="{$output.dir}/{$package.dir}/package-frame.html">
+ <xsl:call-template name="classes.list">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </redirect:write>
+
+ <!-- create a package-summary.html in the package directory -->
+ <redirect:write
file="{$output.dir}/{$package.dir}/package-summary.html">
+ <xsl:call-template name="package.summary">
+ <xsl:with-param name="name" select="$name"/>
+ </xsl:call-template>
+ </redirect:write>
+
+ <!-- for each class, creates a @name.html -->
+ <!-- @bug there will be a problem with inner classes having the same name, it will
be overwritten -->
+ <xsl:for-each select="/classes/class[@package = $name]">
+ <redirect:write
file="{$output.dir}/{$package.dir}/{(a)name}.html">
+ <xsl:apply-templates select="."
mode="class.details"/>
+ </redirect:write>
+ </xsl:for-each>
</xsl:template>
<xsl:template name="index.html">
<HTML>
- <HEAD><TITLE>Audit Results.</TITLE></HEAD>
- <FRAMESET cols="20%,80%">
- <FRAMESET rows="30%,70%">
- <FRAME src="overview-frame.html" name="packageListFrame"/>
- <FRAME src="allclasses-frame.html" name="classListFrame"/>
- </FRAMESET>
- <FRAME src="overview-summary.html" name="classFrame"/>
- </FRAMESET>
- <noframes>
- <H2>Frame Alert</H2>
- <P>
- This document is designed to be viewed using the frames feature. If you see this
message, you are using a non-frame-capable web client.
- </P>
- </noframes>
+ <HEAD><TITLE>Audit Results.</TITLE></HEAD>
+ <FRAMESET cols="20%,80%">
+ <FRAMESET rows="30%,70%">
+ <FRAME src="overview-frame.html"
name="packageListFrame"/>
+ <FRAME src="allclasses-frame.html"
name="classListFrame"/>
+ </FRAMESET>
+ <FRAME src="overview-summary.html" name="classFrame"/>
+ </FRAMESET>
+ <noframes>
+ <H2>Frame Alert</H2>
+ <P>
+ This document is designed to be viewed using the frames feature. If you see this
message, you are using a non-frame-capable web client.
+ </P>
+ </noframes>
</HTML>
</xsl:template>
@@ -168,10 +131,10 @@
background-color:#FFFFFF;
color:#000000;
}
- .a td {
+ .a td {
background: #efefef;
}
- .b td {
+ .b td {
background: #fff;
}
th, td {
@@ -188,7 +151,7 @@
border: none
}
table.log tr td, tr th {
-
+
}
h2 {
font-weight:bold;
@@ -211,236 +174,236 @@
<!-- print the violations of the class -->
<xsl:template match="class" mode="class.details">
- <xsl:variable name="package.name" select="@package"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"
select="$package.name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <xsl:call-template name="pageHeader"/>
- <H3>Class <xsl:if test="not($package.name =
'')"><xsl:value-of
select="$package.name"/>.</xsl:if><xsl:value-of
select="@name"/></H3>
+ <xsl:variable name="package.name" select="@package"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"
select="$package.name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <xsl:call-template name="pageHeader"/>
+ <H3>Class <xsl:if test="not($package.name =
'')"><xsl:value-of
select="$package.name"/>.</xsl:if><xsl:value-of
select="@name"/></H3>
- <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
- <xsl:call-template name="class.audit.header"/>
- <xsl:apply-templates select="." mode="print.audit"/>
- </table>
-
- <H3>Violations</H3>
- <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
- <xsl:call-template name="violation.audit.header"/>
- <xsl:apply-templates select="./violation"
mode="print.audit">
- <xsl:sort data-type="number" select="@line"/>
- </xsl:apply-templates>
- </table>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <table class="log" border="0"
cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="class.audit.header"/>
+ <xsl:apply-templates select="."
mode="print.audit"/>
+ </table>
+
+ <H3>Violations</H3>
+ <table class="log" border="0"
cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="violation.audit.header"/>
+ <xsl:apply-templates select="./violation"
mode="print.audit">
+ <xsl:sort data-type="number"
select="@line"/>
+ </xsl:apply-templates>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
</xsl:template>
<!-- list of classes in a package -->
<xsl:template name="classes.list">
- <xsl:param name="name"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="$name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <table width="100%">
- <tr>
- <td nowrap="nowrap">
- <H2><a href="package-summary.html"
target="classFrame"><xsl:value-of
select="$name"/></a></H2>
- </td>
- </tr>
- </table>
-
- <h2>Classes</h2>
- <TABLE WIDTH="100%">
- <xsl:apply-templates select="/classes/class[./@package = $name]"
mode="classes.list">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </TABLE>
- </BODY>
- </HTML>
+ <xsl:param name="name"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"
select="$name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <table width="100%">
+ <tr>
+ <td nowrap="nowrap">
+ <H2><a href="package-summary.html"
target="classFrame"><xsl:value-of
select="$name"/></a></H2>
+ </td>
+ </tr>
+ </table>
+
+ <h2>Classes</h2>
+ <TABLE WIDTH="100%">
+ <xsl:apply-templates select="/classes/class[./@package =
$name]" mode="classes.list">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </TABLE>
+ </BODY>
+ </HTML>
</xsl:template>
<!-- the class to list -->
<xsl:template match="class" mode="classes.list">
- <tr>
- <td nowrap="nowrap">
- <!-- @bug naming to fix for inner classes -->
- <a href="{(a)name}.html" target="classFrame"><xsl:value-of
select="@name"/></a>
- </td>
- </tr>
+ <tr>
+ <td nowrap="nowrap">
+ <!-- @bug naming to fix for inner classes -->
+ <a href="{(a)name}.html"
target="classFrame"><xsl:value-of select="@name"/></a>
+ </td>
+ </tr>
</xsl:template>
<!--
- Creates an all-classes.html file that contains a link to all package-summary.html
- on each class.
+ Creates an all-classes.html file that contains a link to all package-summary.html
+ on each class.
-->
<xsl:template match="classes" mode="all.classes">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"/>
- </xsl:call-template>
- </head>
- <body>
- <h2>Classes</h2>
- <table width="100%">
- <xsl:apply-templates select=".//class" mode="all.classes">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <h2>Classes</h2>
+ <table width="100%">
+ <xsl:apply-templates select=".//class"
mode="all.classes">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </table>
+ </body>
+ </html>
</xsl:template>
<xsl:template match="class" mode="all.classes">
<!-- (ancestor::package)[last()] is buggy in MSXML3 ? -->
<xsl:variable name="package.name" select="@package"/>
- <tr>
- <td nowrap="nowrap">
- <a target="classFrame">
- <xsl:attribute name="href">
- <xsl:if test="not($package.name='')">
- <xsl:value-of
select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
- </xsl:if><xsl:value-of
select="@name"/><xsl:text>.html</xsl:text>
- </xsl:attribute>
- <xsl:value-of select="@name"/>
- </a>
- </td>
- </tr>
+ <tr>
+ <td nowrap="nowrap">
+ <a target="classFrame">
+ <xsl:attribute name="href">
+ <xsl:if test="not($package.name='')">
+ <xsl:value-of
select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
+ </xsl:if><xsl:value-of
select="@name"/><xsl:text>.html</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ </tr>
</xsl:template>
<!--
- Creates an html file that contains a link to all package-summary.html files on
- each package existing on testsuites.
- @bug there will be a problem here, I don't know yet how to handle unnamed package
:(
+ Creates an html file that contains a link to all package-summary.html files on
+ each package existing on testsuites.
+ @bug there will be a problem here, I don't know yet how to handle unnamed package
:(
-->
<xsl:template match="classes" mode="all.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"/>
- </xsl:call-template>
- </head>
- <body>
- <h2><a href="overview-summary.html"
target="classFrame">Home</a></h2>
- <h2>Packages</h2>
- <table width="100%">
- <xsl:apply-templates select="class[not(./@package =
preceding-sibling::class/@package)]" mode="all.packages">
- <xsl:sort select="@package" order="ascending"/>
- </xsl:apply-templates>
- </table>
- </body>
- </html>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <h2><a href="overview-summary.html"
target="classFrame">Home</a></h2>
+ <h2>Packages</h2>
+ <table width="100%">
+ <xsl:apply-templates select="class[not(./@package =
preceding-sibling::class/@package)]" mode="all.packages">
+ <xsl:sort select="@package"
order="ascending"/>
+ </xsl:apply-templates>
+ </table>
+ </body>
+ </html>
</xsl:template>
<xsl:template match="class" mode="all.packages">
- <tr>
- <td nowrap="nowrap">
- <a
href="{translate((a)package,'.','/')}/package-summary.html"
target="classFrame">
- <xsl:value-of select="@package"/>
- </a>
- </td>
- </tr>
+ <tr>
+ <td nowrap="nowrap">
+ <a
href="{translate((a)package,'.','/')}/package-summary.html"
target="classFrame">
+ <xsl:value-of select="@package"/>
+ </a>
+ </td>
+ </tr>
</xsl:template>
<xsl:template match="classes" mode="overview.packages">
- <html>
- <head>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name"/>
- </xsl:call-template>
- </head>
- <body
onload="open('allclasses-frame.html','classListFrame')">
- <xsl:call-template name="pageHeader"/>
- <h3>Summary</h3>
- <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
- <tr>
- <th>Audited classes</th>
- <th>Reported classes</th>
- <th>Violations</th>
- </tr>
- <tr class="a">
- <td><xsl:value-of select="@audited"/></td>
- <td><xsl:value-of select="@reported"/></td>
- <td><xsl:value-of select="@violations"/></td>
- </tr>
- </table>
- <table border="0" width="100%">
- <tr>
- <td style="text-align: justify;">
- Note: Rules checked have originated from style guidelines suggested by the language
designers,
- experience from the Java development community and insite experience. Violations are
generally
- reported with a reference to the <a
href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.do...
Language Specifications</a> (JLS x.x.x)
- and Metamata Audit rules (x.x).
- Please consult these documents for additional information about violations.
- <p/>
- Rules checked also enforce adherence to <a
href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html&qu... Java
coding guidelines</a> in use at Jakarta.
- <p/>
- One should note that these violations do not necessary underline errors but should be
used
- as an indication for <i>possible</i> errors. As always, use your best
judgment and review
- them carefully, it might save you hours of debugging.
- </td>
- </tr>
- </table>
+ <html>
+ <head>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"/>
+ </xsl:call-template>
+ </head>
+ <body
onload="open('allclasses-frame.html','classListFrame')">
+ <xsl:call-template name="pageHeader"/>
+ <h3>Summary</h3>
+ <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
+ <tr>
+ <th>Audited classes</th>
+ <th>Reported classes</th>
+ <th>Violations</th>
+ </tr>
+ <tr class="a">
+ <td><xsl:value-of select="@audited"/></td>
+ <td><xsl:value-of select="@reported"/></td>
+ <td><xsl:value-of select="@violations"/></td>
+ </tr>
+ </table>
+ <table border="0" width="100%">
+ <tr>
+ <td style="text-align: justify;">
+ Note: Rules checked have originated from style guidelines suggested by the
language designers,
+ experience from the Java development community and insite experience. Violations
are generally
+ reported with a reference to the <a
href="http://java.sun.com/docs/books/jls/second_edition/html/jTOC.do...
Language Specifications</a> (JLS x.x.x)
+ and Metamata Audit rules (x.x).
+ Please consult these documents for additional information about violations.
+ <p/>
+ Rules checked also enforce adherence to <a
href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html&qu... Java
coding guidelines</a> in use at Jakarta.
+ <p/>
+ One should note that these violations do not necessary underline errors but
should be used
+ as an indication for <i>possible</i> errors. As always, use your best
judgment and review
+ them carefully, it might save you hours of debugging.
+ </td>
+ </tr>
+ </table>
- <h3>Packages</h3>
- <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
- <xsl:call-template name="class.audit.header"/>
- <xsl:for-each select="class[not(./@package =
preceding-sibling::class/@package)]">
- <xsl:sort select="@package" order="ascending"/>
- <tr>
+ <h3>Packages</h3>
+ <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
+ <xsl:call-template name="class.audit.header"/>
+ <xsl:for-each select="class[not(./@package =
preceding-sibling::class/@package)]">
+ <xsl:sort select="@package"
order="ascending"/>
+ <tr>
<xsl:call-template name="alternate-row"/>
- <td><a
href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of
select="@package"/></a></td>
- <td><xsl:value-of select="sum(/classes/class[./@package =
current()/@package]/@violations)"/></td>
- </tr>
- </xsl:for-each>
- </table>
- <xsl:call-template name="pageFooter"/>
- </body>
- </html>
+ <td><a
href="{translate(@package,'.','/')}/package-summary.html"><xsl:value-of
select="@package"/></a></td>
+ <td><xsl:value-of select="sum(/classes/class[./@package
= current()/@package]/@violations)"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <xsl:call-template name="pageFooter"/>
+ </body>
+ </html>
</xsl:template>
<xsl:template name="package.summary">
- <xsl:param name="name"/>
- <HTML>
- <HEAD>
- <xsl:call-template name="create.stylesheet.link">
- <xsl:with-param name="package.name" select="$name"/>
- </xsl:call-template>
- </HEAD>
- <BODY>
- <xsl:attribute
name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
- <xsl:call-template name="pageHeader"/>
- <h3>Package <xsl:value-of select="$name"/></h3>
-
- <!--table border="0" cellpadding="5" cellspacing="2"
width="100%">
- <xsl:call-template name="class.metrics.header"/>
- <xsl:apply-templates select="." mode="print.metrics"/>
- </table-->
-
- <xsl:if test="count(/classes/class[./@package = $name]) > 0">
- <H3>Classes</H3>
- <table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
- <xsl:call-template name="class.audit.header"/>
- <xsl:apply-templates select="/classes/class[./@package = $name]"
mode="print.audit">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </table>
- </xsl:if>
- <xsl:call-template name="pageFooter"/>
- </BODY>
- </HTML>
+ <xsl:param name="name"/>
+ <HTML>
+ <HEAD>
+ <xsl:call-template name="create.stylesheet.link">
+ <xsl:with-param name="package.name"
select="$name"/>
+ </xsl:call-template>
+ </HEAD>
+ <BODY>
+ <xsl:attribute
name="onload">open('package-frame.html','classListFrame')</xsl:attribute>
+ <xsl:call-template name="pageHeader"/>
+ <h3>Package <xsl:value-of select="$name"/></h3>
+
+ <!--table border="0" cellpadding="5"
cellspacing="2" width="100%">
+ <xsl:call-template name="class.metrics.header"/>
+ <xsl:apply-templates select="."
mode="print.metrics"/>
+ </table-->
+
+ <xsl:if test="count(/classes/class[./@package = $name]) >
0">
+ <H3>Classes</H3>
+ <table class="log" border="0"
cellpadding="5" cellspacing="2" width="100%">
+ <xsl:call-template name="class.audit.header"/>
+ <xsl:apply-templates select="/classes/class[./@package =
$name]" mode="print.audit">
+ <xsl:sort select="@name"/>
+ </xsl:apply-templates>
+ </table>
+ </xsl:if>
+ <xsl:call-template name="pageFooter"/>
+ </BODY>
+ </HTML>
</xsl:template>
@@ -449,23 +412,23 @@
@param path the path to transform into a descending directory path
-->
<xsl:template name="path">
- <xsl:param name="path"/>
- <xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
- <xsl:call-template name="path">
- <xsl:with-param name="path"><xsl:value-of
select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="not(contains($path,'.')) and not($path =
'')">
- <xsl:text>../</xsl:text>
- </xsl:if>
+ <xsl:param name="path"/>
+ <xsl:if test="contains($path,'.')">
+ <xsl:text>../</xsl:text>
+ <xsl:call-template name="path">
+ <xsl:with-param name="path"><xsl:value-of
select="substring-after($path,'.')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="not(contains($path,'.')) and not($path =
'')">
+ <xsl:text>../</xsl:text>
+ </xsl:if>
</xsl:template>
<!-- create the link to the stylesheet based on the package name -->
<xsl:template name="create.stylesheet.link">
- <xsl:param name="package.name"/>
- <LINK REL ="stylesheet" TYPE="text/css"
TITLE="Style"><xsl:attribute name="href"><xsl:if
test="not($package.name = 'unnamed package')"><xsl:call-template
name="path"><xsl:with-param name="path"
select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
+ <xsl:param name="package.name"/>
+ <LINK REL ="stylesheet" TYPE="text/css"
TITLE="Style"><xsl:attribute name="href"><xsl:if
test="not($package.name = 'unnamed package')"><xsl:call-template
name="path"><xsl:with-param name="path"
select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
</xsl:template>
<!-- Page HEADER -->
@@ -479,60 +442,52 @@
<img
src="http://jakarta.apache.org/images/jakarta-logo.gif"
alt="http://jakarta.apache.org" align="left"
border="0"/>
</a>
</td>
- <td style="text-align:right"><h2>Source Code
Audit</h2></td>
- </tr>
- <tr>
- <td style="text-align:right">Designed for use with <a
href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata
Audit</a> and <a
href='http://jakarta.apache.org'>Ant</a>.</td>
- </tr>
+ <td style="text-align:right"><h2>Source Code
Audit</h2></td>
+ </tr>
+ <tr>
+ <td style="text-align:right">Designed for use with <a
href='http://www.webgain.com/products/quality_analyzer/'>Webgain QA/Metamata
Audit</a> and <a
href='http://jakarta.apache.org'>Ant</a>.</td>
+ </tr>
</table>
- <hr size="1"/>
+ <hr size="1"/>
</xsl:template>
<!-- Page HEADER -->
<xsl:template name="pageFooter">
- <table width="100%">
- <tr><td><hr noshade="yes"
size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76"
size="-1"><em>
- Copyright © 1999-2001, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</xsl:template>
<!-- class header -->
<xsl:template name="class.audit.header">
- <tr>
- <th width="80%">Name</th>
- <th>Violations</th>
- </tr>
+ <tr>
+ <th width="80%">Name</th>
+ <th>Violations</th>
+ </tr>
</xsl:template>
<!-- method header -->
<xsl:template name="violation.audit.header">
- <tr>
- <th>Line</th>
- <th>Message</th>
- </tr>
+ <tr>
+ <th>Line</th>
+ <th>Message</th>
+ </tr>
</xsl:template>
<!-- class information -->
<xsl:template match="class" mode="print.audit">
- <tr>
+ <tr>
<xsl:call-template name="alternate-row"/>
- <td><a href="{@name}.html"><xsl:value-of
select="@name"/></a></td>
- <td><xsl:apply-templates select="@violations"/></td>
- </tr>
+ <td><a href="{@name}.html"><xsl:value-of
select="@name"/></a></td>
+ <td><xsl:apply-templates select="@violations"/></td>
+ </tr>
</xsl:template>
<xsl:template match="violation" mode="print.audit">
- <tr>
+ <tr>
<xsl:call-template name="alternate-row"/>
- <td><xsl:value-of select="@line"/></td>
- <td><xsl:apply-templates select="@message"/></td>
- </tr>
+ <td><xsl:value-of select="@line"/></td>
+ <td><xsl:apply-templates select="@message"/></td>
+ </tr>
</xsl:template>
<!-- alternated row style -->
@@ -544,4 +499,4 @@
</xsl:template>
</xsl:stylesheet>
-
+
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/mmetrics-frames.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/mmetrics-frames.xsl 2007-07-17 19:26:55 UTC
(rev 7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/mmetrics-frames.xsl 2007-07-17 22:53:37 UTC
(rev 7810)
@@ -1,67 +1,30 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:xalan="http://xml.apache.org/xalan"
- xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:redirect="org.apache.xalan.lib.Redirect"
exclude-result-prefixes="xalan"
extension-element-prefixes="redirect">
<xsl:output method="html" indent="yes"
encoding="US-ASCII"/>
<xsl:decimal-format decimal-separator="." grouping-separator=","
/>
<!--
- The Apache Software License, Version 1.1
+ 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
- Copyright (c) 2001-2002 The Apache Software Foundation. All rights
- reserved.
+
http://www.apache.org/licenses/LICENSE-2.0
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The end-user documentation included with the redistribution, if
- any, must include the following acknowlegement:
- "This product includes software developed by the
- Apache Software Foundation (
http://www.apache.org/)."
- Alternately, this acknowlegement may appear in the software itself,
- if and wherever such third-party acknowlegements normally appear.
-
- 4. The names "The Jakarta Project", "Ant", and "Apache
Software
- Foundation" must not be used to endorse or promote products derived
- from this software without prior written permission. For written
- permission, please contact apache(a)apache.org.
-
- 5. Products derived from this software may not be called "Apache"
- nor may "Apache" appear in their names without prior written
- permission of the Apache Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the Apache Software Foundation. For more
- information on the Apache Software Foundation, please see
- <
http://www.apache.org/>.
- -->
+ 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.
+-->
<!--
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
- -->
+ -->
<xsl:param name="output.dir" select="'.'"/>
<!-- default max value for the metrics -->
@@ -115,7 +78,7 @@
<redirect:write file="{$output.dir}/metrics-reference.html">
<xsl:call-template name="metrics-reference.html"/>
</redirect:write>
-
+
<!-- create the overview-packages.html at the root -->
<redirect:write file="{$output.dir}/overview-summary.html">
<xsl:apply-templates select="." mode="overview.packages"/>
@@ -125,12 +88,12 @@
<redirect:write file="{$output.dir}/overview-frame.html">
<xsl:apply-templates select="." mode="all.packages"/>
</redirect:write>
-
+
<!-- create the all-classes.html at the root -->
<redirect:write file="{$output.dir}/allclasses-frame.html">
<xsl:apply-templates select="." mode="all.classes"/>
</redirect:write>
-
+
<!-- process all packages -->
<xsl:apply-templates select=".//package"/>
</xsl:template>
@@ -141,17 +104,17 @@
<xsl:variable name="package.dir">
<xsl:if test="not($package.name = 'unnamed
package')"><xsl:value-of
select="translate($package.name,'.','/')"/></xsl:if>
<xsl:if test="$package.name = 'unnamed
package'">.</xsl:if>
- </xsl:variable>
+ </xsl:variable>
<!-- create a classes-list.html in the package directory -->
<redirect:write
file="{$output.dir}/{$package.dir}/package-frame.html">
<xsl:apply-templates select="." mode="classes.list"/>
</redirect:write>
-
+
<!-- create a package-summary.html in the package directory -->
<redirect:write
file="{$output.dir}/{$package.dir}/package-summary.html">
<xsl:apply-templates select="." mode="package.summary"/>
</redirect:write>
-
+
<!-- for each class, creates a @name.html -->
<!-- @bug there will be a problem with inner classes having the same name, it will
be overwritten -->
<xsl:for-each select="$doctree/classes/class[@package =
current()/@name]">
@@ -493,10 +456,10 @@
background-color:#FFFFFF;
color:#000000;
}
- .a td {
+ .a td {
background: #efefef;
}
- .b td {
+ .b td {
background: #fff;
}
th, td {
@@ -513,7 +476,7 @@
border: none
}
table.log tr td, tr th {
-
+
}
h2 {
font-weight:bold;
@@ -549,19 +512,19 @@
</HEAD>
<BODY>
<xsl:call-template name="pageHeader"/>
-
+
<H3>Class <xsl:if test="not($package.name = 'unnamed
package')"><xsl:value-of
select="$package.name"/>.</xsl:if><xsl:value-of
select="@name"/></H3>
<table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
<xsl:call-template name="all.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table>
-
+
<H3>Methods</H3>
<table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
<xsl:call-template name="method.metrics.header"/>
<xsl:apply-templates select="method"
mode="print.metrics"/>
</table>
-
+
<xsl:call-template name="pageFooter"/>
</BODY>
</HTML>
@@ -584,7 +547,7 @@
</td>
</tr>
</table>
-
+
<H2>Classes</H2>
<TABLE WIDTH="100%">
<!-- xalan-nodeset:nodeset for Xalan 1.2.2 -->
@@ -594,7 +557,7 @@
<td nowrap="nowrap">
<a href="{(a)name}.html"
target="classFrame"><xsl:value-of select="@name"/></a>
</td>
- </tr>
+ </tr>
</xsl:for-each>
</TABLE>
</BODY>
@@ -705,7 +668,7 @@
<th><a
href="metrics-reference.html#NOCL">NOCL</a></th>
</tr>
<xsl:apply-templates select="." mode="print.metrics"/>
- </table>
+ </table>
<table border="0" width="100%">
<tr>
<td style="text-align: justify;">
@@ -748,12 +711,12 @@
<xsl:call-template name="pageHeader"/>
<!-- create an anchor to this package name -->
<h3>Package <xsl:value-of select="@name"/></h3>
-
+
<table class="log" border="0" cellpadding="5"
cellspacing="2" width="100%">
<xsl:call-template name="all.metrics.header"/>
<xsl:apply-templates select="." mode="print.metrics"/>
</table>
-
+
<table border="0" width="100%">
<tr>
<td style="text-align: justify;">
@@ -770,7 +733,7 @@
</td>
</tr>
</table>
-
+
<xsl:variable name="classes-in-package"
select="$doctree/classes/class[@package = current()/@name]"/>
<xsl:if test="count($classes-in-package) > 0">
<H3>Classes</H3>
@@ -782,7 +745,7 @@
</xsl:for-each>
</table>
</xsl:if>
-
+
<xsl:call-template name="pageFooter"/>
</body>
</HTML>
@@ -796,13 +759,13 @@
<xsl:template name="path">
<xsl:param name="path"/>
<xsl:if test="contains($path,'.')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
<xsl:call-template name="path">
<xsl:with-param name="path"><xsl:value-of
select="substring-after($path,'.')"/></xsl:with-param>
- </xsl:call-template>
+ </xsl:call-template>
</xsl:if>
<xsl:if test="not(contains($path,'.')) and not($path =
'')">
- <xsl:text>../</xsl:text>
+ <xsl:text>../</xsl:text>
</xsl:if>
</xsl:template>
@@ -836,14 +799,6 @@
<!-- Page Footer -->
<xsl:template name="pageFooter">
- <table width="100%">
- <tr><td><hr noshade="yes"
size="1"/></td></tr>
- <tr><td>
- <div align="center"><font color="#525D76"
size="-1"><em>
- Copyright © 1999-2001, Apache Software Foundation
- </em></font></div>
- </td></tr>
- </table>
</xsl:template>
<!-- class header -->
@@ -979,7 +934,7 @@
<xsl:with-param name="max" select="$loc.max"/>
</xsl:call-template>
</xsl:template>
-
+
<xsl:template match="@dit">
<xsl:call-template name="display-value">
<xsl:with-param name="value" select="current()"/>
@@ -1067,4 +1022,4 @@
</xsl:template>
</xsl:stylesheet>
-
+
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/tagdiff.xsl
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/tagdiff.xsl 2007-07-17 19:26:55 UTC (rev
7809)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/tagdiff.xsl 2007-07-17 22:53:37 UTC (rev
7810)
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<!-- a stylesheet to display changelogs ala netbeans -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -2,3 +18,2 @@
version="1.0">
-
<xsl:param name="title"/>
@@ -20,11 +35,9 @@
</xsl:template>
<xsl:template match="tagdiff">
- <HTML>
- <HEAD>
- <TITLE><xsl:value-of select="$title"/></TITLE>
- </HEAD>
- <BODY link="#000000" alink="#000000"
vlink="#000000" text="#000000">
+ <html>
+ <head>
+ <title><xsl:value-of select="$title"/></title>
<style type="text/css">
body, p {
font-family: verdana,arial,helvetica;
@@ -43,13 +56,15 @@
font-size: 80%;
background:#eeeee0;
}
- </style>
+ </style>
+ </head>
+ <body link="#000000" alink="#000000"
vlink="#000000" text="#000000">
<h1>
<a name="top"><xsl:value-of
select="$title"/></a>
</h1>
Tagdiff between <xsl:value-of select="@startTag"/>
<xsl:value-of select="@startDate"/> and
<xsl:value-of select="@endTag"/> <xsl:value-of
select="@endDate"/>
- <p align="right">Designed for use with <a
href="http://jakarta.apache.org">Ant</a>.</p>
+ <p align="right">Designed for use with <a
href="http://ant.apache.org/">Ant</a>.</p>
<hr size="2"/>
<a name="TOP"/>
<table width="100%">
@@ -61,7 +76,7 @@
</td>
</tr>
</table>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3"
CELLSPACING="1">
+ <table border="0" width="100%" cellpadding="3"
cellspacing="1">
<xsl:call-template name="show-entries">
<xsl:with-param name="title">New Files</xsl:with-param>
<xsl:with-param name="anchor">New</xsl:with-param>
@@ -74,40 +89,41 @@
<xsl:with-param name="entries"
select=".//entry[file/revision][file/prevrevision]"/>
</xsl:call-template>
+ <!-- change to entries select to address bug #36827 -->
<xsl:call-template name="show-entries">
<xsl:with-param name="title">Removed Files</xsl:with-param>
<xsl:with-param name="anchor">Removed</xsl:with-param>
- <xsl:with-param name="entries"
select=".//entry[not(file/revision)][not(file/prevrevision)]"/>
+ <xsl:with-param name="entries"
select=".//entry[not(file/revision)][file/prevrevision]"/>
</xsl:call-template>
- </TABLE>
+ </table>
- </BODY>
- </HTML>
+ </body>
+ </html>
</xsl:template>
<xsl:template name="show-entries">
<xsl:param name="title"/>
<xsl:param name="anchor"/>
<xsl:param name="entries"/>
- <TR>
- <TD colspan="2" class="dateAndAuthor">
+ <tr>
+ <td colspan="2" class="dateAndAuthor">
<a>
<xsl:attribute name="name"><xsl:value-of
select="$anchor"/></xsl:attribute>
<xsl:value-of select="$title"/> - <xsl:value-of
select="count($entries)"/> entries
</a>
<a href="#TOP">(back to top)</a>
- </TD>
- </TR>
- <TR>
- <TD width="20">
+ </td>
+ </tr>
+ <tr>
+ <td width="20">
<xsl:text> </xsl:text>
- </TD>
- <TD>
+ </td>
+ <td>
<ul>
<xsl:apply-templates select="$entries"/>
</ul>
- </TD>
- </TR>
+ </td>
+ </tr>
</xsl:template>
<xsl:template match="entry">
Modified: branches/JBoss_Portal_Branch_2_6/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_6/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_6/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_6/tools/lib/ant.jar
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_6/tools/lib/xercesImpl.jar
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_6/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)