| New file |
| | |
| | | #! /bin/sh |
| | | |
| | | # 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. |
| | | |
| | | # 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 |
| | | |
| | | # 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 |
| | | |
| | | # 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. |
| | | cygwin=false; |
| | | darwin=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true ;; |
| | | Darwin*) darwin=true |
| | | if [ -z "$JAVA_HOME" ] ; then |
| | | JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home |
| | | fi |
| | | ;; |
| | | esac |
| | | |
| | | 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"` |
| | | |
| | | # need this for relative symlinks |
| | | while [ -h "$PRG" ] ; do |
| | | ls=`ls -ld "$PRG"` |
| | | link=`expr "$ls" : '.*-> \(.*\)$'` |
| | | if expr "$link" : '/.*' > /dev/null; then |
| | | PRG="$link" |
| | | else |
| | | PRG=`dirname "$PRG"`"/$link" |
| | | fi |
| | | done |
| | | |
| | | ANT_HOME=`dirname "$PRG"`/.. |
| | | |
| | | # make it fully qualified |
| | | ANT_HOME=`cd "$ANT_HOME" && pwd` |
| | | fi |
| | | |
| | | # For Cygwin, ensure paths are in UNIX format before anything is touched |
| | | if $cygwin ; then |
| | | [ -n "$ANT_HOME" ] && |
| | | ANT_HOME=`cygpath --unix "$ANT_HOME"` |
| | | [ -n "$JAVA_HOME" ] && |
| | | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` |
| | | fi |
| | | |
| | | # set ANT_LIB location |
| | | ANT_LIB="${ANT_HOME}/lib" |
| | | |
| | | if [ -z "$JAVACMD" ] ; then |
| | | if [ -n "$JAVA_HOME" ] ; then |
| | | # 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=`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 |
| | | |
| | | # 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)" |
| | | |
| | | # 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 |
| | | |
| | | # 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 |
| | | |
| | | # 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="${JAVA_HOME}/../Classes" |
| | | if [ -d "${OSXHACK}" ] ; then |
| | | for i in "${OSXHACK}"/*.jar |
| | | do |
| | | JIKESPATH="$JIKESPATH:$i" |
| | | done |
| | | fi |
| | | fi |
| | | fi |
| | | |
| | | # Allow Jikes support (off by default) |
| | | if $usejikes; then |
| | | ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes" |
| | | fi |
| | | |
| | | # 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 |
| | | 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 |
| | | ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\"" |
| | | else |
| | | ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\"" |
| | | fi |
| | | else |
| | | if [ -n "$JIKESPATH" ]; then |
| | | 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 |
| New file |
| | |
| | | @echo off |
| | | |
| | | 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 ANT_HOME=%~dp0.. |
| | | |
| | | :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). |
| | | set ANT_CMD_LINE_ARGS=%1 |
| | | if ""%1""=="""" goto doneStart |
| | | 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 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%\lib\ant.jar" goto checkJava |
| | | |
| | | 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\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\lib\ant.jar goto noAntHome |
| | | set ANT_HOME=C:\ant |
| | | goto checkJava |
| | | |
| | | :noAntHome |
| | | echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME. |
| | | goto end |
| | | |
| | | :checkJava |
| | | set _JAVACMD=%JAVACMD% |
| | | |
| | | if "%JAVA_HOME%" == "" goto noJavaHome |
| | | if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome |
| | | if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe |
| | | goto checkJikes |
| | | |
| | | :noJavaHome |
| | | if "%_JAVACMD%" == "" set _JAVACMD=java.exe |
| | | |
| | | :checkJikes |
| | | if not "%JIKESPATH%"=="" goto runAntWithJikes |
| | | |
| | | :runAnt |
| | | 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 |
| | | |
| | | 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 |
| | | 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 |
| | | |
| | | 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 |
| | | |
| New file |
| | |
| | | /* |
| | | 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.
|
| | | |
| | | Run ant
|
| | | */
|
| | |
|
| | | '@echo off'
|
| | | parse arg mode envarg '::' antarg
|
| | |
|
| | | if mode\='.' & mode\='..' & mode\='/' then do
|
| | | envarg = mode envarg
|
| | | mode = ''
|
| | | end
|
| | |
|
| | | if antarg = '' then do
|
| | | antarg = envarg
|
| | | envarg = ''
|
| | | end
|
| | |
|
| | | x = setlocal()
|
| | |
|
| | | env="OS2ENVIRONMENT"
|
| | | antenv = _getenv_('antenv')
|
| | | if _testenv_() = 0 then interpret 'call "' || antenv || '"' '"' || envarg || '"'
|
| | |
|
| | | if mode = '' then mode = _getenv_('ANT_MODE' '..')
|
| | | if mode \= '/' then do
|
| | | runrc = _getenv_('runrc')
|
| | | antrc = _getenv_('antrc' 'antrc.cmd')
|
| | | if mode = '..' then mode = '-r'
|
| | | else mode = ''
|
| | | interpret 'call "' || runrc || '"' antrc '"' || mode || '"'
|
| | | end
|
| | |
|
| | | if _testenv_() = 0 then do
|
| | | say 'Ant environment is not set properly'
|
| | | x = endlocal()
|
| | | exit 16
|
| | | end
|
| | |
|
| | | settings = '-Dant.home=' || ANT_HOME '-Djava.home=' || JAVA_HOME
|
| | |
|
| | | java = _getenv_('javacmd' 'java')
|
| | | opts = value('ANT_OPTS',,env)
|
| | | args = value('ANT_ARGS',,env)
|
| | | lcp = value('LOCALCLASSPATH',,env)
|
| | | cp = value('CLASSPATH',,env)
|
| | | if value('ANT_USE_CP',,env) \= '' then do
|
| | | if lcp \= '' & right(lcp, 1) \= ';' then lcp = lcp || ';'
|
| | | lcp = lcp || cp
|
| | | 'SET CLASSPATH='
|
| | | end
|
| | | if lcp\='' then lcp = '-classpath' lcp
|
| | |
|
| | | cmd = java opts lcp '-jar' ANT_HOME ||'\lib\ant-launcher.jar' settings args antarg
|
| | | launcher = stream(ANT_HOME ||'\lib\ant-launcher.jar', 'C', 'query exists')
|
| | | if launcher = '' then entry = 'org.apache.tools.ant.Main'
|
| | | else entry = 'org.apache.tools.ant.launch.Launcher'
|
| | | java opts lcp entry settings args antarg
|
| | |
|
| | | x = endlocal()
|
| | |
|
| | | return rc
|
| | |
|
| | | _testenv_: procedure expose env ANT_HOME JAVA_HOME
|
| | | ANT_HOME = value('ANT_HOME',,env)
|
| | | if ANT_HOME = '' then return 0
|
| | | JAVA_HOME = value('JAVA_HOME',,env)
|
| | | if JAVA_HOME = '' then return 0
|
| | | cp = translate(value('CLASSPATH',,env))
|
| | | if pos(translate(ANT_HOME), cp) = 0 then return 0
|
| | | if pos(translate(JAVA_HOME), cp) = 0 then return 0
|
| | | return 1
|
| | |
|
| | | _getenv_: procedure expose env
|
| | | parse arg envar default
|
| | | if default = '' then default = envar
|
| | | var = value(translate(envar),,env)
|
| | | if var = '' then var = default
|
| | | return var
|
| New file |
| | |
| | | #! /bin/sh |
| | | |
| | | # 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" |
| | | CMD="$2" |
| | | shift |
| | | shift |
| | | |
| | | exec "$CMD" "$@" |
| New file |
| | |
| | | @echo off |
| | | |
| | | 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" 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 arguments (up to the command line limit, anyway). |
| | | set ANT_RUN_CMD=%1 |
| | | if ""%1""=="""" goto runCommand |
| | | shift |
| | | :loop |
| | | if ""%1""=="""" goto runCommand |
| | | set ANT_RUN_CMD=%ANT_RUN_CMD% %1 |
| | | shift |
| | | goto loop |
| | | |
| | | :runCommand |
| | | rem echo %ANT_RUN_CMD% |
| | | %ANT_RUN_CMD% |
| | | |
| | | if "%OS%"=="Windows_NT" @endlocal |
| | | if "%OS%"=="WINNT" @endlocal |
| | | |
| New file |
| | |
| | | #!/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 |
| | | # |
| | | # wrapper script for invoking commands on a platform with Perl installed |
| | | # this is akin to antRun.bat, and antRun the SH script |
| | | # |
| | | # created: 2001-10-18 |
| | | # author: Jeff Tulley jtulley@novell.com |
| | | ####################################################################### |
| | | #be fussy about variables |
| | | use strict; |
| | | |
| | | #turn warnings on during dev; generates a few spurious uninitialised var access warnings |
| | | #use warnings; |
| | | |
| | | #and set $debug to 1 to turn on trace info (currently unused) |
| | | my $debug=1; |
| | | |
| | | ####################################################################### |
| | | # change drive and directory to "%1" |
| | | my $ANT_RUN_CMD = @ARGV[0]; |
| | | |
| | | # assign current run command to "%2" |
| | | chdir (@ARGV[0]) || die "Can't cd to $ARGV[0]: $!\n"; |
| | | if ($^O eq "NetWare") { |
| | | # There is a bug in Perl 5 on NetWare, where chdir does not |
| | | # do anything. On NetWare, the following path-prefixed form should |
| | | # always work. (afaict) |
| | | $ANT_RUN_CMD .= "/".@ARGV[1]; |
| | | } |
| | | else { |
| | | $ANT_RUN_CMD = @ARGV[1]; |
| | | } |
| | | |
| | | # dispose of the first two arguments, leaving only the command's args. |
| | | shift; |
| | | shift; |
| | | |
| | | # run the command |
| | | my $returnValue = system $ANT_RUN_CMD, @ARGV; |
| | | if ($returnValue eq 0) { |
| | | exit 0; |
| | | } |
| | | else { |
| | | # only 0 and 1 are widely recognized as exit values |
| | | # so change the exit value to 1 |
| | | exit 1; |
| | | } |
| New file |
| | |
| | | /* |
| | | 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.
|
| | | */
|
| | |
|
| | | '@echo off'
|
| | | call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
|
| | | call SysLoadFuncs
|
| | |
|
| | | /* Prepare the parameters for later use */
|
| | | parse arg argv
|
| | | mode = ''
|
| | | args = ''
|
| | | opts = ''
|
| | | cp = ''
|
| | | lcp = ''
|
| | |
|
| | | do i = 1 to words(argv)
|
| | | param = word(argv, i)
|
| | | select
|
| | | when param='-lcp' then mode = 'l'
|
| | | when param='-cp' | param='-classpath' then mode = 'c'
|
| | | when abbrev('-opts', param, 4) then mode = 'o'
|
| | | when abbrev('-args', param, 4) then mode = 'a'
|
| | | otherwise
|
| | | select
|
| | | when mode = 'a' then args = space(args param, 1)
|
| | | when mode = 'c' then cp = space(cp param, 1)
|
| | | when mode = 'l' then lcp = space(lcp param, 1)
|
| | | when mode = 'o' then opts = space(opts param, 1)
|
| | | otherwise
|
| | | say 'Option' param 'ignored'
|
| | | end
|
| | | end
|
| | | end
|
| | |
|
| | | env="OS2ENVIRONMENT"
|
| | | antconf = _getenv_('antconf' 'antconf.cmd')
|
| | | runrc = _getenv_('runrc')
|
| | | interpret 'call "' || runrc || '"' '"' || antconf || '"' 'ETC'
|
| | | ANT_HOME = value('ANT_HOME',,env)
|
| | | JAVA_HOME = value('JAVA_HOME',,env)
|
| | | classpath = value('CLASSPATH',,env)
|
| | | classes = stream(JAVA_HOME || "\lib\classes.zip", "C", "QUERY EXISTS")
|
| | | if classes \= '' then classpath = prepend(classpath classes)
|
| | | classes = stream(JAVA_HOME || "\lib\tools.jar", "C", "QUERY EXISTS")
|
| | | if classes \= '' then classpath = prepend(classpath classes)
|
| | |
|
| | | classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar')
|
| | | 'SET CLASSPATH=' || classpath
|
| | |
|
| | | /* Setting classpathes, options and arguments */
|
| | | envset = _getenv_('envset')
|
| | | if cp\='' then interpret 'call "' || envset || '"' '"; CLASSPATH"' '"' || cp || '"'
|
| | | if lcp\='' then interpret 'call "' || envset || '"' '"; LOCALCLASSPATH"' '"' || lcp || '"'
|
| | | if opts\='' then interpret 'call "' || envset || '"' '"-D ANT_OPTS"' '"' || opts || '"'
|
| | | if args\='' then interpret 'call "' || envset || '"' '"ANT_ARGS"' '"' || args || '"'
|
| | |
|
| | | exit 0
|
| | |
|
| | | addpath: procedure
|
| | | parse arg path elem
|
| | | if elem = '' then do
|
| | | if path\='' & right(path, 1)\=';' then path = path || ';'
|
| | | return path
|
| | | end
|
| | | if substr(path, length(path)) = ';' then glue = ''
|
| | | else glue = ';'
|
| | | if pos(translate(elem), translate(path)) = 0 then path = path || glue || elem || ';'
|
| | | return path
|
| | |
|
| | | prepend: procedure
|
| | | parse arg path elem
|
| | | if elem = '' then do
|
| | | if path\='' & right(path, 1)\=';' then path = path || ';'
|
| | | return path
|
| | | end
|
| | | if pos(translate(elem), translate(path)) = 0 then path = elem || ';' || path
|
| | | return path
|
| | |
|
| | | _getenv_: procedure expose env
|
| | | parse arg envar default
|
| | | if default = '' then default = envar
|
| | | var = value(translate(envar),,env)
|
| | | if var = '' then var = default
|
| | | return var
|
| New file |
| | |
| | | #!/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. |
| | | # |
| | | # 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: |
| | | # |
| | | # $ complete -C complete-ant-cmd ant build.sh |
| | | # |
| | | # To install for Z-Shell 2.5 or better, add the following to ~/.zshrc: |
| | | # |
| | | # function ant_complete () { |
| | | # local args_line args |
| | | # read -l args_line |
| | | # set -A args $args_line |
| | | # set -A reply $(COMP_LINE=$args_line complete-ant-cmd ${args[1]} $1) |
| | | # } |
| | | # compctl -K ant_complete ant build.sh |
| | | # |
| | | # @author Mike Williams <mikew@cortexebusiness.com.au> |
| | | |
| | | my $cmdLine = $ENV{'COMP_LINE'}; |
| | | my $antCmd = $ARGV[0]; |
| | | my $word = $ARGV[1]; |
| | | |
| | | my @completions; |
| | | if ($word =~ /^-/) { |
| | | list( restrict( $word, getArguments() )); |
| | | } elsif ($cmdLine =~ /-(f|buildfile)\s+\S*$/) { |
| | | list( getBuildFiles($word) ); |
| | | } else { |
| | | list( restrict( $word, getTargets() )); |
| | | } |
| | | |
| | | exit(0); |
| | | |
| | | sub list { |
| | | for (@_) { |
| | | print "$_\n"; |
| | | } |
| | | } |
| | | |
| | | sub restrict { |
| | | my ($word, @completions) = @_; |
| | | grep( /^\Q$word\E/, @completions ); |
| | | } |
| | | |
| | | sub getArguments { |
| | | qw(-buildfile -debug -emacs -f -find -help -listener -logfile |
| | | -logger -projecthelp -quiet -verbose -version); |
| | | } |
| | | |
| | | |
| | | sub getBuildFiles { |
| | | my ($word) = @_; |
| | | grep( /\.xml$/, glob( "$word*" )); |
| | | } |
| | | |
| | | sub getTargets { |
| | | |
| | | # Look for build-file |
| | | my $buildFile = 'build.xml'; |
| | | if ($cmdLine =~ /-(f|buildfile)\s+(\S+)/) { |
| | | $buildFile = $2; |
| | | } |
| | | return () unless (-f $buildFile); |
| | | |
| | | # Run "ant -projecthelp" to list targets. Keep a cache of results in a |
| | | # cache-file. |
| | | my $cacheFile = $buildFile; |
| | | $cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|; |
| | | if ((!-e $cacheFile) || (-M $buildFile) < (-M $cacheFile)) { |
| | | open( CACHE, '>'.$cacheFile ) || die "can\'t write $cacheFile: $!\n"; |
| | | open( HELP, "$antCmd -projecthelp -f '$buildFile'|" ) || return(); |
| | | my %targets; |
| | | while( <HELP> ) { |
| | | if (/^\s+(\S+)/) { |
| | | $targets{$1}++; |
| | | } |
| | | } |
| | | my @targets = sort keys %targets; |
| | | for (@targets) { print CACHE "$_\n"; } |
| | | return @targets; |
| | | } |
| | | |
| | | # Read the target-cache |
| | | open( CACHE, $cacheFile ) || die "can\'t read $cacheFile: $!\n"; |
| | | my @targets; |
| | | while (<CACHE>) { |
| | | chop; |
| | | s/\r$//; # for Cygwin |
| | | push( @targets, $_ ); |
| | | } |
| | | close( CACHE ); |
| | | @targets; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | /*
|
| | |
|
| | | 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.
|
| | |
|
| | | SET environment variables
|
| | | First optional parameter:
|
| | | ; parameters are considered parts of a path variable, semicolons are
|
| | | appended to each element if not already present
|
| | | -D parameters are properties for Java or Makefile etc., -D will be
|
| | | prepended and the parameters will be separated by a space
|
| | | =D the same as above but equal sign is not required
|
| | | , parameters should be comma separated in the environment variable
|
| | | - parameters should be separated by the next parameter
|
| | | Other values mean that the first parameter is missing and the environment
|
| | | variable will be set to the space separated parameters
|
| | |
|
| | | Second parameter: name of the environment variable
|
| | |
|
| | | Next parameters: values
|
| | | ; implies that the equal sign is considered a part of the parameter and is
|
| | | not interpreted
|
| | |
|
| | | -D requires parameters in the form name=value. If the equal sign is not found,
|
| | | the parameters are changed to name=expanded_name
|
| | |
|
| | | Other options have optional equal sign. If it is found, only the part after
|
| | | the equal sign will be oprionally expanded.
|
| | |
|
| | | If the parameter is the minus sign, the next parameter will not be expanded.
|
| | | If the parameter is a single dot, it will be replaced with the value of the
|
| | | environment variable as it existed before envset was invoked.
|
| | |
|
| | | For other parameters the batch looks for the environment variable with the
|
| | | same name (in uppercase). If it is found, it forms the expanded_name. If
|
| | | the environment variable with such a name does not exist, the expanded_name
|
| | | will hold the parameter name without case conversion.
|
| | | */
|
| | |
|
| | | parse arg mode envar args
|
| | |
|
| | | equal = 0
|
| | | sep = ' '
|
| | |
|
| | | /* Parse command line parameters */
|
| | | select
|
| | | when mode='-' then do
|
| | | sep = envar
|
| | | parse var args envar args
|
| | | end
|
| | | when mode=';' then do
|
| | | sep = ''
|
| | | equal = -1
|
| | | end
|
| | | when mode='-D' then equal = 1
|
| | | when mode='=D' then mode = '-D'
|
| | | when mode=',' then sep = ','
|
| | | otherwise
|
| | | args = envar args
|
| | | envar = mode
|
| | | mode = ''
|
| | | end
|
| | |
|
| | | env = 'OS2ENVIRONMENT'
|
| | | envar = translate(envar)
|
| | | orig = value(envar,,env)
|
| | | newval = ''
|
| | | expand = 1
|
| | |
|
| | | /* for each parameter... */
|
| | | do i = 1 to words(args)
|
| | | if expand > 0 & word(args, i) = '-' then expand = 0
|
| | | else call addval word(args, i)
|
| | | end
|
| | |
|
| | | /* Optionally enclose path variable by quotes */
|
| | | if mode = ';' & pos(' ', newval) > 0 then newval = '"' || newval || '"'
|
| | |
|
| | | /* Set the new value, 'SET' cannot be used since it does not allow '=' */
|
| | | x = value(envar, newval, env)
|
| | | exit 0
|
| | |
|
| | | addval: procedure expose sep equal orig expand newval mode env
|
| | | parse arg var
|
| | |
|
| | | if var = '.' then expvar = orig
|
| | | else do
|
| | | if equal >= 0 then do
|
| | | parse var var name '=' val
|
| | | if val = '' then var = name
|
| | | else var = val
|
| | | end
|
| | | if expand = 0 then expvar = var
|
| | | else expvar = value(translate(var),,env)
|
| | | if expvar = '' then expvar = var
|
| | | if equal >= 0 then do
|
| | | if val = '' then do
|
| | | parse var expvar key '=' val
|
| | | if val <> '' then name = key
|
| | | else do
|
| | | if equal > 0 then val = key
|
| | | else name = key
|
| | | end
|
| | | end
|
| | | else val = expvar
|
| | | if pos(' ', val) > 0 | pos('=', val) > 0 then val = '"' || val || '"'
|
| | | if val = '' then expvar = name
|
| | | else expvar = name || '=' || val
|
| | | end
|
| | | if mode = '-D' then expvar = '-D' || expvar
|
| | | if mode = ';' then do
|
| | | if right(expvar, 1) <> ';' then expvar = expvar || ';'
|
| | | end
|
| | | end
|
| | |
|
| | | if newval = '' then newval = expvar
|
| | | else newval = newval || sep || expvar
|
| | | expand = 1
|
| | | return
|
| New file |
| | |
| | | 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 |
| | | shift |
| | | |
| | | :argCheck |
| | | if ""%1""=="""" goto gotAllArgs |
| | | set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1 |
| | | shift |
| | | goto argCheck |
| | | |
| | | :gotAllArgs |
| | | set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT% |
| | | |
| New file |
| | |
| | | #!/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. |
| | | # |
| | | ####################################################################### |
| | | # |
| | | # runant.pl |
| | | # |
| | | # wrapper script for invoking ant in a platform with Perl installed |
| | | # this may include cgi-bin invocation, which is considered somewhat daft. |
| | | # (slo: that should be a separate file which can be derived from this |
| | | # and returns the XML formatted output) |
| | | # |
| | | # the code is not totally portable due to classpath and directory splitting |
| | | # issues. oops. (NB, use File::Spec::Functions will help and the code is |
| | | # structured for the catfile() call, but because of perl version funnies |
| | | # the code is not included. |
| | | # |
| | | # created: 2000-8-24 |
| | | # author: Steve Loughran steve_l@sourceforge.net |
| | | ####################################################################### |
| | | # |
| | | # Assumptions: |
| | | # |
| | | # - the "java" executable/script is on the command path |
| | | # - ANT_HOME has been set |
| | | # - target platform uses ":" as classpath separator or perl indicates it is dos/win32 |
| | | # - target platform uses "/" as directory separator. |
| | | |
| | | #be fussy about variables |
| | | use strict; |
| | | |
| | | #platform specifics (disabled) |
| | | #use File::Spec::Functions; |
| | | |
| | | #turn warnings on during dev; generates a few spurious uninitialised var access warnings |
| | | #use warnings; |
| | | |
| | | #and set $debug to 1 to turn on trace info |
| | | my $debug=1; |
| | | |
| | | ####################################################################### |
| | | # |
| | | # check to make sure environment is setup |
| | | # |
| | | |
| | | my $HOME = $ENV{ANT_HOME}; |
| | | if ($HOME eq "") |
| | | { |
| | | die "\n\nANT_HOME *MUST* be set!\n\n"; |
| | | } |
| | | |
| | | my $JAVACMD = $ENV{JAVACMD}; |
| | | $JAVACMD = "java" if $JAVACMD eq ""; |
| | | |
| | | my $onnetware = 0; |
| | | if ($^O eq "NetWare") |
| | | { |
| | | $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. |
| | | my $s=":"; |
| | | if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin") || |
| | | ($onnetware == 1)) |
| | | { |
| | | $s=";"; |
| | | } |
| | | |
| | | #build up standard classpath |
| | | 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}); |
| | | |
| | | #jikes |
| | | if($ENV{JIKESPATH} ne "") |
| | | { |
| | | push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}"; |
| | | } |
| | | |
| | | #construct arguments to java |
| | | my @ARGS; |
| | | 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); |
| | | } |
| | | push @ARGS, "-classpath", "$localpath"; |
| | | push @ARGS, "-Dant.home=$HOME"; |
| | | if ( ! $CYGHOME eq "" ) |
| | | { |
| | | push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\"" |
| | | } |
| | | 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; |
| | | if ($returnValue eq 0) |
| | | { |
| | | exit 0; |
| | | } |
| | | else |
| | | { |
| | | # only 0 and 1 are widely recognized as exit values |
| | | # so change the exit value to 1 |
| | | exit 1; |
| | | } |
| New file |
| | |
| | | #!/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 |
| | | |
| | | created: 2001-04-11 |
| | | author: Pierre Dittgen pierre.dittgen@criltelecom.com |
| | | |
| | | Assumptions: |
| | | |
| | | - the "java" executable/script is on the command path |
| | | """ |
| | | import os, os.path, string, sys |
| | | |
| | | # Change it to 1 to get extra debug information |
| | | debug = 0 |
| | | |
| | | ####################################################################### |
| | | |
| | | # 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: |
| | | ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) |
| | | |
| | | # set ANT_LIB location |
| | | ANT_LIB = os.path.join(ANT_HOME, 'lib') |
| | | |
| | | # 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: |
| | | JAVACMD = os.environ['JAVACMD'] |
| | | if not JAVACMD: |
| | | JAVACMD = 'java' |
| | | |
| | | 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 |
| | | |
| | | # Build up standard classpath (LOCALCLASSPATH) |
| | | LOCALCLASSPATH = launcher_jar |
| | | if os.environ.has_key('LOCALCLASSPATH'): |
| | | LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH'] |
| | | |
| | | ANT_OPTS = "" |
| | | if os.environ.has_key('ANT_OPTS'): |
| | | ANT_OPTS = os.environ['ANT_OPTS'] |
| | | |
| | | OPTS = "" |
| | | if os.environ.has_key('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 %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) |
| | | sys.stdout.flush() |
| | | |
| | | # Run the biniou! |
| | | os.system(cmdline) |
| New file |
| | |
| | | /* |
| | | 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.
|
| | |
|
| | | Run RC file, name is in the first arg, second arg is either PATH
|
| | | ENV or -r or nothing |
| | | */
|
| | |
|
| | | parse arg name path rest
|
| | |
|
| | | if name = '' then do
|
| | | say 'RC file name is missing'
|
| | | exit 1
|
| | | end
|
| | |
|
| | | if rest \= '' then do
|
| | | say 'Too many parameters'
|
| | | exit 1
|
| | | end
|
| | |
|
| | | call runit name path
|
| | | exit 0
|
| | |
|
| | | runit: procedure
|
| | | parse arg name path dir
|
| | |
|
| | | if path \= '' & path \= '-r' then do
|
| | | dir = value(translate(path),,'OS2ENVIRONMENT')
|
| | | if dir = '' then return
|
| | | dir = translate(dir, '\', '/') /* change UNIX-like path to OS/2 */
|
| | | end
|
| | |
|
| | | if dir = '' then dir = directory()
|
| | |
|
| | | if path = '-r' then do /* recursive call */
|
| | | subdir = filespec('path', dir)
|
| | | if subdir \= '\' then do
|
| | | subdir = left(subdir, length(subdir)-1)
|
| | | call runit name path filespec('drive', dir) || subdir
|
| | | end
|
| | | end
|
| | |
|
| | | /* Look for the file and run it */
|
| | | if right(dir, 1) \= '\' then dir = dir || '\'
|
| | | rcfile = stream(dir || name, 'c', 'query exists')
|
| | | if rcfile \= '' then interpret 'call "' || rcfile || '"'
|
| | |
|
| | | return
|
| New file |
| | |
| | | <?xml version="1.0" encoding="ISO-8859-1"?> |
| | | |
| | | <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:param name="title"/> |
| | | <xsl:param name="module"/> |
| | | <xsl:param name="cvsweb"/> |
| | | |
| | | <xsl:output method="html" indent="yes" encoding="US-ASCII" |
| | | doctype-public="-//W3C//DTD HTML 4.01//EN" |
| | | doctype-system="http://www.w3.org/TR/html401/strict.dtd"/> |
| | | |
| | | <!-- Copy standard document elements. Elements that |
| | | should be ignored must be filtered by apply-templates |
| | | tags. --> |
| | | <xsl:template match="*"> |
| | | <xsl:copy> |
| | | <xsl:copy-of select="attribute::*[. != '']"/> |
| | | <xsl:apply-templates/> |
| | | </xsl:copy> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="changelog"> |
| | | <html> |
| | | <head> |
| | | <title><xsl:value-of select="$title"/></title> |
| | | <style type="text/css"> |
| | | body, p { |
| | | font-family: Verdana, Arial, Helvetica, sans-serif; |
| | | font-size: 80%; |
| | | color: #000000; |
| | | background-color: #ffffff; |
| | | } |
| | | tr, td { |
| | | font-family: Verdana, Arial, Helvetica, sans-serif; |
| | | background: #eeeee0; |
| | | } |
| | | td { |
| | | padding-left: 20px; |
| | | } |
| | | .dateAndAuthor { |
| | | font-family: Verdana, Arial, Helvetica, sans-serif; |
| | | font-weight: bold; |
| | | text-align: left; |
| | | background: #a6caf0; |
| | | padding-left: 3px; |
| | | } |
| | | a { |
| | | color: #000000; |
| | | } |
| | | pre { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <h1> |
| | | <a name="top"><xsl:value-of select="$title"/></a> |
| | | </h1> |
| | | <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"> |
| | | |
| | | <xsl:apply-templates select=".//entry"> |
| | | <xsl:sort select="date" data-type="text" order="descending"/> |
| | | <xsl:sort select="time" data-type="text" order="descending"/> |
| | | </xsl:apply-templates> |
| | | |
| | | </table> |
| | | |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="entry"> |
| | | <tr> |
| | | <td class="dateAndAuthor"> |
| | | <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <pre> |
| | | <xsl:apply-templates select="msg"/></pre> |
| | | <ul> |
| | | <xsl:apply-templates select="file"/> |
| | | </ul> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="date"> |
| | | <i><xsl:value-of select="."/></i> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="time"> |
| | | <i><xsl:value-of select="."/></i> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="author"> |
| | | <i> |
| | | <a> |
| | | <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute> |
| | | <xsl:value-of select="."/></a> |
| | | </i> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="file"> |
| | | <li> |
| | | <a> |
| | | <xsl:choose> |
| | | <xsl:when test="string-length(prevrevision) = 0 "> |
| | | <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute> |
| | | </xsl:when> |
| | | <xsl:otherwise> |
| | | <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/></xsl:attribute> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)</a> |
| | | </li> |
| | | </xsl:template> |
| | | |
| | | <!-- Any elements within a msg are processed, |
| | | so that we can preserve HTML tags. --> |
| | | <xsl:template match="msg"> |
| | | <xsl:apply-templates/> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| | | |
| New file |
| | |
| | | <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> |
| | | |
| New file |
| | |
| | | <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="," /> |
| | | <!-- |
| | | 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. |
| | | --> |
| | | |
| | | <!-- |
| | | |
| | | 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 |
| | | ======================================================================= --> |
| | | <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 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 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 |
| | | ======================================================================= --> |
| | | <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> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <!-- ======================================================================= |
| | | Stylesheet CSS used |
| | | ======================================================================= --> |
| | | <!-- this is the stylesheet css to use for nearly everything --> |
| | | <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; |
| | | } |
| | | .a td { |
| | | background: #efefef; |
| | | } |
| | | .b 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> |
| | | |
| | | <!-- ======================================================================= |
| | | 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> |
| | | </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(@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/@total_methods,'0.0%')"/></td> |
| | | <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@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/@total_methods,'0.0%')"/></td> |
| | | <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td> |
| | | </tr> |
| | | </xsl:for-each> |
| | | </table> |
| | | <xsl:call-template name="pageFooter"/> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <!-- |
| | | detailed info for a package. It will output the list of classes |
| | | , 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> |
| | | |
| | | <!-- 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}/{@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="{@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> |
| | | </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> |
| | | |
| | | <!-- 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 --> |
| | | <xsl:template name="pageHeader"> |
| | | <!-- jakarta logo --> |
| | | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| | | <tr> |
| | | <td class="bannercell" rowspan="2"> |
| | | <a href="http://jakarta.apache.org/"> |
| | | <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> |
| | | </table> |
| | | <hr size="1"/> |
| | | </xsl:template> |
| | | |
| | | <!-- Page Footer --> |
| | | <xsl:template name="pageFooter"> |
| | | </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> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="method" mode="stats.header"> |
| | | <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/@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> |
| | | </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/@total_methods,'0.0%')"/></td> |
| | | <td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></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> |
| | | |
| | | |
| | | <!-- 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:template> |
| | | |
| | | <!-- alternated row style --> |
| | | <xsl:template name="alternate-row"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:if test="position() mod 2 = 1">a</xsl:if> |
| | | <xsl:if test="position() mod 2 = 0">b</xsl:if> |
| | | </xsl:attribute> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| | | |
| | | |
| New file |
| | |
| | | <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"/> |
| | | <!-- |
| | | 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. |
| | | |
| | | --> |
| | | <!-- |
| | | |
| | | 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> |
| | | |
| | | --> |
| | | <xsl:param name="output.dir" select="'.'"/> |
| | | |
| | | <xsl:template match="JDepend"> |
| | | <!-- 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-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-packages.html"> |
| | | <xsl:apply-templates select="." mode="packages.details"/> |
| | | </redirect:write> |
| | | |
| | | <!-- create the overview-cycles.html at the root --> |
| | | <redirect:write file="{$output.dir}/overview-cycles.html"> |
| | | <xsl:apply-templates select="." mode="cycles.details"/> |
| | | </redirect:write> |
| | | |
| | | <!-- create the overview-cycles.html at the root --> |
| | | <redirect:write file="{$output.dir}/overview-explanations.html"> |
| | | <xsl:apply-templates select="." mode="explanations"/> |
| | | </redirect:write> |
| | | |
| | | <!-- create the all-packages.html at the root --> |
| | | <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"/> |
| | | </redirect:write> |
| | | </xsl:template> |
| | | |
| | | |
| | | <xsl:template name="index.html"> |
| | | <html> |
| | | <head> |
| | | <title>JDepend Analysis</title> |
| | | </head> |
| | | <frameset cols="20%,80%"> |
| | | <frameset rows="30%,70%"> |
| | | <frame src="all-packages.html" name="packageListFrame"/> |
| | | <frame src="all-cycles.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> |
| | | |
| | | <!-- this is the stylesheet css to use for nearly everything --> |
| | | <xsl:template name="stylesheet.css"> |
| | | <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> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="JDepend" mode="overview.packages"> |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" type="text/css" href="stylesheet.css"/> |
| | | </head> |
| | | <body> |
| | | <xsl:call-template name="pageHeader"/> |
| | | <table width="100%"><tr align="left"><h2>Summary</h2><td> |
| | | </td><td align="right"> |
| | | [summary] |
| | | [<a href="overview-packages.html">packages</a>] |
| | | [<a href="overview-cycles.html">cycles</a>] |
| | | [<a href="overview-explanations.html">explanations</a>] |
| | | </td></tr></table> |
| | | <table width="100%" class="details"> |
| | | <tr> |
| | | <th>Package</th> |
| | | <th>Total Classes</th> |
| | | <th><a href="overview-explanations.html#EXnumber">Abstract Classes</a></th> |
| | | <th><a href="overview-explanations.html#EXnumber">Concrete Classes</a></th> |
| | | <th><a href="overview-explanations.html#EXafferent">Afferent Couplings</a></th> |
| | | <th><a href="overview-explanations.html#EXefferent">Efferent Couplings</a></th> |
| | | <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"> |
| | | <tr> |
| | | <td align="left"> |
| | | <a> |
| | | <xsl:attribute name="href">overview-packages.html#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> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="JDepend" mode="packages.details"> |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" type="text/css" href="stylesheet.css"/> |
| | | </head> |
| | | <body> |
| | | <xsl:call-template name="pageHeader"/> |
| | | <table width="100%"><tr align="left"><h2>Packages</h2><td> |
| | | </td><td align="right"> |
| | | [<a href="overview-summary.html">summary</a>] |
| | | [packages] |
| | | [<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> |
| | | <td><a href="overview-explanations.html#EXabstractness">Abstractness</a>: <xsl:value-of select="Stats/A"/></td> |
| | | <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> |
| | | <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">overview-packages.html#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">overview-packages.html#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> |
| | | <!-- this is often a long listing; provide a lower navigation table also --> |
| | | <table width="100%"><tr align="left"><td></td><td align="right"> |
| | | [<a href="overview-summary.html">summary</a>] |
| | | [packages] |
| | | [<a href="overview-cycles.html">cycles</a>] |
| | | [<a href="overview-explanations.html">explanations</a>] |
| | | </td></tr></table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="JDepend" mode="cycles.details"> |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" type="text/css" href="stylesheet.css"/> |
| | | </head> |
| | | <body> |
| | | <xsl:call-template name="pageHeader"/> |
| | | <table width="100%"><tr align="left"><h2>Cycles</h2><td> |
| | | </td><td align="right"> |
| | | [<a href="overview-summary.html">summary</a>] |
| | | [<a href="overview-packages.html">packages</a>] |
| | | [cycles] |
| | | [<a href="overview-explanations.html">explanations</a>] |
| | | </td></tr></table> |
| | | <!--<table width="100%"><tr><td> |
| | | </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><a><xsl:attribute name="name">#CY<xsl:value-of select="@Name"/></xsl:attribute><xsl:value-of select="@Name"/></a></h3><p> |
| | | <xsl:for-each select="Package"> |
| | | <xsl:value-of select="."/><br/> |
| | | </xsl:for-each></p> |
| | | </xsl:for-each> |
| | | <!-- this is often a long listing; provide a lower navigation table also --> |
| | | <table width="100%"><tr align="left"><td></td><td align="right"> |
| | | [<a href="overview-summary.html">summary</a>] |
| | | [<a href="overview-packages.html">packages</a>] |
| | | [cycles] |
| | | [<a href="overview-explanations.html">explanations</a>] |
| | | </td></tr></table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="JDepend" mode="explanations"> |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" type="text/css" href="stylesheet.css"/> |
| | | </head> |
| | | <body> |
| | | <xsl:call-template name="pageHeader"/> |
| | | |
| | | <table width="100%"><tr align="left"><h2>Explanations</h2><td> |
| | | </td><td align="right"> |
| | | [<a href="overview-summary.html">summary</a>] |
| | | [<a href="overview-packages.html">packages</a>] |
| | | [<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> |
| | | <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> |
| | | |
| | | |
| | | <!-- |
| | | 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 :( |
| | | --> |
| | | <xsl:template match="JDepend/Packages" mode="all.packages"> |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" type="text/css" href="stylesheet.css"/> |
| | | </head> |
| | | <body> |
| | | <table width="100%"><tr align="left"><td></td><td nowrap="nowrap" align="right"> |
| | | [<a href="overview-summary.html" target="classFrame">summary</a>] |
| | | [<a href="overview-packages.html" target="classFrame">packages</a>] |
| | | [<a href="overview-cycles.html" target="classFrame">cycles</a>] |
| | | [<a href="overview-explanations.html" target="classFrame">explanations</a>] |
| | | </td></tr></table> |
| | | <h2>Packages</h2> |
| | | <table width="100%"> |
| | | <xsl:apply-templates select="Package[count(error)=0]" mode="all.packages.link"> |
| | | <xsl:sort select="@name"/> |
| | | </xsl:apply-templates> |
| | | <xsl:apply-templates select="Package[count(error) > 0]" mode="all.packages.nolink"> |
| | | <xsl:sort select="@name"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="JDepend/Packages/Package" mode="all.packages.link"> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a href="overview-packages.html#PK{@name}" target="classFrame"> |
| | | <xsl:value-of select="@name"/> |
| | | </a> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- |
| | | I do not know JDepend enough to know if every error results in a non-analyzed package, |
| | | but that is how I am presenting it to the viewer. This may need to change. |
| | | @bug there will be a problem here, I don't know yet how to handle unnamed package :( |
| | | --> |
| | | <xsl:template match="JDepend/Packages/Package" mode="all.packages.nolink"> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | Not Analyzed: <xsl:value-of select="@name"/> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- |
| | | Creates an html file that contains a link to all package links in overview-cycles.html. |
| | | @bug there will be a problem here, I don't know yet how to handle unnamed package :( |
| | | --> |
| | | <xsl:template match="JDepend/Cycles" mode="all.cycles"> |
| | | <html> |
| | | <head> |
| | | <link rel="stylesheet" type="text/css" href="stylesheet.css"/> |
| | | </head> |
| | | <body> |
| | | <table width="100%"><tr align="left"><td></td><td nowrap="nowrap" align="right"> |
| | | [<a href="overview-summary.html" target="classFrame">summary</a>] |
| | | [<a href="overview-packages.html" target="classFrame">packages</a>] |
| | | [<a href="overview-cycles.html" target="classFrame">cycles</a>] |
| | | [<a href="overview-explanations.html" target="classFrame">explanations</a>] |
| | | </td></tr></table> |
| | | <h2>Cycles</h2> |
| | | <table width="100%"> |
| | | <xsl:apply-templates select="Package" mode="all.cycles"> |
| | | <xsl:sort select="@Name"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="JDepend/Cycles/Package" mode="all.cycles"> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a href="overview-cycles.html#CY{@Name}" target="classFrame"><xsl:value-of select="@Name"/></a> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- Page HEADER --> |
| | | <xsl:template name="pageHeader"> |
| | | <h1>JDepend Analysis</h1> |
| | | <table width="100%"> |
| | | <tr> |
| | | <td align="left"></td> |
| | | <td align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</td> |
| | | </tr> |
| | | </table> |
| | | <hr size="1"/> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <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: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">JDepend</a> 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> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <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" |
| | | 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=","/> |
| | | <!-- |
| | | 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. |
| | | --> |
| | | |
| | | <!-- |
| | | |
| | | Sample stylesheet to be used with Ant JUnitReport output. |
| | | |
| | | It creates a set of HTML files a la javadoc where you can browse easily |
| | | through all packages and classes. |
| | | |
| | | --> |
| | | <xsl:param name="output.dir" select="'.'"/> |
| | | |
| | | |
| | | <xsl:template match="testsuites"> |
| | | <!-- 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-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="./testsuite[not(./@package = preceding-sibling::testsuite/@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="/testsuites/testsuite[@package = $name]"> |
| | | <redirect:write file="{$output.dir}/{$package.dir}/{@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}/{@name}-out.txt"> |
| | | <xsl:value-of select="./system-out" /> |
| | | </redirect:write> |
| | | </xsl:if> |
| | | <xsl:if test="string-length(./system-err)!=0"> |
| | | <redirect:write file="{$output.dir}/{$package.dir}/{@name}-err.txt"> |
| | | <xsl:value-of select="./system-err" /> |
| | | </redirect:write> |
| | | </xsl:if> |
| | | </xsl:for-each> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="index.html"> |
| | | <html> |
| | | <head> |
| | | <title>Unit Test 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"/> |
| | | <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> |
| | | </frameset> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <!-- this is the stylesheet css to use for nearly everything --> |
| | | <xsl:template name="stylesheet.css"> |
| | | body { |
| | | font:normal 68% verdana,arial,helvetica; |
| | | color:#000000; |
| | | } |
| | | table tr td, table 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; |
| | | } |
| | | 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; |
| | | } |
| | | </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: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> |
| | | <head> |
| | | <title>Unit Test Results: <xsl:value-of select="$class.name"/></title> |
| | | <xsl:call-template name="create.stylesheet.link"> |
| | | <xsl:with-param name="package.name" select="$package.name"/> |
| | | </xsl:call-template> |
| | | <script type="text/javascript" language="JavaScript"> |
| | | var TestCases = new Array(); |
| | | var cur; |
| | | <xsl:apply-templates select="properties"/> |
| | | </script> |
| | | <script type="text/javascript" language="JavaScript"><![CDATA[ |
| | | function displayProperties (name) { |
| | | var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1'); |
| | | 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; }"); |
| | | doc.write("table tr td, table tr th { font-size: 68%; }"); |
| | | doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }"); |
| | | doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }"); |
| | | doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }"); |
| | | doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }"); |
| | | doc.write("</style>"); |
| | | doc.write("</head><body>"); |
| | | doc.write("<h3>Properties of " + name + "</h3>"); |
| | | doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>"); |
| | | doc.write("<table class='properties'>"); |
| | | doc.write("<tr><th>Name</th><th>Value</th></tr>"); |
| | | for (prop in TestCases[name]) { |
| | | doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>"); |
| | | } |
| | | doc.write("</table>"); |
| | | doc.write("</body></html>"); |
| | | doc.close(); |
| | | win.focus(); |
| | | } |
| | | ]]> |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <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> |
| | | <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: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"/> |
| | | </table> |
| | | <div class="Properties"> |
| | | <a> |
| | | <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute> |
| | | Properties » |
| | | </a> |
| | | </div> |
| | | <xsl:if test="string-length(./system-out)!=0"> |
| | | <div class="Properties"> |
| | | <a> |
| | | <xsl:attribute name="href">./<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="@name"/>-err.txt</xsl:attribute> |
| | | System.err » |
| | | </a> |
| | | </div> |
| | | </xsl:if> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <!-- |
| | | Write properties into a JavaScript data structure. |
| | | This is based on the original idea by Erik Hatcher (ehatcher@apache.org) |
| | | --> |
| | | <xsl:template match="properties"> |
| | | cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array(); |
| | | <xsl:for-each select="property"> |
| | | <xsl:sort select="@name"/> |
| | | 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> |
| | | |
| | | |
| | | <!-- ====================================================================== |
| | | This page is created for every package. |
| | | It prints the name of all classes that belongs to this package. |
| | | @param name the package name to print classes. |
| | | ====================================================================== --> |
| | | <!-- list of classes in a package --> |
| | | <xsl:template name="classes.list"> |
| | | <xsl:param name="name"/> |
| | | <html> |
| | | <head> |
| | | <title>Unit Test Classes: <xsl:value-of select="$name"/></title> |
| | | <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"/> |
| | | <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="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> |
| | | </td> |
| | | </tr> |
| | | </xsl:for-each> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- |
| | | Creates an all-classes.html file that contains a link to all package-summary.html |
| | | on each class. |
| | | --> |
| | | <xsl:template match="testsuites" mode="all.classes"> |
| | | <html> |
| | | <head> |
| | | <title>All Unit Test Classes</title> |
| | | <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="testsuite" mode="all.classes"> |
| | | <xsl:sort select="@name"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="testsuite" mode="all.classes"> |
| | | <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> |
| | | </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 :( |
| | | --> |
| | | <xsl:template match="testsuites" mode="all.packages"> |
| | | <html> |
| | | <head> |
| | | <title>All Unit Test Packages</title> |
| | | <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="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages"> |
| | | <xsl:sort select="@package"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="testsuite" mode="all.packages"> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame"> |
| | | <xsl:value-of select="@package"/> |
| | | <xsl:if test="@package = ''"><none></xsl:if> |
| | | </a> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <xsl:template match="testsuites" mode="overview.packages"> |
| | | <html> |
| | | <head> |
| | | <title>Unit Test Results: Summary</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>Summary</h2> |
| | | <xsl:variable name="testCount" select="sum(testsuite/@tests)"/> |
| | | <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/> |
| | | <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/> |
| | | <xsl:variable name="timeCount" select="sum(testsuite/@time)"/> |
| | | <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/> |
| | | <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> |
| | | <tr valign="top"> |
| | | <th>Tests</th> |
| | | <th>Failures</th> |
| | | <th>Errors</th> |
| | | <th>Success rate</th> |
| | | <th>Time</th> |
| | | </tr> |
| | | <tr valign="top"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="$errorCount > 0">Error</xsl:when> |
| | | <xsl:when test="$failureCount > 0">Failure</xsl:when> |
| | | <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> |
| | | <xsl:call-template name="display-percent"> |
| | | <xsl:with-param name="value" select="$successRate"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <xsl:with-param name="value" select="$timeCount"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <table border="0" width="95%"> |
| | | <tr> |
| | | <td style="text-align: justify;"> |
| | | Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated. |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <h2>Packages</h2> |
| | | <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> |
| | | <xsl:call-template name="testsuite.test.header"/> |
| | | <xsl:for-each select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> |
| | | <xsl:sort select="@package" order="ascending"/> |
| | | <!-- get the node set containing all testsuites that have the same package --> |
| | | <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/> |
| | | <tr valign="top"> |
| | | <!-- display a failure if there is any failure/error in the package --> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="sum($insamepackage/@errors) > 0">Error</xsl:when> |
| | | <xsl:when test="sum($insamepackage/@failures) > 0">Failure</xsl:when> |
| | | <xsl:otherwise>Pass</xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <td><a href="./{translate(@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> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <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> |
| | | </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="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> |
| | | <p> |
| | | <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> |
| | | <xsl:call-template name="testsuite.test.header"/> |
| | | <xsl:apply-templates select="$insamepackage" mode="print.test"> |
| | | <xsl:sort select="@name"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </p> |
| | | </xsl:if> |
| | | </body> |
| | | </html> |
| | | </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> |
| | | |
| | | |
| | | <!-- 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: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://ant.apache.org/">Ant</a>.</td> |
| | | </tr> |
| | | </table> |
| | | <hr size="1"/> |
| | | </xsl:template> |
| | | |
| | | <!-- class header --> |
| | | <xsl:template name="testsuite.test.header"> |
| | | <tr valign="top"> |
| | | <th width="80%">Name</th> |
| | | <th>Tests</th> |
| | | <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"> |
| | | <tr valign="top"> |
| | | <th>Name</th> |
| | | <th>Status</th> |
| | | <th width="80%">Type</th> |
| | | <th nowrap="nowrap">Time(s)</th> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- class information --> |
| | | <xsl:template match="testsuite" mode="print.test"> |
| | | <tr valign="top"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="@errors[.> 0]">Error</xsl:when> |
| | | <xsl:when test="@failures[.> 0]">Failure</xsl:when> |
| | | <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><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"> |
| | | <tr valign="top"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="error">Error</xsl:when> |
| | | <xsl:when test="failure">Failure</xsl:when> |
| | | <xsl:otherwise>TableRowColor</xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <td><xsl:value-of select="@name"/></td> |
| | | <xsl:choose> |
| | | <xsl:when test="failure"> |
| | | <td>Failure</td> |
| | | <td><xsl:apply-templates select="failure"/></td> |
| | | </xsl:when> |
| | | <xsl:when test="error"> |
| | | <td>Error</td> |
| | | <td><xsl:apply-templates select="error"/></td> |
| | | </xsl:when> |
| | | <xsl:otherwise> |
| | | <td>Success</td> |
| | | <td></td> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <xsl:with-param name="value" select="@time"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- Note : the below template error and failure are the same style |
| | | so just call the same style store in the toolkit template --> |
| | | <xsl:template match="failure"> |
| | | <xsl:call-template name="display-failures"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="error"> |
| | | <xsl:call-template name="display-failures"/> |
| | | </xsl:template> |
| | | |
| | | <!-- Style for the error and failure in the testcase template --> |
| | | <xsl:template name="display-failures"> |
| | | <xsl:choose> |
| | | <xsl:when test="not(@message)">N/A</xsl:when> |
| | | <xsl:otherwise> |
| | | <xsl:value-of select="@message"/> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | <!-- display the stacktrace --> |
| | | <br/><br/> |
| | | <code> |
| | | <xsl:call-template name="br-replace"> |
| | | <xsl:with-param name="word" select="."/> |
| | | </xsl:call-template> |
| | | </code> |
| | | <!-- the latter is better but might be problematic for non-21" monitors... --> |
| | | <!--pre><xsl:value-of select="."/></pre--> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="JS-escape"> |
| | | <xsl:param name="string"/> |
| | | <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> |
| | | |
| | | |
| | | <!-- |
| | | template that will convert a carriage return into a br tag |
| | | @param word the text from which to convert CR to BR tag |
| | | --> |
| | | <xsl:template name="br-replace"> |
| | | <xsl:param name="word"/> |
| | | <xsl:param name="br"><br/></xsl:param> |
| | | <xsl:value-of select='stringutils:replace(string($word),"
",$br)'/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="display-time"> |
| | | <xsl:param name="value"/> |
| | | <xsl:value-of select="format-number($value,'0.000')"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="display-percent"> |
| | | <xsl:param name="value"/> |
| | | <xsl:value-of select="format-number($value,'0.00%')"/> |
| | | </xsl:template> |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" |
| | | xmlns:lxslt="http://xml.apache.org/xslt" |
| | | 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=","/> |
| | | <!-- |
| | | 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. |
| | | --> |
| | | |
| | | <!-- |
| | | |
| | | Sample stylesheet to be used with Ant JUnitReport output. |
| | | |
| | | It creates a set of HTML files a la javadoc where you can browse easily |
| | | through all packages and classes. |
| | | |
| | | --> |
| | | <xsl:param name="output.dir" select="'.'"/> |
| | | |
| | | |
| | | <xsl:template match="testsuites"> |
| | | <!-- 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-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> |
| | | |
| | | <!-- 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"/> |
| | | </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="/testsuites/testsuite[@package = $name]"> |
| | | <redirect:write file="{$output.dir}/{$package.dir}/{@id}_{@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}_{@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}_{@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}_{@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}_{@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"> |
| | | <html> |
| | | <head> |
| | | <title>Unit Test 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"/> |
| | | <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> |
| | | </frameset> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <!-- this is the stylesheet css to use for nearly everything --> |
| | | <xsl:template name="stylesheet.css"> |
| | | body { |
| | | font:normal 68% verdana,arial,helvetica; |
| | | color:#000000; |
| | | } |
| | | table tr td, table 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; |
| | | } |
| | | 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; |
| | | } |
| | | </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> |
| | | <head> |
| | | <title>Unit Test Results: <xsl:value-of select="$class.name"/></title> |
| | | <xsl:call-template name="create.stylesheet.link"> |
| | | <xsl:with-param name="package.name" select="$package.name"/> |
| | | </xsl:call-template> |
| | | <script type="text/javascript" language="JavaScript"> |
| | | var TestCases = new Array(); |
| | | var cur; |
| | | <xsl:apply-templates select="properties"/> |
| | | </script> |
| | | <script type="text/javascript" language="JavaScript"><![CDATA[ |
| | | function displayProperties (name) { |
| | | var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1'); |
| | | 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; }"); |
| | | doc.write("table tr td, table tr th { font-size: 68%; }"); |
| | | doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }"); |
| | | doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }"); |
| | | doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }"); |
| | | doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }"); |
| | | doc.write("</style>"); |
| | | doc.write("</head><body>"); |
| | | doc.write("<h3>Properties of " + name + "</h3>"); |
| | | doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>"); |
| | | doc.write("<table class='properties'>"); |
| | | doc.write("<tr><th>Name</th><th>Value</th></tr>"); |
| | | for (prop in TestCases[name]) { |
| | | doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>"); |
| | | } |
| | | doc.write("</table>"); |
| | | doc.write("</body></html>"); |
| | | doc.close(); |
| | | win.focus(); |
| | | } |
| | | ]]> |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <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> |
| | | |
| | | <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: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: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> |
| | | <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute> |
| | | 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> |
| | | |
| | | <!-- |
| | | Write properties into a JavaScript data structure. |
| | | This is based on the original idea by Erik Hatcher (ehatcher@apache.org) |
| | | --> |
| | | <xsl:template match="properties"> |
| | | cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array(); |
| | | <xsl:for-each select="property"> |
| | | <xsl:sort select="@name"/> |
| | | 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> |
| | | |
| | | |
| | | <!-- ====================================================================== |
| | | This page is created for every package. |
| | | It prints the name of all classes that belongs to this package. |
| | | @param name the package name to print classes. |
| | | ====================================================================== --> |
| | | <!-- list of classes in a package --> |
| | | <xsl:template name="classes.list"> |
| | | <xsl:param name="name"/> |
| | | <html> |
| | | <head> |
| | | <title>Unit Test Classes: <xsl:value-of select="$name"/></title> |
| | | <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"/> |
| | | <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="{@id}_{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> |
| | | </td> |
| | | </tr> |
| | | </xsl:for-each> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- |
| | | Creates an all-classes.html file that contains a link to all package-summary.html |
| | | on each class. |
| | | --> |
| | | <xsl:template match="testsuites" mode="all.classes"> |
| | | <html> |
| | | <head> |
| | | <title>All Unit Test Classes</title> |
| | | <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="testsuite" mode="all.classes"> |
| | | <xsl:sort select="@name"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="testsuite" mode="all.classes"> |
| | | <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="@id"/>_<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 :( |
| | | --> |
| | | <xsl:template match="testsuites" mode="all.packages"> |
| | | <html> |
| | | <head> |
| | | <title>All Unit Test Packages</title> |
| | | <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="testsuite[not(./@package = preceding-sibling::testsuite/@package)]" mode="all.packages"> |
| | | <xsl:sort select="@package"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="testsuite" mode="all.packages"> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a href="./{translate(@package,'.','/')}/package-summary.html" target="classFrame"> |
| | | <xsl:value-of select="@package"/> |
| | | <xsl:if test="@package = ''"><none></xsl:if> |
| | | </a> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <xsl:template match="testsuites" mode="overview.packages"> |
| | | <html> |
| | | <head> |
| | | <title>Unit Test Results: Summary</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>Summary</h2> |
| | | <xsl:variable name="testCount" select="sum(testsuite/@tests)"/> |
| | | <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/> |
| | | <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/> |
| | | <xsl:variable name="timeCount" select="sum(testsuite/@time)"/> |
| | | <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/> |
| | | <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> |
| | | <tr valign="top"> |
| | | <th>Tests</th> |
| | | <th>Failures</th> |
| | | <th>Errors</th> |
| | | <th>Success rate</th> |
| | | <th>Time</th> |
| | | </tr> |
| | | <tr valign="top"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="$errorCount > 0">Error</xsl:when> |
| | | <xsl:when test="$failureCount > 0">Failure</xsl:when> |
| | | <xsl:otherwise>Pass</xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <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"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <xsl:with-param name="value" select="$timeCount"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <table border="0" width="95%"> |
| | | <tr> |
| | | <td style="text-align: justify;"> |
| | | Note: <em>failures</em> are anticipated and checked for with assertions while <em>errors</em> are unanticipated. |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <h2>Packages</h2> |
| | | <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> |
| | | <xsl:call-template name="testsuite.test.header"/> |
| | | <xsl:for-each select="testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> |
| | | <xsl:sort select="@package" order="ascending"/> |
| | | <!-- get the node set containing all testsuites that have the same package --> |
| | | <xsl:variable name="insamepackage" select="/testsuites/testsuite[./@package = current()/@package]"/> |
| | | <tr valign="top"> |
| | | <!-- display a failure if there is any failure/error in the package --> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="sum($insamepackage/@errors) > 0">Error</xsl:when> |
| | | <xsl:when test="sum($insamepackage/@failures) > 0">Failure</xsl:when> |
| | | <xsl:otherwise>Pass</xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <td><a href="./{translate(@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> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <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> |
| | | </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="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> |
| | | <p> |
| | | <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> |
| | | <xsl:call-template name="testsuite.test.header"/> |
| | | <xsl:apply-templates select="$insamepackage" mode="print.test"> |
| | | <xsl:sort select="@name"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </p> |
| | | </xsl:if> |
| | | </body> |
| | | </html> |
| | | </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> |
| | | |
| | | |
| | | <!-- 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: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://ant.apache.org/">Ant</a>.</td> |
| | | </tr> |
| | | </table> |
| | | <hr size="1"/> |
| | | </xsl:template> |
| | | |
| | | <!-- class header --> |
| | | <xsl:template name="testsuite.test.header"> |
| | | <tr valign="top"> |
| | | <th width="80%">Name</th> |
| | | <th>Tests</th> |
| | | <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> |
| | | <th nowrap="nowrap">Time(s)</th> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- class information --> |
| | | <xsl:template match="testsuite" mode="print.test"> |
| | | <tr valign="top"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="@errors[.> 0]">Error</xsl:when> |
| | | <xsl:when test="@failures[.> 0]">Failure</xsl:when> |
| | | <xsl:otherwise>Pass</xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <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> |
| | | <xsl:when test="error">Error</xsl:when> |
| | | <xsl:when test="failure">Failure</xsl:when> |
| | | <xsl:otherwise>TableRowColor</xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <xsl:variable name="class.href"> |
| | | <xsl:value-of select="concat(translate(../@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> |
| | | <td><xsl:apply-templates select="failure"/></td> |
| | | </xsl:when> |
| | | <xsl:when test="error"> |
| | | <td>Error</td> |
| | | <td><xsl:apply-templates select="error"/></td> |
| | | </xsl:when> |
| | | <xsl:otherwise> |
| | | <td>Success</td> |
| | | <td></td> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <xsl:with-param name="value" select="@time"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- Note : the below template error and failure are the same style |
| | | so just call the same style store in the toolkit template --> |
| | | <xsl:template match="failure"> |
| | | <xsl:call-template name="display-failures"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="error"> |
| | | <xsl:call-template name="display-failures"/> |
| | | </xsl:template> |
| | | |
| | | <!-- Style for the error and failure in the testcase template --> |
| | | <xsl:template name="display-failures"> |
| | | <xsl:choose> |
| | | <xsl:when test="not(@message)">N/A</xsl:when> |
| | | <xsl:otherwise> |
| | | <xsl:value-of select="@message"/> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | <!-- display the stacktrace --> |
| | | <br/><br/> |
| | | <code> |
| | | <xsl:call-template name="br-replace"> |
| | | <xsl:with-param name="word" select="."/> |
| | | </xsl:call-template> |
| | | </code> |
| | | <!-- the latter is better but might be problematic for non-21" monitors... --> |
| | | <!--pre><xsl:value-of select="."/></pre--> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="JS-escape"> |
| | | <xsl:param name="string"/> |
| | | <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> |
| | | |
| | | |
| | | <!-- |
| | | template that will convert a carriage return into a br tag |
| | | @param word the text from which to convert CR to BR tag |
| | | --> |
| | | <xsl:template name="br-replace"> |
| | | <xsl:param name="word"/> |
| | | <xsl:value-of disable-output-escaping="yes" select='stringutils:replace(string($word),"
","<br/>")'/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="display-time"> |
| | | <xsl:param name="value"/> |
| | | <xsl:value-of select="format-number($value,'0.000')"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="display-percent"> |
| | | <xsl:param name="value"/> |
| | | <xsl:value-of select="format-number($value,'0.00%')"/> |
| | | </xsl:template> |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <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="," /> |
| | | <!-- |
| | | 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. |
| | | --> |
| | | |
| | | <!-- |
| | | |
| | | Sample stylesheet to be used with Ant JUnitReport output. |
| | | |
| | | It creates a non-framed report that can be useful to send via |
| | | e-mail or such. |
| | | |
| | | --> |
| | | <xsl:template match="testsuites"> |
| | | <html> |
| | | <head> |
| | | <title>Unit Test Results</title> |
| | | <style type="text/css"> |
| | | body { |
| | | font:normal 68% verdana,arial,helvetica; |
| | | color:#000000; |
| | | } |
| | | table tr td, table 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; |
| | | } |
| | | 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> |
| | | <script type="text/javascript" language="JavaScript"> |
| | | var TestCases = new Array(); |
| | | var cur; |
| | | <xsl:for-each select="./testsuite"> |
| | | <xsl:apply-templates select="properties"/> |
| | | </xsl:for-each> |
| | | |
| | | </script> |
| | | <script type="text/javascript" language="JavaScript"><![CDATA[ |
| | | function displayProperties (name) { |
| | | var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1'); |
| | | 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; }"); |
| | | doc.write("table tr td, table tr th { font-size: 68%; }"); |
| | | doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }"); |
| | | doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }"); |
| | | doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }"); |
| | | doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }"); |
| | | doc.write("</style>"); |
| | | doc.write("</head><body>"); |
| | | doc.write("<h3>Properties of " + name + "</h3>"); |
| | | doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>"); |
| | | doc.write("<table class='properties'>"); |
| | | doc.write("<tr><th>Name</th><th>Value</th></tr>"); |
| | | for (prop in TestCases[name]) { |
| | | doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>"); |
| | | } |
| | | doc.write("</table>"); |
| | | doc.write("</body></html>"); |
| | | doc.close(); |
| | | win.focus(); |
| | | } |
| | | ]]> |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <a name="top"></a> |
| | | <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"> |
| | | <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%"> |
| | | <xsl:call-template name="testsuite.test.header"/> |
| | | <!-- list all packages recursively --> |
| | | <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> |
| | | <xsl:sort select="@package"/> |
| | | <xsl:variable name="testsuites-in-package" select="/testsuites/testsuite[./@package = current()/@package]"/> |
| | | <xsl:variable name="testCount" select="sum($testsuites-in-package/@tests)"/> |
| | | <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 --> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="$failureCount > 0">Failure</xsl:when> |
| | | <xsl:when test="$errorCount > 0">Error</xsl:when> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <td><a href="#{@package}"><xsl:value-of select="@package"/></a></td> |
| | | <td><xsl:value-of select="$testCount"/></td> |
| | | <td><xsl:value-of select="$errorCount"/></td> |
| | | <td><xsl:value-of select="$failureCount"/></td> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <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> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- ================================================================== --> |
| | | <!-- Write a package level report --> |
| | | <!-- It creates a table with values from the document: --> |
| | | <!-- Name | Tests | Errors | Failures | Time --> |
| | | <!-- ================================================================== --> |
| | | <xsl:template name="packages"> |
| | | <!-- create an anchor to this package name --> |
| | | <xsl:for-each select="/testsuites/testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> |
| | | <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> |
| | | <a href="#top">Back to top</a> |
| | | <p/> |
| | | <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"/> |
| | | <!-- |
| | | 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"/> |
| | | </table> |
| | | <div class="Properties"> |
| | | <a> |
| | | <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of select="@name"/>');</xsl:attribute> |
| | | Properties » |
| | | </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)"/> |
| | | <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/> |
| | | <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/> |
| | | <xsl:variable name="timeCount" select="sum(testsuite/@time)"/> |
| | | <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/> |
| | | <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> |
| | | <tr valign="top"> |
| | | <th>Tests</th> |
| | | <th>Failures</th> |
| | | <th>Errors</th> |
| | | <th>Success rate</th> |
| | | <th>Time</th> |
| | | </tr> |
| | | <tr valign="top"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="$failureCount > 0">Failure</xsl:when> |
| | | <xsl:when test="$errorCount > 0">Error</xsl:when> |
| | | </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> |
| | | <xsl:call-template name="display-percent"> |
| | | <xsl:with-param name="value" select="$successRate"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <xsl:with-param name="value" select="$timeCount"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | |
| | | </tr> |
| | | </table> |
| | | <table border="0" width="95%"> |
| | | <tr> |
| | | <td style="text-align: justify;"> |
| | | Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated. |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </xsl:template> |
| | | |
| | | <!-- |
| | | Write properties into a JavaScript data structure. |
| | | This is based on the original idea by Erik Hatcher (ehatcher@apache.org) |
| | | --> |
| | | <xsl:template match="properties"> |
| | | cur = TestCases['<xsl:value-of select="../@package"/>.<xsl:value-of select="../@name"/>'] = new Array(); |
| | | <xsl:for-each select="property"> |
| | | <xsl:sort select="@name"/> |
| | | 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://ant.apache.org/ant'>Ant</a>.</td> |
| | | </tr> |
| | | </table> |
| | | <hr size="1"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="testsuite" mode="header"> |
| | | <tr valign="top"> |
| | | <th width="80%">Name</th> |
| | | <th>Tests</th> |
| | | <th>Errors</th> |
| | | <th>Failures</th> |
| | | <th nowrap="nowrap">Time(s)</th> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- class header --> |
| | | <xsl:template name="testsuite.test.header"> |
| | | <tr valign="top"> |
| | | <th width="80%">Name</th> |
| | | <th>Tests</th> |
| | | <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"> |
| | | <tr valign="top"> |
| | | <th>Name</th> |
| | | <th>Status</th> |
| | | <th width="80%">Type</th> |
| | | <th nowrap="nowrap">Time(s)</th> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- class information --> |
| | | <xsl:template match="testsuite" mode="print.test"> |
| | | <tr valign="top"> |
| | | <!-- set a nice color depending if there is an error/failure --> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="@failures[.> 0]">Failure</xsl:when> |
| | | <xsl:when test="@errors[.> 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> |
| | | <td><xsl:value-of select="@errors"/></td> |
| | | <td><xsl:value-of select="@failures"/></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"> |
| | | <tr valign="top"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:choose> |
| | | <xsl:when test="failure | error">Error</xsl:when> |
| | | </xsl:choose> |
| | | </xsl:attribute> |
| | | <td><xsl:value-of select="@name"/></td> |
| | | <xsl:choose> |
| | | <xsl:when test="failure"> |
| | | <td>Failure</td> |
| | | <td><xsl:apply-templates select="failure"/></td> |
| | | </xsl:when> |
| | | <xsl:when test="error"> |
| | | <td>Error</td> |
| | | <td><xsl:apply-templates select="error"/></td> |
| | | </xsl:when> |
| | | <xsl:otherwise> |
| | | <td>Success</td> |
| | | <td></td> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | <td> |
| | | <xsl:call-template name="display-time"> |
| | | <xsl:with-param name="value" select="@time"/> |
| | | </xsl:call-template> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <xsl:template match="failure"> |
| | | <xsl:call-template name="display-failures"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="error"> |
| | | <xsl:call-template name="display-failures"/> |
| | | </xsl:template> |
| | | |
| | | <!-- Style for the error and failure in the tescase template --> |
| | | <xsl:template name="display-failures"> |
| | | <xsl:choose> |
| | | <xsl:when test="not(@message)">N/A</xsl:when> |
| | | <xsl:otherwise> |
| | | <xsl:value-of select="@message"/> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | <!-- display the stacktrace --> |
| | | <code> |
| | | <br/><br/> |
| | | <xsl:call-template name="br-replace"> |
| | | <xsl:with-param name="word" select="."/> |
| | | </xsl:call-template> |
| | | </code> |
| | | <!-- the later is better but might be problematic for non-21" monitors... --> |
| | | <!--pre><xsl:value-of select="."/></pre--> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="JS-escape"> |
| | | <xsl:param name="string"/> |
| | | <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> |
| | | |
| | | |
| | | <!-- |
| | | template that will convert a carriage return into a br tag |
| | | @param word the text from which to convert CR to BR tag |
| | | --> |
| | | <xsl:template name="br-replace"> |
| | | <xsl:param name="word"/> |
| | | <xsl:value-of disable-output-escaping="yes" select='stringutils:replace(string($word),"
","<br/>")'/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="display-time"> |
| | | <xsl:param name="value"/> |
| | | <xsl:value-of select="format-number($value,'0.000')"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="display-percent"> |
| | | <xsl:param name="value"/> |
| | | <xsl:value-of select="format-number($value,'0.00%')"/> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
| | | <xsl:output method="html" indent="yes" encoding="US-ASCII"/> |
| | | <!-- |
| | | 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. |
| | | |
| | | --> |
| | | |
| | | <!-- |
| | | |
| | | The purpose have this XSL is to provide a nice way to look at the output |
| | | from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger ) |
| | | |
| | | @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a> |
| | | |
| | | --> |
| | | <xsl:decimal-format decimal-separator="." grouping-separator="," /> |
| | | |
| | | <xsl:template match="/"> |
| | | <html> |
| | | <head> |
| | | <style type="text/css"> |
| | | .bannercell { |
| | | border: 0px; |
| | | padding: 0px; |
| | | } |
| | | body { |
| | | margin: 0; |
| | | font:normal 100% arial,helvetica,sanserif; |
| | | background-color:#FFFFFF; |
| | | color:#000000; |
| | | } |
| | | table.status { |
| | | font:bold 80% arial,helvetica,sanserif; |
| | | background-color:#525D76; |
| | | color:#ffffff; |
| | | } |
| | | table.log tr td, tr th { |
| | | font-size: 80%; |
| | | } |
| | | .error { |
| | | color:red; |
| | | } |
| | | .warn { |
| | | color:brown; |
| | | } |
| | | .info { |
| | | color:gray; |
| | | } |
| | | .debug{ |
| | | color:gray; |
| | | } |
| | | .failed { |
| | | font-size:80%; |
| | | background-color: red; |
| | | color:#FFFFFF; |
| | | font-weight: bold |
| | | } |
| | | .complete { |
| | | font-size:80%; |
| | | background-color: #525D76; |
| | | color:#FFFFFF; |
| | | font-weight: bold |
| | | } |
| | | .a td { |
| | | background: #efefef; |
| | | } |
| | | .b td { |
| | | background: #fff; |
| | | } |
| | | th, td { |
| | | text-align: left; |
| | | vertical-align: top; |
| | | } |
| | | th { |
| | | background: #ccc; |
| | | color: black; |
| | | } |
| | | table, th, td { |
| | | border: none |
| | | } |
| | | h3 { |
| | | font:bold 80% arial,helvetica,sanserif; |
| | | background: #525D76; |
| | | color: white; |
| | | text-decoration: none; |
| | | padding: 5px; |
| | | margin-right: 2px; |
| | | margin-left: 2px; |
| | | margin-bottom: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <!-- jakarta logo --> |
| | | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| | | <tr> |
| | | <td valign="top" class="bannercell"> |
| | | <a href="http://jakarta.apache.org/"> |
| | | <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;vertical-align:bottom"> |
| | | <a href="http://ant.apache.org/">Apache Ant</a> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <table border="0" width="100%"> |
| | | <tr><td><hr noshade="yes" size="1"/></td></tr> |
| | | </table> |
| | | |
| | | <xsl:apply-templates select="build"/> |
| | | |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="build"> |
| | | <!-- build status --> |
| | | <table width="100%"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:if test="@error">failed</xsl:if> |
| | | <xsl:if test="not(@error)">complete</xsl:if> |
| | | </xsl:attribute> |
| | | <tr> |
| | | <xsl:if test="@error"> |
| | | <td nowrap="yes">Build Failed</td> |
| | | </xsl:if> |
| | | <xsl:if test="not(@error)"> |
| | | <td nowrap="yes">Build Complete</td> |
| | | </xsl:if> |
| | | <td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of select="@time"/></td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <xsl:if test="@error"> |
| | | <tt><xsl:value-of select="@error"/></tt><br/> |
| | | <i style="font-size:80%">See the <a href="#stacktrace" alt="Click for details">stacktrace</a>.</i> |
| | | </xsl:if> |
| | | </td> |
| | | </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> |
| | | </table> |
| | | <!-- build information --> |
| | | <h3>Build events</h3> |
| | | <table class="log" border="1" cellspacing="2" cellpadding="3" width="100%"> |
| | | <tr> |
| | | <th nowrap="yes" align="left" width="1%">target</th> |
| | | <th nowrap="yes" align="left" width="1%">task</th> |
| | | <th nowrap="yes" align="left">message</th> |
| | | </tr> |
| | | <xsl:apply-templates select=".//message[@priority != 'debug']"/> |
| | | </table> |
| | | <p> |
| | | <!-- stacktrace --> |
| | | <xsl:if test="stacktrace"> |
| | | <a name="stacktrace"/> |
| | | <h3>Error details</h3> |
| | | <table width="100%"> |
| | | <tr><td> |
| | | <pre><xsl:value-of select="stacktrace"/></pre> |
| | | </td></tr> |
| | | </table> |
| | | </xsl:if> |
| | | </p> |
| | | </xsl:template> |
| | | |
| | | <!-- report every message but those with debug priority --> |
| | | <xsl:template match="message[@priority!='debug']"> |
| | | <tr valign="top"> |
| | | <!-- alternated row style --> |
| | | <xsl:attribute name="class"> |
| | | <xsl:if test="position() mod 2 = 1">a</xsl:if> |
| | | <xsl:if test="position() mod 2 = 0">b</xsl:if> |
| | | </xsl:attribute> |
| | | <td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td> |
| | | <td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of select="../@name"/> ]</td> |
| | | <td class="{@priority}" nowrap="yes"> |
| | | <xsl:value-of select="text()"/> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <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="," /> |
| | | <!-- |
| | | 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. |
| | | --> |
| | | <!-- |
| | | |
| | | 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"/> |
| | | --> |
| | | |
| | | <xsl:param name="output.dir" select="'.'"/> |
| | | |
| | | |
| | | <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 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 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}/{@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> |
| | | </HTML> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- this is the stylesheet css to use for nearly everything --> |
| | | <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; |
| | | } |
| | | .a td { |
| | | background: #efefef; |
| | | } |
| | | .b 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> |
| | | |
| | | |
| | | <!-- 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> |
| | | |
| | | <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: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="{@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. |
| | | --> |
| | | <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> |
| | | </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> |
| | | </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 :( |
| | | --> |
| | | <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> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="class" mode="all.packages"> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a href="{translate(@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.doc.html">Java 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">Sun 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> |
| | | <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> |
| | | </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: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> |
| | | |
| | | |
| | | <!-- 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:template> |
| | | |
| | | <!-- Page HEADER --> |
| | | <xsl:template name="pageHeader"> |
| | | |
| | | <!-- jakarta logo --> |
| | | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| | | <tr> |
| | | <td class="bannercell" rowspan="2"> |
| | | <a href="http://jakarta.apache.org/"> |
| | | <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> |
| | | </table> |
| | | <hr size="1"/> |
| | | </xsl:template> |
| | | |
| | | <!-- Page HEADER --> |
| | | <xsl:template name="pageFooter"> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- class header --> |
| | | <xsl:template name="class.audit.header"> |
| | | <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> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- class information --> |
| | | <xsl:template match="class" mode="print.audit"> |
| | | <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> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="violation" mode="print.audit"> |
| | | <tr> |
| | | <xsl:call-template name="alternate-row"/> |
| | | <td><xsl:value-of select="@line"/></td> |
| | | <td><xsl:apply-templates select="@message"/></td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- alternated row style --> |
| | | <xsl:template name="alternate-row"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:if test="position() mod 2 = 1">a</xsl:if> |
| | | <xsl:if test="position() mod 2 = 0">b</xsl:if> |
| | | </xsl:attribute> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| | | |
| New file |
| | |
| | | <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.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="," /> |
| | | <!-- |
| | | 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. |
| | | --> |
| | | <!-- |
| | | @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/> |
| | | --> |
| | | <xsl:param name="output.dir" select="'.'"/> |
| | | |
| | | <!-- default max value for the metrics --> |
| | | <xsl:param name="vg.max" select="10"/> |
| | | <xsl:param name="loc.max" select="1000"/> |
| | | <xsl:param name="dit.max" select="10"/> |
| | | <xsl:param name="noa.max" select="250"/> |
| | | <xsl:param name="nrm.max" select="50"/> |
| | | <xsl:param name="nlm.max" select="250"/> |
| | | <xsl:param name="wmc.max" select="250"/> |
| | | <xsl:param name="rfc.max" select="50"/> |
| | | <xsl:param name="dac.max" select="10"/> |
| | | <xsl:param name="fanout.max" select="10"/> |
| | | <xsl:param name="cbo.max" select="15"/> |
| | | <xsl:param name="lcom.max" select="10"/> |
| | | <xsl:param name="nocl.max" select="10"/> |
| | | |
| | | |
| | | <!-- create a tree fragment to speed up processing --> |
| | | <xsl:variable name="doctree.var"> |
| | | <xsl:element name="classes"> |
| | | <xsl:for-each select=".//class"> |
| | | <xsl:element name="class"> |
| | | <xsl:attribute name="package"> |
| | | <xsl:value-of select="(ancestor::package)[last()]/@name"/> |
| | | </xsl:attribute> |
| | | <xsl:copy-of select="@*"/> |
| | | <xsl:attribute name="name"> |
| | | <xsl:apply-templates select="." mode="class.name"/> |
| | | </xsl:attribute> |
| | | <xsl:copy-of select="method"/> |
| | | </xsl:element> |
| | | </xsl:for-each> |
| | | </xsl:element> |
| | | </xsl:variable> |
| | | |
| | | <xsl:variable name="doctree" select="xalan:nodeset($doctree.var)"/> |
| | | |
| | | <xsl:template match="metrics"> |
| | | |
| | | <!-- 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> |
| | | |
| | | <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"/> |
| | | </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"/> |
| | | </xsl:template> |
| | | |
| | | |
| | | <xsl:template match="package"> |
| | | <xsl:variable name="package.name" select="@name"/> |
| | | <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> |
| | | <!-- 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]"> |
| | | <!--Processing <xsl:value-of select="$class.name"/><xsl:text> </xsl:text> --> |
| | | <redirect:write file="{$output.dir}/{$package.dir}/{@name}.html"> |
| | | <xsl:apply-templates select="." mode="class.details"/> |
| | | </redirect:write> |
| | | </xsl:for-each> |
| | | </xsl:template> |
| | | |
| | | <!-- little trick to compute the classname for inner and non inner classes --> |
| | | <!-- this is all in one line to avoid CRLF in the name --> |
| | | <xsl:template match="class" mode="class.name"> |
| | | <xsl:if test="parent::class"><xsl:apply-templates select="parent::class" mode="class.name"/>.<xsl:value-of select="@name"/></xsl:if><xsl:if test="not(parent::class)"><xsl:value-of select="@name"/></xsl:if> |
| | | </xsl:template> |
| | | |
| | | |
| | | <xsl:template name="index.html"> |
| | | <HTML> |
| | | <HEAD><TITLE>Metrics 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> |
| | | |
| | | <!-- this is the stylesheet css to use for nearly everything --> |
| | | <xsl:template name="metrics-reference.html"> |
| | | <html> |
| | | <head> |
| | | <link title="Style" type="text/css" rel="stylesheet" href="stylesheet.css"/> |
| | | </head> |
| | | <body style="text-align:justify;"> |
| | | <h2>Metrics Reference</h2> |
| | | <a href="#V(G)">V(G)</a> | |
| | | <a href="#LOC">LOC</a> | |
| | | <a href="#DIT">DIT</a> | |
| | | <a href="#NOA">NOA</a> | |
| | | <a href="#NRM">NRM</a> | |
| | | <a href="#NLM">NLM</a> | |
| | | <a href="#WMC">WMC</a> | |
| | | <a href="#RFC">RFC</a> | |
| | | <a href="#DAC">DAC</a> | |
| | | <a href="#FANOUT">FANOUT</a> | |
| | | <a href="#CBO">CBO</a> | |
| | | <a href="#LCOM">LCOM</a> | |
| | | <a href="#NOC">NOC</a> |
| | | |
| | | <a name="V(G)"/> |
| | | <h3>Cyclomatic Complexity - V(G)</h3> |
| | | This metric was introduced in the 1970s to measure the amount of control |
| | | flow complexity or branching complexity in a module such as a |
| | | subroutine. It gives the number of paths that may be taken through the |
| | | code, and was initially developed to give some measure of the cost of |
| | | producing a test case for the module by executing each path. |
| | | <p/> |
| | | Methods with a high cyclomatic complexity tend to be more difficult to |
| | | understand and maintain. In general the more complex the methods of an |
| | | application, the more difficult it will be to test it, and this will adversely |
| | | affect its reliability. |
| | | <p/> |
| | | V(G) is a measure of the control flow complexity of a method or |
| | | constructor. It counts the number of branches in the body of the method, |
| | | defined as: |
| | | <ul> |
| | | <li>while statements;</li> |
| | | <li>if statements;</li> |
| | | <li>for statements.</li> |
| | | </ul> |
| | | |
| | | The metric can also be configured to count each case of a switch |
| | | statement as well. |
| | | |
| | | <a name="LOC"/> |
| | | <h3>Lines of Code - LOC</h3> |
| | | |
| | | This is perhaps the simplest of all the metrics to define and compute. |
| | | Counting lines has a long history as a software metric dating from before |
| | | the rise of structured programming, and it is still in widespread use today. |
| | | The size of a method affects the ease with which it can be understood, its |
| | | reusability and its maintainability. There are a variety of ways that the size |
| | | can be calculated. These include counting all the lines of code, the number |
| | | of statements, the blank lines of code, the lines of commentary, and the |
| | | lines consisting only of syntax such as block delimiters. |
| | | <p/> |
| | | This metric can also be used for sizing other constructs as well, for |
| | | example, the overall size of a Java class or package can be measured by |
| | | counting the number of source lines it consists of. |
| | | <p/> |
| | | LOC can be used to determine the size of a compilation unit (source file), |
| | | class or interface, method, constructor, or field. It can be configured to |
| | | ignore: |
| | | <ul> |
| | | <li>blank lines;</li> |
| | | <li>lines consisting only of comments;</li> |
| | | <li>lines consisting only of opening and closing braces.</li> |
| | | </ul> |
| | | |
| | | <a name="DIT"/> |
| | | <h3>Depth of Inheritance Hierarchy - DIT</h3> |
| | | |
| | | This metric calculates how far down the inheritance hierarchy a class is |
| | | declared. In Java all classes have java.lang.Object as their ultimate |
| | | superclass, which is defined to have a depth of 1. So a class that |
| | | immediately extends java.lang.Object has a metric value of 2; any of its |
| | | subclasses will have a value of 3, and so on. |
| | | <p/> |
| | | A class that is deep within the tree inherits more methods and state |
| | | variables, thereby increasing its complexity and making it difficult to |
| | | predict its behavior. It can be harder to understand a system with many |
| | | inheritance layers. |
| | | <p/> |
| | | DIT is defined for classes and interfaces: |
| | | <ul> |
| | | <li>all interface types have a depth of 1;</li> |
| | | <li>the class java.lang.Object has a depth of 1;</li> |
| | | <li>all other classes have a depth of 1 + the depth of their super class.</li> |
| | | </ul> |
| | | |
| | | <a name="NOA"/> |
| | | <h3>Number of Attributes - NOA</h3> |
| | | |
| | | The number of distinct state variables in a class serves as one measure of |
| | | its complexity. The more state a class represents the more difficult it is to |
| | | maintain invariants for it. It also hinders comprehensibility and reuse. |
| | | <p/> |
| | | In Java, state can be exposed to subclasses through protected fields, which |
| | | entails that the subclass also be aware of and maintain any invariants. This |
| | | interference with the class's data encapsulation can be a source of defects |
| | | and hidden dependencies between the state variables. |
| | | <p/> |
| | | NOA is defined for classes and interfaces. It counts the number of fields |
| | | declared in the class or interface. |
| | | |
| | | <a name="NRM"/> |
| | | <h3>Number of Remote Methods - NRM</h3> |
| | | |
| | | NRM is defined for classes. A remote method call is defined as an |
| | | invocation of a method that is not declared in any of: |
| | | <ul> |
| | | <li>the class itself;</li> |
| | | <li>a class or interface that the class extends or implements;</li> |
| | | <li>a class or method that extends the class.</li> |
| | | </ul> |
| | | |
| | | The value is the count of all the remote method calls in all of the methods |
| | | and constructors of the class. |
| | | |
| | | <a name="NLM"/> |
| | | <h3>Number of Local Methods - NLM</h3> |
| | | |
| | | NLM is defined for classes and interfaces. A local method is defined as a |
| | | method that is declared in the class or interface. NLM can be configured to |
| | | include the local methods of all of the class's superclasses. Methods with |
| | | public, protected, package and private visibility can be independently |
| | | counted by setting configuration parameters. |
| | | |
| | | <a name="WMC"/> |
| | | <h3>Weighted Methods per Class - WMC</h3> |
| | | |
| | | If the number of methods in a class can be determined during the design |
| | | and modeling phase of a project, it can be used as a predictor of how |
| | | much time and effort is needed to develop, debug and maintain it. This |
| | | metric can be further refined by incorporating a weighting for the |
| | | complexity of each method. The usual weighting is given by the cyclomatic |
| | | complexity of the method. |
| | | <p/> |
| | | The subclasses of a class inherit all of its public and protected methods, |
| | | and possibly its package methods as well, so the number of methods a |
| | | class has directly impacts the complexity of its subclasses. Classes with |
| | | large numbers of methods are often specific to a particular application, |
| | | reducing the ability to reuse them. |
| | | <p/> |
| | | The definition of WMC is based upon NLM, and it provides the same |
| | | configuration parameters for counting inherited methods and of varying |
| | | visibility. The main difference is that NLM always counts each method as 1, |
| | | whereas WMC will weight each method. There are two weighting schemes: |
| | | <ul> |
| | | <li>V(G) the cyclomatic complexity of the method is used as its weight. |
| | | Methods from class files are given a V(G) of 1.</li> |
| | | <li>the arity, or the number of parameters of the method are used to |
| | | determine the weight.</li> |
| | | </ul> |
| | | |
| | | <a name="RFC"/> |
| | | <h3>Response For Class - RFC</h3> |
| | | |
| | | The response set of a class is the set of all methods that can be invoked as |
| | | a result of a message sent to an object of the class. This includes methods |
| | | in the class's inheritance hierarchy and methods that can be invoked on |
| | | other objects. The Response For Class metric is defined to be size of the |
| | | response set for the class. A class which provides a larger response set is |
| | | considered to be more complex than one with a smaller response set. |
| | | <p/> |
| | | One reason for this is that if a method call on a class can result in a large |
| | | number of different method calls on the target and other classes, then it |
| | | can be harder to test the behavior of the class and debug problems. It will |
| | | typically require a deeper understanding of the potential interactions that |
| | | objects of the class can have with the rest of the system. |
| | | <p/> |
| | | RFC is defined as the sum of NLM and NRM for the class. The local methods |
| | | include all of the public, protected, package and private methods, but not |
| | | methods declared only in a superclass. |
| | | |
| | | <a name="DAC"/> |
| | | <h3>Data Abstraction Coupling - DAC</h3> |
| | | |
| | | DAC is defined for classes and interfaces. It counts the number of reference |
| | | types that are used in the field declarations of the class or interface. The |
| | | component types of arrays are also counted. Any field with a type that is |
| | | either a supertype or a subtype of the class is not counted. |
| | | |
| | | <a name="FANOUT"/> |
| | | <h3>Fan Out - FANOUT</h3> |
| | | |
| | | FANOUT is defined for classes and interfaces, constructors and methods. It |
| | | counts the number of reference types that are used in: |
| | | <ul> |
| | | <li>field declarations;</li> |
| | | <li>formal parameters and return types;</li> |
| | | <li>throws declarations;</li> |
| | | <li>local variables.</li> |
| | | </ul> |
| | | |
| | | The component types of arrays are also counted. Any type that is either a |
| | | supertype or a subtype of the class is not counted. |
| | | |
| | | <a name="CBO"/> |
| | | <h3>Coupling Between Objects - CBO</h3> |
| | | |
| | | When one object or class uses another object or class they are said to be |
| | | coupled. One major source of coupling is that between a superclass and a |
| | | subclass. A coupling is also introduced when a method or field in another |
| | | class is accessed, or when an object of another class is passed into or out |
| | | of a method invocation. Coupling Between Objects is a measure of the |
| | | non-inheritance coupling between two objects. |
| | | <p/> |
| | | A high value of coupling reduces the modularity of the class and makes |
| | | reuse more difficult. The more independent a class is the more likely it is |
| | | that it will be possible to reuse it in another part of the system. When a |
| | | class is coupled to another class it becomes sensitive to changes in that |
| | | class, thereby making maintenance for difficult. In addition, a class that is |
| | | overly dependent on other classes can be difficult to understand and test in |
| | | isolation. |
| | | <p/> |
| | | CBO is defined for classes and interfaces, constructors and methods. It |
| | | counts the number of reference types that are used in: |
| | | <ul> |
| | | <li>field declarations</li> |
| | | <li>formal parameters and return types</li> |
| | | <li>throws declarations</li> |
| | | <li>local variables</li> |
| | | </ul> |
| | | |
| | | It also counts: |
| | | <ul> |
| | | <li>types from which field and method selections are made</li> |
| | | </ul> |
| | | |
| | | The component types of arrays are also counted. Any type that is either a |
| | | supertype or a subtype of the class is not counted. |
| | | |
| | | <a name="LCOM"/> |
| | | <h3>Lack of Cohesion Of Methods - LCOM</h3> |
| | | |
| | | The cohesion of a class is the degree to which its methods are related to |
| | | each other. It is determined by examining the pattern of state variable |
| | | accesses within the set of methods. If all the methods access the same state |
| | | variables then they have high cohesion; if they access disjoint sets of |
| | | variables then the cohesion is low. An extreme example of low cohesion |
| | | would be if none of the methods accessed any of the state variables. |
| | | |
| | | If a class exhibits low method cohesion it indicates that the design of the |
| | | class has probably been partitioned incorrectly, and could benefit by being |
| | | split into more classes with individually higher cohesion. On the other |
| | | hand, a high value of cohesion (a low lack of cohesion) implies that the |
| | | class is well designed. A cohesive class will tend to provide a high degree |
| | | of encapsulation, whereas a lack of cohesion decreases encapsulation and |
| | | increases complexity. |
| | | <p/> |
| | | Another form of cohesion that is useful for Java programs is cohesion |
| | | between nested and enclosing classes. A nested class that has very low |
| | | cohesion with its enclosing class would probably better designed as a peer |
| | | class rather than a nested class. |
| | | <p/> |
| | | LCOM is defined for classes. Operationally, LCOM takes each pair of |
| | | methods in the class and determines the set of fields they each access. If |
| | | they have disjoint sets of field accesses increase the count P by one. If they |
| | | share at least one field access then increase Q by one. After considering |
| | | each pair of methods, |
| | | LCOM = (P > Q) ? (P - Q) : 0 |
| | | <p/> |
| | | Indirect access to fields via local methods can be considered by setting a |
| | | metric configuration parameter. |
| | | |
| | | <a name="NOC"/> |
| | | <h3>Number Of Classes - NOC</h3> |
| | | |
| | | The overall size of the system can be estimated by calculating the number |
| | | of classes it contains. A large system with more classes is more complex |
| | | than a smaller one because the number of potential interactions between |
| | | objects is higher. This reduces the comprehensibility of the system which |
| | | in turn makes it harder to test, debug and maintain. |
| | | <p/> |
| | | If the number of classes in the system can be projected during the initial |
| | | design phase of the project it can serve as a base for estimating the total |
| | | effort and cost of developing, debugging and maintaining the system. |
| | | <p/> |
| | | The NOC metric can also usefully be applied at the package and class level |
| | | as well as the total system. |
| | | <p/> |
| | | NOCL is defined for class and interfaces. It counts the number of classes or |
| | | interfaces that are declared. This is usually 1, but nested class declarations |
| | | will increase this number. |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <!-- this is the stylesheet css to use for nearly everything --> |
| | | <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; |
| | | } |
| | | .a td { |
| | | background: #efefef; |
| | | } |
| | | .b 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; |
| | | } |
| | | .Error { |
| | | font-weight:bold; color:red; |
| | | } |
| | | |
| | | </xsl:template> |
| | | |
| | | <!-- print the metrics of the class --> |
| | | <xsl:template match="class" mode="class.details"> |
| | | <!--xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/--> |
| | | <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 = '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> |
| | | </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%"> |
| | | <!-- xalan-nodeset:nodeset for Xalan 1.2.2 --> |
| | | <xsl:for-each select="$doctree/classes/class[@package = current()/@name]"> |
| | | <xsl:sort select="@name"/> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a> |
| | | </td> |
| | | </tr> |
| | | </xsl:for-each> |
| | | </TABLE> |
| | | </BODY> |
| | | </HTML> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- |
| | | Creates an all-classes.html file that contains a link to all package-summary.html |
| | | on each class. |
| | | --> |
| | | <xsl:template match="metrics" mode="all.classes"> |
| | | <html> |
| | | <head> |
| | | <xsl:call-template name="create.stylesheet.link"> |
| | | <xsl:with-param name="package.name" select="''"/> |
| | | </xsl:call-template> |
| | | </head> |
| | | <body> |
| | | <h2>Classes</h2> |
| | | <table width="100%"> |
| | | <xsl:for-each select="$doctree/classes/class"> |
| | | <xsl:sort select="@name"/> |
| | | <xsl:apply-templates select="." mode="all.classes"/> |
| | | </xsl:for-each> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="class" mode="all.classes"> |
| | | <xsl:variable name="package.name" select="@package"/> |
| | | <xsl:variable name="class.name" select="@name"/> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a target="classFrame"> |
| | | <xsl:attribute name="href"> |
| | | <xsl:if test="not($package.name='unnamed package')"> |
| | | <xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text> |
| | | </xsl:if> |
| | | <xsl:value-of select="$class.name"/><xsl:text>.html</xsl:text> |
| | | </xsl:attribute> |
| | | <xsl:value-of select="$class.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 :( |
| | | --> |
| | | <xsl:template match="metrics" mode="all.packages"> |
| | | <html> |
| | | <head> |
| | | <xsl:call-template name="create.stylesheet.link"> |
| | | <xsl:with-param name="package.name" select="./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=".//package[not(./@name = 'unnamed package')]" mode="all.packages"> |
| | | <xsl:sort select="@name"/> |
| | | </xsl:apply-templates> |
| | | </table> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="package" mode="all.packages"> |
| | | <tr> |
| | | <td nowrap="nowrap"> |
| | | <a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame"> |
| | | <xsl:value-of select="@name"/> |
| | | </a> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | |
| | | <xsl:template match="metrics" mode="overview.packages"> |
| | | <html> |
| | | <head> |
| | | <xsl:call-template name="create.stylesheet.link"> |
| | | <xsl:with-param name="package.name" select="''"/> |
| | | </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><a href="metrics-reference.html#V(G)">V(G)</a></th> |
| | | <th><a href="metrics-reference.html#LOC">LOC</a></th> |
| | | <th><a href="metrics-reference.html#DIT">DIT</a></th> |
| | | <th><a href="metrics-reference.html#NOA">NOA</a></th> |
| | | <th><a href="metrics-reference.html#NRM">NRM</a></th> |
| | | <th><a href="metrics-reference.html#NLM">NLM</a></th> |
| | | <th><a href="metrics-reference.html#WMC">WMC</a></th> |
| | | <th><a href="metrics-reference.html#RFC">RFC</a></th> |
| | | <th><a href="metrics-reference.html#DAC">DAC</a></th> |
| | | <th><a href="metrics-reference.html#FANOUT">FANOUT</a></th> |
| | | <th><a href="metrics-reference.html#CBO">CBO</a></th> |
| | | <th><a href="metrics-reference.html#LCOM">LCOM</a></th> |
| | | <th><a href="metrics-reference.html#NOCL">NOCL</a></th> |
| | | </tr> |
| | | <xsl:apply-templates select="." mode="print.metrics"/> |
| | | </table> |
| | | <table border="0" width="100%"> |
| | | <tr> |
| | | <td style="text-align: justify;"> |
| | | Note: Metrics evaluate the quality of software by analyzing the program source and quantifying |
| | | various kind of complexity. Complexity is a common source of problems and defects in software. |
| | | High complexity makes it more difficult to develop, understand, maintain, extend, test and debug |
| | | a program. |
| | | <p/> |
| | | The primary use of metrics is to focus your attention on those parts of code that potentially are |
| | | complexity hot spots. Once the complex areas your program have been uncovered, you can take remedial |
| | | actions. |
| | | For additional information about metrics and their meaning, please consult |
| | | Metamata Metrics manual. |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <h3>Packages</h3> |
| | | <table border="0" cellpadding="5" cellspacing="2" width="100%"> |
| | | <xsl:call-template name="all.metrics.header"/> |
| | | <xsl:for-each select=".//package[not(@name = 'unnamed package')]"> |
| | | <xsl:sort select="@name" order="ascending"/> |
| | | <xsl:apply-templates select="." mode="print.metrics"/> |
| | | </xsl:for-each> |
| | | </table> |
| | | <!-- @bug there could some classes at this level (classes in unnamed package) --> |
| | | <xsl:call-template name="pageFooter"/> |
| | | </body> |
| | | </html> |
| | | </xsl:template> |
| | | |
| | | <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> |
| | | <body onload="open('package-frame.html','classListFrame')"> |
| | | <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;"> |
| | | Note: Metrics evaluate the quality of software by analyzing the program source and quantifying |
| | | various kind of complexity. Complexity is a common source of problems and defects in software. |
| | | High complexity makes it more difficult to develop, understand, maintain, extend, test and debug |
| | | a program. |
| | | <p/> |
| | | The primary use of metrics is to focus your attention on those parts of code that potentially are |
| | | complexity hot spots. Once the complex areas your program have been uncovered, you can take remedial |
| | | actions. |
| | | For additional information about metrics and their meaning, please consult |
| | | Metamata Metrics manual. |
| | | </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> |
| | | <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%"> |
| | | <xsl:call-template name="all.metrics.header"/> |
| | | <xsl:for-each select="$classes-in-package"> |
| | | <xsl:sort select="@name"/> |
| | | <xsl:apply-templates select="." mode="print.metrics"/> |
| | | </xsl:for-each> |
| | | </table> |
| | | </xsl:if> |
| | | |
| | | <xsl:call-template name="pageFooter"/> |
| | | </body> |
| | | </HTML> |
| | | </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> |
| | | |
| | | |
| | | <!-- 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:template> |
| | | |
| | | |
| | | <!-- Page Header --> |
| | | <xsl:template name="pageHeader"> |
| | | |
| | | <!-- jakarta logo --> |
| | | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| | | <tr> |
| | | <td class="bannercell" rowspan="2"> |
| | | <a href="http://jakarta.apache.org/"> |
| | | <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 Metrics</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 Metrics</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td> |
| | | </tr> |
| | | </table> |
| | | <hr size="1"/> |
| | | </xsl:template> |
| | | |
| | | <!-- Page Footer --> |
| | | <xsl:template name="pageFooter"> |
| | | </xsl:template> |
| | | |
| | | <!-- class header --> |
| | | <xsl:template name="all.metrics.header"> |
| | | <tr> |
| | | <th width="80%">Name</th> |
| | | <th nowrap="nowrap">V(G)</th> |
| | | <th>LOC</th> |
| | | <th>DIT</th> |
| | | <th>NOA</th> |
| | | <th>NRM</th> |
| | | <th>NLM</th> |
| | | <th>WMC</th> |
| | | <th>RFC</th> |
| | | <th>DAC</th> |
| | | <th>FANOUT</th> |
| | | <th>CBO</th> |
| | | <th>LCOM</th> |
| | | <th>NOCL</th> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- method header --> |
| | | <xsl:template name="method.metrics.header"> |
| | | <tr> |
| | | <th width="80%">Name</th> |
| | | <th nowrap="nowrap">V(G)</th> |
| | | <th>LOC</th> |
| | | <th>FANOUT</th> |
| | | <th>CBO</th> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- method information --> |
| | | <xsl:template match="method" mode="print.metrics"> |
| | | <tr> |
| | | <xsl:call-template name="alternate-row"/> |
| | | <td><xsl:apply-templates select="@name"/></td> |
| | | <td><xsl:apply-templates select="@vg"/></td> |
| | | <td><xsl:apply-templates select="@loc"/></td> |
| | | <td><xsl:apply-templates select="@fanout"/></td> |
| | | <td><xsl:apply-templates select="@cbo"/></td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- class information --> |
| | | <xsl:template match="class" mode="print.metrics"> |
| | | <tr> |
| | | <xsl:call-template name="alternate-row"/> |
| | | <td><a href="{@name}.html"><xsl:value-of select="@name"/></a></td> |
| | | <td><xsl:apply-templates select="@vg"/></td> |
| | | <td><xsl:apply-templates select="@loc"/></td> |
| | | <td><xsl:apply-templates select="@dit"/></td> |
| | | <td><xsl:apply-templates select="@noa"/></td> |
| | | <td><xsl:apply-templates select="@nrm"/></td> |
| | | <td><xsl:apply-templates select="@nlm"/></td> |
| | | <td><xsl:apply-templates select="@wmc"/></td> |
| | | <td><xsl:apply-templates select="@rfc"/></td> |
| | | <td><xsl:apply-templates select="@dac"/></td> |
| | | <td><xsl:apply-templates select="@fanout"/></td> |
| | | <td><xsl:apply-templates select="@cbo"/></td> |
| | | <td><xsl:apply-templates select="@lcom"/></td> |
| | | <td><xsl:apply-templates select="@nocl"/></td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="file|package" mode="print.metrics"> |
| | | <tr> |
| | | <xsl:call-template name="alternate-row"/> |
| | | <td> |
| | | <a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame"> |
| | | <xsl:value-of select="@name"/> |
| | | </a> |
| | | </td> |
| | | <td><xsl:apply-templates select="@vg"/></td> |
| | | <td><xsl:apply-templates select="@loc"/></td> |
| | | <td><xsl:apply-templates select="@dit"/></td> |
| | | <td><xsl:apply-templates select="@noa"/></td> |
| | | <td><xsl:apply-templates select="@nrm"/></td> |
| | | <td><xsl:apply-templates select="@nlm"/></td> |
| | | <td><xsl:apply-templates select="@wmc"/></td> |
| | | <td><xsl:apply-templates select="@rfc"/></td> |
| | | <td><xsl:apply-templates select="@dac"/></td> |
| | | <td><xsl:apply-templates select="@fanout"/></td> |
| | | <td><xsl:apply-templates select="@cbo"/></td> |
| | | <td><xsl:apply-templates select="@lcom"/></td> |
| | | <td><xsl:apply-templates select="@nocl"/></td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="metrics" mode="print.metrics"> |
| | | <tr> |
| | | <xsl:call-template name="alternate-row"/> |
| | | <!-- the global metrics is the top package metrics --> |
| | | <td><xsl:apply-templates select="./package/@vg"/></td> |
| | | <td><xsl:apply-templates select="./package/@loc"/></td> |
| | | <td><xsl:apply-templates select="./package/@dit"/></td> |
| | | <td><xsl:apply-templates select="./package/@noa"/></td> |
| | | <td><xsl:apply-templates select="./package/@nrm"/></td> |
| | | <td><xsl:apply-templates select="./package/@nlm"/></td> |
| | | <td><xsl:apply-templates select="./package/@wmc"/></td> |
| | | <td><xsl:apply-templates select="./package/@rfc"/></td> |
| | | <td><xsl:apply-templates select="./package/@dac"/></td> |
| | | <td><xsl:apply-templates select="./package/@fanout"/></td> |
| | | <td><xsl:apply-templates select="./package/@cbo"/></td> |
| | | <td><xsl:apply-templates select="./package/@lcom"/></td> |
| | | <td><xsl:apply-templates select="./package/@nocl"/></td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <!-- alternated row style --> |
| | | <xsl:template name="alternate-row"> |
| | | <xsl:attribute name="class"> |
| | | <xsl:if test="position() mod 2 = 1">a</xsl:if> |
| | | <xsl:if test="position() mod 2 = 0">b</xsl:if> |
| | | </xsl:attribute> |
| | | </xsl:template> |
| | | |
| | | |
| | | <!-- how to display the metrics with their max value --> |
| | | <!-- @todo the max values must be external to the xsl --> |
| | | |
| | | <xsl:template match="@vg"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$vg.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@loc"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <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()"/> |
| | | <xsl:with-param name="max" select="$dit.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@noa"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$noa.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@nrm"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$nrm.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@nlm"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$nlm.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@wmc"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$wmc.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@rfc"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$rfc.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@dac"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$dac.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@fanout"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$fanout.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@cbo"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$cbo.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@lcom"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$lcom.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="@nocl"> |
| | | <xsl:call-template name="display-value"> |
| | | <xsl:with-param name="value" select="current()"/> |
| | | <xsl:with-param name="max" select="$nocl.max"/> |
| | | </xsl:call-template> |
| | | </xsl:template> |
| | | |
| | | <xsl:template name="display-value"> |
| | | <xsl:param name="value"/> |
| | | <xsl:param name="max"/> |
| | | <xsl:if test="$value > $max"> |
| | | <xsl:attribute name="class">Error</xsl:attribute> |
| | | </xsl:if> |
| | | <xsl:value-of select="$value"/> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| | | |
| New file |
| | |
| | | <!-- |
| | | 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" |
| | | version="1.0"> |
| | | <xsl:param name="title"/> |
| | | <xsl:param name="module"/> |
| | | <xsl:param name="cvsweb"/> |
| | | |
| | | <xsl:output method="html" indent="yes"/> |
| | | |
| | | <!-- Copy standard document elements. Elements that |
| | | should be ignored must be filtered by apply-templates |
| | | tags. --> |
| | | <xsl:template match="*"> |
| | | <xsl:copy> |
| | | <xsl:copy-of select="attribute::*[. != '']"/> |
| | | <xsl:apply-templates/> |
| | | </xsl:copy> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="tagdiff"> |
| | | <html> |
| | | <head> |
| | | <title><xsl:value-of select="$title"/></title> |
| | | <style type="text/css"> |
| | | body, p { |
| | | font-family: verdana,arial,helvetica; |
| | | font-size: 80%; |
| | | color:#000000; |
| | | } |
| | | .dateAndAuthor { |
| | | font-family: verdana,arial,helvetica; |
| | | font-size: 80%; |
| | | font-weight: bold; |
| | | text-align:left; |
| | | background:#a6caf0; |
| | | } |
| | | tr, td{ |
| | | font-family: verdana,arial,helvetica; |
| | | font-size: 80%; |
| | | background:#eeeee0; |
| | | } |
| | | </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://ant.apache.org/">Ant</a>.</p> |
| | | <hr size="2"/> |
| | | <a name="TOP"/> |
| | | <table width="100%"> |
| | | <tr> |
| | | <td align="right"> |
| | | <a href="#New">New Files</a> | |
| | | <a href="#Modified">Modified Files</a> | |
| | | <a href="#Removed">Removed Files</a> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <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> |
| | | <xsl:with-param name="entries" select=".//entry[file/revision][not(file/prevrevision)]"/> |
| | | </xsl:call-template> |
| | | |
| | | <xsl:call-template name="show-entries"> |
| | | <xsl:with-param name="title">Modified Files</xsl:with-param> |
| | | <xsl:with-param name="anchor">Modified</xsl:with-param> |
| | | <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)][file/prevrevision]"/> |
| | | </xsl:call-template> |
| | | </table> |
| | | |
| | | </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"> |
| | | <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"> |
| | | <xsl:text> </xsl:text> |
| | | </td> |
| | | <td> |
| | | <ul> |
| | | <xsl:apply-templates select="$entries"/> |
| | | </ul> |
| | | </td> |
| | | </tr> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="entry"> |
| | | <xsl:apply-templates select="file"/> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="date"> |
| | | <i><xsl:value-of select="."/></i> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="time"> |
| | | <i><xsl:value-of select="."/></i> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="author"> |
| | | <i> |
| | | <a> |
| | | <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute> |
| | | <xsl:value-of select="."/> |
| | | </a> |
| | | </i> |
| | | </xsl:template> |
| | | |
| | | <xsl:template match="file"> |
| | | <li> |
| | | <a target="_new"> |
| | | <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" /></xsl:attribute> |
| | | <xsl:value-of select="name" /> |
| | | </a> |
| | | <xsl:if test="string-length(prevrevision) > 0 or string-length(revision) > 0"> |
| | | <xsl:text> </xsl:text> |
| | | <a target="_new"> |
| | | <xsl:choose> |
| | | <xsl:when test="string-length(prevrevision) = 0 "> |
| | | <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute> |
| | | </xsl:when> |
| | | <xsl:otherwise> |
| | | <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/>&diff_format=h</xsl:attribute> |
| | | </xsl:otherwise> |
| | | </xsl:choose> (<xsl:value-of select="revision"/>) |
| | | </a> |
| | | </xsl:if> |
| | | </li> |
| | | </xsl:template> |
| | | |
| | | <!-- Any elements within a msg are processed, |
| | | so that we can preserve HTML tags. --> |
| | | <xsl:template match="msg"> |
| | | <b><xsl:apply-templates/></b> |
| | | </xsl:template> |
| | | |
| | | </xsl:stylesheet> |
| New file |
| | |
| | | <?xml 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. |
| | | --> |
| | | <!-- |
| | | ======================================================================= |
| | | Build file to fetch optional libraries for Apache Ant |
| | | ======================================================================= |
| | | --> |
| | | <project name="fetch" default="all" basedir="."> |
| | | |
| | | <description> |
| | | This build file downloads JAR files that optional Ant tasks use, |
| | | and installs them in a location that is accessible the next time Ant runs. |
| | | |
| | | You can choose three locations, by going -Ddest=LOCATION on the command line |
| | | -Ddest=user user lib dir ${user.home}/.ant/lib |
| | | -Ddest=system ant lib dir ${ant.home}/lib --Default-- |
| | | -Ddest=optional optional dir ${ant.home}/lib/optional (for Ant developers) |
| | | |
| | | You may also need to set proxy settings. On Java1.5, Ant tries to get |
| | | this from the OS, unless you use the -noproxy option. |
| | | |
| | | Proxies can be configured manually setting the JVM proxy values in the |
| | | ANT_OPTS environment variable. |
| | | |
| | | For example, to set the proxy up in the tcsh shell, the command would be |
| | | something like: |
| | | |
| | | For csh/tcsh: |
| | | setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080" |
| | | For bash: |
| | | export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080" |
| | | For Windows, set the environment variable in the appropriate dialog box |
| | | and open a new console. or, by hand |
| | | set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 |
| | | </description> |
| | | |
| | | <!-- Give user a chance to override without editing this file |
| | | (and without typing -D each time it compiles it) --> |
| | | <property file="${user.home}/.ant/ant.properties"/> |
| | | <property name="lib.dir" location="lib" /> |
| | | <property name="optional.dir" location="${lib.dir}/optional" /> |
| | | <property name="userlib.dir" location="${user.home}/.ant/lib" /> |
| | | |
| | | <!-- load in our properties table --> |
| | | <property file="${lib.dir}/libraries.properties"/> |
| | | |
| | | <import file="get-m2.xml" /> |
| | | |
| | | <target name="pick-dest"> |
| | | <property name="dest" value="system" /> |
| | | <condition property="dest.dir" |
| | | value="${lib.dir}"> |
| | | <equals arg1="${dest}" arg2="system" /> |
| | | </condition> |
| | | <condition property="dest.dir" |
| | | value="${optional.dir}"> |
| | | <equals arg1="${dest}" arg2="optional" /> |
| | | </condition> |
| | | <condition property="dest.dir" |
| | | value="${userlib.dir}"> |
| | | <equals arg1="${dest}" arg2="user" /> |
| | | </condition> |
| | | <fail unless="dest.dir">Unknown destination : ${dest}</fail> |
| | | <echo>Downloading to ${dest.dir}</echo> |
| | | <property name="m2.dest.dir" value="${dest.dir}" /> |
| | | </target> |
| | | |
| | | |
| | | <target name="macros" depends="pick-dest,get-m2" |
| | | xmlns:artifact="antlib:org.apache.maven.artifact.ant"> |
| | | |
| | | <macrodef name="f2"> |
| | | <attribute name="project" /> |
| | | <attribute name="archive" default="@{project}"/> |
| | | <sequential> |
| | | <fail> |
| | | Unknown archive @{archive} -no property @{archive}.version defined. |
| | | <condition> |
| | | <not> |
| | | <isset property="@{archive}.version"/> |
| | | </not> |
| | | </condition> |
| | | </fail> |
| | | <artifact:dependencies pathID="@{archive}.path"> |
| | | <dependency groupID="@{project}" |
| | | artifactID="@{archive}" |
| | | version="${@{archive}.version}"/> |
| | | </artifact:dependencies> |
| | | <!-- now we are left with the problem of getting the files |
| | | into our directory --> |
| | | <copypath destdir="${dest.dir}" pathref="@{archive}.path"> |
| | | <flattenmapper/> |
| | | </copypath> |
| | | </sequential> |
| | | </macrodef> |
| | | </target> |
| | | |
| | | |
| | | |
| | | <!-- any init stuff --> |
| | | <target name="init" depends="macros" /> |
| | | |
| | | |
| | | <target name="diag" depends="init"> |
| | | <echoproperties /> |
| | | </target> |
| | | |
| | | <target name="logging" |
| | | description="load logging libraries" |
| | | depends="init"> |
| | | <f2 project="log4j" /> |
| | | <f2 project="commons-logging" archive="commons-logging-api" /> |
| | | </target> |
| | | |
| | | <target name="junit" |
| | | description="load junit libraries" |
| | | depends="init"> |
| | | <f2 project="junit" /> |
| | | </target> |
| | | |
| | | <target name="xml" |
| | | description="load full XML libraries (xalan, resolver)" |
| | | depends="init"> |
| | | <f2 project="xalan" /> |
| | | <f2 project="xml-resolver" /> |
| | | </target> |
| | | |
| | | <!-- |
| | | This is not used as |
| | | 1. we want the names of the libraries to be fixed, or it will break Ant's manifest. |
| | | 2. We like to get the more recent artifacts than are in the repo at the time of writing (2006-10-16) |
| | | 3. Xerces has a dependency on v 1.3.03 of Xml-apis, which is wrong. |
| | | If/when the artifacts stabilize, we could switch to it. |
| | | --> |
| | | |
| | | <target name="xerces" |
| | | description="load an updated version of Xerces" |
| | | depends="init"> |
| | | <f2 project="xerces" archive="xercesImpl"/> |
| | | <f2 project="xerces" archive="xmlParserAPIs" /> |
| | | </target> |
| | | |
| | | <target name="networking" |
| | | description="load networking libraries (commons-net; jsch)" |
| | | depends="init"> |
| | | <f2 project="commons-net" /> |
| | | <f2 project="com.jcraft" archive="jsch"/> |
| | | </target> |
| | | |
| | | <target name="regexp" |
| | | description="load regexp libraries" |
| | | depends="init"> |
| | | <f2 project="regexp" /> |
| | | <f2 project="oro" /> |
| | | </target> |
| | | |
| | | <target name="antlr" |
| | | description="load antlr libraries" |
| | | depends="init"> |
| | | <f2 project="antlr" /> |
| | | </target> |
| | | |
| | | <target name="bcel" |
| | | description="load bcel libraries" |
| | | depends="init"> |
| | | <f2 project="bcel" /> |
| | | </target> |
| | | |
| | | <target name="jdepend" |
| | | description="load jdepend libraries" |
| | | depends="init"> |
| | | <f2 project="jdepend" /> |
| | | </target> |
| | | |
| | | <target name="bsf" |
| | | description="load bsf libraries" |
| | | depends="init"> |
| | | <f2 project="bsf" /> |
| | | </target> |
| | | |
| | | <target name="jruby" |
| | | description="load jruby" |
| | | depends="bsf"> |
| | | <f2 project="org.jruby" archive="jruby"/> |
| | | </target> |
| | | |
| | | <target name="beanshell" |
| | | description="load beanshell support" |
| | | depends="bsf"> |
| | | <f2 project="org.beanshell" archive="bsh"/> |
| | | <f2 project="org.beanshell" archive="bsh-core"/> |
| | | </target> |
| | | |
| | | <target name="jython" |
| | | description="load jython" |
| | | depends="bsf"> |
| | | <f2 project="jython" archive="jython"/> |
| | | </target> |
| | | |
| | | <target name="rhino" |
| | | description="load rhino" |
| | | depends="bsf"> |
| | | <f2 project="rhino" archive="js"/> |
| | | </target> |
| | | |
| | | <target name="script" |
| | | description="load script languages" |
| | | depends="bsf,jruby,jython,beanshell,rhino"/> |
| | | |
| | | <target name="debugging" |
| | | description="internal ant debugging" |
| | | depends="init"> |
| | | <f2 project="which" /> |
| | | </target> |
| | | |
| | | <target name="all" |
| | | description="load all the libraries" |
| | | depends="logging,junit,xml,networking,regexp,antlr,bcel,jdepend,bsf,debugging,script" /> |
| | | |
| | | </project> |
| New file |
| | |
| | | <?xml 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. |
| | | --> |
| | | <!-- |
| | | ======================================================================= |
| | | Build file to fetch maven2 tasks; extracted from (Ant's) fetch.xml |
| | | ======================================================================= |
| | | --> |
| | | <project name="get-m2" default="get-m2" basedir="."> |
| | | |
| | | <description> |
| | | This build file downloads the Maven2 Ant tasks, |
| | | and installs them in the location specified by the m2.dest.dir property. |
| | | |
| | | You may need to set proxy settings. On Java1.5, Ant tries to get |
| | | this from the OS, unless you use the -noproxy option. |
| | | |
| | | Proxies can be configured manually setting the JVM proxy values in the |
| | | ANT_OPTS environment variable. |
| | | |
| | | For example, to set the proxy up in the tcsh shell, the command would be |
| | | something like: |
| | | |
| | | For csh/tcsh: |
| | | setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080" |
| | | For bash: |
| | | export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080" |
| | | For Windows, set the environment variable in the appropriate dialog box |
| | | and open a new console. or, by hand |
| | | set ANT_OPTS = -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 |
| | | </description> |
| | | |
| | | <property file="get-m2.properties" /> |
| | | |
| | | <property name="m2.antlib.resource" |
| | | value="org/apache/maven/artifact/ant/antlib.xml" /> |
| | | |
| | | <property name="m2.antlib.uri" |
| | | value="antlib:org.apache.maven.artifact.ant" /> |
| | | |
| | | <macrodef name="require"> |
| | | <attribute name="property" /> |
| | | <sequential> |
| | | <fail unless="@{property}">$${@{property}} not specified</fail> |
| | | </sequential> |
| | | </macrodef> |
| | | |
| | | <target name="probe-m2"> |
| | | <require property="m2.dest.dir" /> |
| | | <require property="m2.jar.name" /> |
| | | |
| | | <!-- Look for M2 ant tasks in our classpath--> |
| | | <property name="m2.artifact" location="${m2.dest.dir}/${m2.jar.name}" /> |
| | | <available property="m2.antlib.found" resource="${m2.antlib.resource}" /> |
| | | <condition property="m2.antlib.typefound"> |
| | | <typefound name="${m2.antlib.uri}:artifact" /> |
| | | </condition> |
| | | <available property="m2.artifact.found" file="${m2.artifact}" type="file" /> |
| | | </target> |
| | | |
| | | <target name="download-m2" depends="probe-m2" unless="m2.artifact.found"> |
| | | <require property="m2.antlib.url" /> |
| | | <echo>Downloading to ${m2.dest.dir}</echo> |
| | | |
| | | <mkdir dir="${m2.dest.dir}" /> |
| | | <!-- fetch M2 ant tasks into our repository, if it is not there--> |
| | | <get src="${m2.antlib.url}" |
| | | dest="${m2.artifact}" |
| | | verbose="true" |
| | | usetimestamp="false" /> |
| | | </target> |
| | | |
| | | <target name="dont-validate-m2-checksum" depends="probe-m2" |
| | | if="m2.artifact.found"> |
| | | <property name="checksum.equal" value="true" /> |
| | | </target> |
| | | |
| | | <target name="validate-m2-checksum" |
| | | depends="download-m2,dont-validate-m2-checksum" |
| | | if="m2.sha1.checksum" unless="m2.artifact.found"> |
| | | <checksum file="${m2.artifact}" |
| | | algorithm="SHA" |
| | | property="${m2.sha1.checksum}" |
| | | verifyProperty="checksum.equal" /> |
| | | </target> |
| | | |
| | | <target name="checksum-mismatch" depends="validate-m2-checksum" |
| | | if="m2.sha1.checksum" unless="checksum.equal"> |
| | | <delete file="${m2.artifact}" /> |
| | | <fail> |
| | | Failed to verify the downloaded file ${m2.antlib.url}" against the checksum |
| | | coded into libraries.properties. |
| | | The local copy has been deleted, for security reasons |
| | | </fail> |
| | | </target> |
| | | |
| | | <target name="checksum-match" depends="checksum-mismatch" |
| | | unless="m2.antlib.found"> |
| | | <taskdef classpath="${m2.artifact}" resource="${m2.antlib.resource}" |
| | | uri="${m2.antlib.uri}" /> |
| | | </target> |
| | | |
| | | <target name="get-m2" depends="checksum-match" |
| | | description="Download the Maven2 Ant tasks" /> |
| | | |
| | | </project> |
| New file |
| | |
| | | Please refer to the Ant manual under Installing Ant / Library |
| | | Dependencies for a list of the jar requirements for various optional |
| | | tasks and features. |
| | | |
| | | This directory contains xercesImpl.jar from the 2.6.2 release of |
| | | Apache Xerces. For more information or newer releases see |
| | | <http://xml.apache.org/xerces2-j/>. See the file LICENSE.xerces for |
| | | the terms of distribution. |
| | | |
| | | It also contains xml-apis.jar, an Apache-controlled collection of |
| | | standard classes from the 1.0b2 release of the Apache XML-Commons |
| | | release. For more information or newer releases see |
| | | <http://xml.apache.org/commons/>. See the files LICENSE.dom and |
| | | LICENSE.sax for the terms of distribution. |
| | | |
| New file |
| | |
| | | #this file declares the libraries for use in |
| | | #a given release of the components |
| | | |
| | | #if you change this, change the checksum to match |
| | | m2.version=2.0.4 |
| | | m2.url=http://ibiblio.org/maven2/ |
| | | m2.artifact-name=maven-artifact-ant |
| | | m2.jar.name=${m2.artifact-name}-${m2.version}-dep.jar |
| | | #this is the URL of the antlib library, that is pulled down for everything else. |
| | | m2.antlib.url=${m2.url}/org/apache/maven/${m2.artifact-name}/${m2.version}/${m2.jar.name} |
| | | #this is the sha1 checksum of the artifact |
| | | m2.sha1.checksum=4e7ddfdb91600e9b59bb965ff8eef2f06015df50 |
| | | |
| | | |
| | | #versions of different libraries. Please keep in alphabetical order, except |
| | | #when a specific dependency forces them to be out-of-order |
| | | antlr.version=2.7.2 |
| | | bcel.version=5.1 |
| | | bsf.version=2.4.0 |
| | | bsh.version=2.0b4 |
| | | bsh-core.version=${bsh.version} |
| | | commons-net.version=1.4.0 |
| | | commons-logging.version=1.0.4 |
| | | commons-logging-api.version=${commons-logging.version} |
| | | jdepend.version=2.7 |
| | | jruby.version=0.8.3 |
| | | junit.version=3.8.2 |
| | | jsch.version=0.1.29 |
| | | jython.version=2.1 |
| | | log4j.version=1.2.13 |
| | | #js is the javascript implementation of the rhino project |
| | | js.version=1.6R3 |
| | | oro.version=2.0.8 |
| | | regexp.version=1.3 |
| | | which.version=1.0 |
| | | xerces.version=2.8.1 |
| | | xercesImpl.version=${xerces.version} |
| | | #should be in sync w/ xerces, but not in the maven repository |
| | | #xmlParserAPIs.version=${xerces.version} |
| | | xmlParserAPIs.version=2.6.1 |
| | | xalan.version=2.7.0 |
| | | xml-resolver.version=1.1 |
| | | |
| | | #paired |
| | | jacl.version=1.2.6 |
| | | tcljava.version=${jacl.version} |
| New file |
| | |
| | | <?xml version="1.0"?> |
| | | <!DOCTYPE module PUBLIC |
| | | "-//Puppy Crawl//DTD Check Configuration 1.2//EN" |
| | | "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> |
| | | |
| | | |
| | | <module name="Checker"> |
| | | <module name="TreeWalker"> |
| | | <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-checkstyle.cache" /> |
| | | |
| | | <!-- Ensure that each source file starts with the appropriate header --> |
| | | <module name="Header"> |
| | | <property name="headerFile" value="${basedir}/ext/checkstyle/opends.sourceheader" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that all classes and interfaces are documented --> |
| | | <module name="JavadocType"> |
| | | <property name="scope" value="private" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that all non-private methods are documented --> |
| | | <module name="JavadocMethod"> |
| | | <property name="scope" value="package" /> |
| | | <property name="allowUndeclaredRTE" value="false" /> |
| | | <property name="allowMissingParamTags" value="false" /> |
| | | <property name="allowMissingJavadoc" value="false" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that all public and protected fields are documented --> |
| | | <module name="JavadocVariable"> |
| | | <property name="scope" value="protected" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that all Javadoc comments are well-formed --> |
| | | <module name="JavadocStyle"> |
| | | <property name="scope" value="private" /> |
| | | <property name="checkFirstSentence" value="true" /> |
| | | <property name="checkEmptyJavadoc" value="true" /> |
| | | <property name="checkHtml" value="true" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that no line exceeds 80 characters in length --> |
| | | <module name="LineLength"> |
| | | <property name="max" value="80" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that no tab characters are used --> |
| | | <module name="TabCharacter" /> |
| | | |
| | | |
| | | <!-- Ensure that no line ends with whitespace --> |
| | | <module name="GenericIllegalRegexp"> |
| | | <property name="format" value="\s$" /> |
| | | <property name="message" value="Line ends with whitespace." /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Check for string == rather than .equals checks --> |
| | | <module name="StringLiteralEquality" /> |
| | | |
| | | |
| | | <!-- Check to ensure that anything implmenting .equals(Object) also |
| | | implements .hashCode() --> |
| | | <module name="EqualsHashCode" /> |
| | | |
| | | |
| | | <!-- Make sure that all classes have a package statement --> |
| | | <module name="PackageDeclaration" /> |
| | | |
| | | |
| | | <!-- Identify any switch statements with fall-through --> |
| | | <module name="FallThrough" /> |
| | | |
| | | |
| | | <!-- Make sure that long constants are defined with an uppercase L --> |
| | | <module name="UpperEll" /> |
| | | |
| | | |
| | | <!-- Perform basic validation on imports --> |
| | | <module name="RedundantImport" /> |
| | | <module name="UnusedImports" /> |
| | | <module name="IllegalImport"> |
| | | <property name="illegalPkgs" value="sun" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Don't allow empty statements (those that contain just a semicolon) --> |
| | | <module name="EmptyStatement" /> |
| | | </module> |
| | | </module> |
| | | |
| New file |
| | |
| | | <?xml version="1.0"?> |
| | | <!DOCTYPE module PUBLIC |
| | | "-//Puppy Crawl//DTD Check Configuration 1.2//EN" |
| | | "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> |
| | | |
| | | |
| | | <module name="Checker"> |
| | | <module name="TreeWalker"> |
| | | <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-doctarget-checkstyle.cache" /> |
| | | |
| | | <!-- Ensure that all methods (including private) are documented --> |
| | | <module name="JavadocMethod"> |
| | | <property name="scope" value="private" /> |
| | | <property name="allowUndeclaredRTE" value="false" /> |
| | | <property name="allowMissingParamTags" value="false" /> |
| | | <property name="allowMissingJavadoc" value="false" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that all Javadoc comments are well-formed --> |
| | | <module name="JavadocStyle"> |
| | | <property name="scope" value="private" /> |
| | | <property name="checkFirstSentence" value="true" /> |
| | | <property name="checkEmptyJavadoc" value="true" /> |
| | | <property name="checkHtml" value="true" /> |
| | | </module> |
| | | |
| | | |
| | | <!-- Ensure that no line exceeds 70 characters in length --> |
| | | <module name="LineLength"> |
| | | <property name="max" value="70" /> |
| | | </module> |
| | | </module> |
| | | </module> |
| | | |
| New file |
| | |
| | | <?xml version="1.0"?> |
| | | <!DOCTYPE module PUBLIC |
| | | "-//Puppy Crawl//DTD Check Configuration 1.2//EN" |
| | | "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> |
| | | |
| | | |
| | | <module name="Checker"> |
| | | <module name="TreeWalker"> |
| | | <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-functest-checkstyle.cache" /> |
| | | |
| | | <!-- Ensure that each source file starts with the appropriate header --> |
| | | <module name="Header"> |
| | | <property name="headerFile" value="${basedir}/ext/checkstyle/opends.sourceheader" /> |
| | | </module> |
| | | </module> |
| | | </module> |
| | | |
| New file |
| | |
| | | <?xml version="1.0"?> |
| | | <!DOCTYPE module PUBLIC |
| | | "-//Puppy Crawl//DTD Check Configuration 1.2//EN" |
| | | "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> |
| | | |
| | | |
| | | <module name="Checker"> |
| | | <module name="TreeWalker"> |
| | | <property name="cacheFile" value="${basedir}/.checkstyle-cache/opends-unittest-checkstyle.cache" /> |
| | | |
| | | <!-- Ensure that each source file starts with the appropriate header --> |
| | | <module name="Header"> |
| | | <property name="headerFile" value="${basedir}/ext/checkstyle/opends.sourceheader" /> |
| | | </module> |
| | | </module> |
| | | </module> |
| | | |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| New file |
| | |
| | | The TMate License |
| | | |
| | | This license applies to all portions of TMate SVNKit library, which |
| | | are not externally-maintained libraries (e.g. Trilead SSH library). |
| | | |
| | | All the source code and compiled classes in package org.tigris.subversion.javahl |
| | | except SvnClient class are covered by the license in JAVAHL-LICENSE file |
| | | |
| | | Copyright (c) 2004-2008 TMate Software. All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | | are permitted provided that the following conditions are met: |
| | | |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | this list of conditions and the following disclaimer. |
| | | |
| | | * 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. |
| | | |
| | | * Redistributions in any form must be accompanied by information on how to |
| | | obtain complete source code for the software that uses SVNKit and any |
| | | accompanying software that uses the software that uses SVNKit. The source |
| | | code must either be included in the distribution or be available for no |
| | | more than the cost of distribution plus a nominal fee, and must be freely |
| | | redistributable under reasonable conditions. For an executable file, complete |
| | | source code means the source code for all modules it contains. It does not |
| | | include source code for modules or files that typically accompany the major |
| | | components of the operating system on which the executable file runs. |
| | | |
| | | * Redistribution in any form without redistributing source code for software |
| | | that uses SVNKit is possible only when such redistribution is explictly permitted |
| | | by TMate Software. Please, contact TMate Software at support@svnkit.com to |
| | | get such permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY TMATE SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED |
| | | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| | | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE |
| | | DISCLAIMED. |
| | | |
| | | IN NO EVENT SHALL TMATE SOFTWARE 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. |
| New file |
| | |
| | | This license applies to all portions of Subversion which are not |
| | | externally-maintained libraries (e.g. apr/, apr-util/, and neon/). |
| | | Such libraries have their own licenses; we recommend you read them, as |
| | | their terms may differ from the terms below. |
| | | |
| | | This is version 1 of this license. It is also available online at |
| | | http://subversion.tigris.org/license-1.html. If newer versions of |
| | | this license are posted there (the same URL, but with the version |
| | | number incremented: .../license-2.html, .../license-3.html, and so |
| | | on), you may use a newer version instead, at your option. |
| | | |
| | | ==================================================================== |
| | | Copyright (c) 2000-2005 CollabNet. All rights reserved. |
| | | |
| | | 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 acknowledgment: "This product includes |
| | | software developed by CollabNet (http://www.Collab.Net/)." |
| | | Alternately, this acknowledgment may appear in the software itself, if |
| | | and wherever such third-party acknowledgments normally appear. |
| | | |
| | | 4. The hosted project names must not be used to endorse or promote |
| | | products derived from this software without prior written |
| | | permission. For written permission, please contact info@collab.net. |
| | | |
| | | 5. Products derived from this software may not use the "Tigris" name |
| | | nor may "Tigris" appear in their names without prior written |
| | | permission of CollabNet. |
| | | |
| | | 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 COLLABNET 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 CollabNet. |
| | | |
| New file |
| | |
| | | Copyright (c) 2008 Timothy Wall, All Rights Reserved |
| | | |
| | | This library is free software; you can redistribute it and/or |
| | | modify it under the terms of the GNU Lesser General Public |
| | | License as published by the Free Software Foundation; either |
| | | version 2.1 of the License, or (at your option) any later version. |
| | | |
| | | This library is distributed in the hope that it will be useful, |
| | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| | | Lesser General Public License for more details. |
| New file |
| | |
| | | This is a README.txt file for SVNKit - pure Java Subversion client library. |
| | | |
| | | 1. DESCRIPTION |
| | | |
| | | SVNKit is a pure Java Subversion client library. |
| | | |
| | | 2. LICENSING |
| | | |
| | | SVNKit is open source product. The complete source code, documentation, and files required |
| | | to build the library are available for download from our Web site at http://svnkit.com/ |
| | | |
| | | The TMate open source license permits you to use SVNKit at no charge under the condition |
| | | that if you use the software in an application you redistribute, the complete source code for |
| | | your application must be available and freely redistributable under reasonable conditions. |
| | | |
| | | If you do not want to release the source code for your application, you may purchase a license |
| | | from TMate Software. For pricing information, or if you have further questions on licensing, |
| | | please contact us at support@svnkit.com. |
| | | |
| | | You may find the TMate open source license in COPYING file that is located within the same |
| | | directory as this file or at http://svnkit.com/license.html |
| | | |
| | | 3. FEATURES |
| | | |
| | | SVNKit allows to work with Subversion repositories and Subversion working copies. SVNKit features |
| | | direct repository access as well as support for all high level Subversion operation that are |
| | | available with the command line Subversion client. |
| | | |
| | | This version of SVNKit supports all Subversion 1.5.2 features and supports older Subversion repositories. |
| | | |
| | | 4. RESOURCES |
| | | |
| | | SVNKit Web Site: http://svnkit.com/ |
| | | SVNKit Documentation: http://svnkit.com/documentation.html |
| | | SVNKit Wiki: https://wiki.svnkit.com/ |
| | | SVNKit JavaDoc: http://svnkit.com/javadoc/ |
| | | |
| | | SVNKit Mailing List: http://svnkit.com/support.html |
| | | SVNKit Issues Tracker: http://svnkit.com/tracker/ |
| | | |
| | | SVNKit Continuous Build Server: https://teamcity.svnkit.com/ |
| | | |
| | | 5. CONTACTS |
| | | |
| | | On all questions related to SVNKit please contact us at support@svnkit.com |
| New file |
| | |
| | | Sequence Library License |
| | | |
| | | This license applies to all portions of the Sequence library, which |
| | | are not externally-maintained libraries (e.g. junit or jsch). |
| | | ==================================================================== |
| | | Copyright (c) 2000-2008 SyntEvo GmbH, Ainring, GERMANY. |
| | | All rights reserved. |
| | | |
| | | 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 acknowledgment: "This product includes |
| | | software developed by SyntEvo GmbH, Ainring, GERMANY." |
| | | Alternately, this acknowledgment may appear in the software itself, if |
| | | and wherever such third-party acknowledgments normally appear. |
| | | |
| | | 4. The hosted project names must not be used to endorse or promote |
| | | products derived from this software without prior written |
| | | permission. For written permission, please contact |
| | | info@syntevo.com. |
| | | |
| | | 5. Neither the name of SyntEvo GmbH nor the names of its contributors |
| | | may be used to endorse or promote products derived from this |
| | | software without specific prior written permission. |
| | | |
| | | 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 SyntEvo GmbH OR HIS 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. |
| | | ==================================================================== |
| | | |
| | | |
| New file |
| | |
| | | Copyright (c) 2007-2008 Trilead AG (http://www.trilead.com) |
| | | |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without |
| | | modification, are permitted provided that the following conditions |
| | | are met: |
| | | |
| | | a.) Redistributions of source code must retain the above copyright |
| | | notice, this list of conditions and the following disclaimer. |
| | | b.) 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. |
| | | c.) Neither the name of Trilead nor the names of its contributors may |
| | | be used to endorse or promote products derived from this software |
| | | without specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| | | AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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. |
| | | |
| | | Trilead SSH-2 for Java includes code that was written by Dr. Christian Plattner |
| | | during his PhD at ETH Zurich. The license states the following: |
| | | |
| | | Copyright (c) 2005 - 2006 Swiss Federal Institute of Technology (ETH Zurich), |
| | | Department of Computer Science (http://www.inf.ethz.ch), |
| | | Christian Plattner. All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without |
| | | modification, are permitted provided that the following conditions |
| | | are met: |
| | | |
| | | a.) Redistributions of source code must retain the above copyright |
| | | notice, this list of conditions and the following disclaimer. |
| | | b.) 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. |
| | | c.) Neither the name of ETH Zurich nor the names of its contributors may |
| | | be used to endorse or promote products derived from this software |
| | | without specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| | | AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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. |
| | | |
| | | The Java implementations of the AES, Blowfish and 3DES ciphers have been |
| | | taken (and slightly modified) from the cryptography package released by |
| | | "The Legion Of The Bouncy Castle". |
| | | |
| | | Their license states the following: |
| | | |
| | | Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle |
| | | (http://www.bouncycastle.org) |
| | | |
| | | Permission is hereby granted, free of charge, to any person obtaining a copy |
| | | of this software and associated documentation files (the "Software"), to deal |
| | | in the Software without restriction, including without limitation the rights |
| | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| | | copies of the Software, and to permit persons to whom the Software is |
| | | furnished to do so, subject to the following conditions: |
| | | |
| | | The above copyright notice and this permission notice shall be included in |
| | | all copies or substantial portions of the Software. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| | | THE SOFTWARE. |
| | | |
| New file |
| | |
| | | == version 1.2.0 |
| | | |
| | | + Possible NPE on WC to URL copy operation fixed. |
| | | + Log operation didn't work properly with 'limit' options set to value |
| | | larger than Integer.MAX_VALUE, fixed. |
| | | + OSGI manifest fixes. |
| | | |
| | | == version 1.2.0-rc4 |
| | | |
| | | + JNA library updated to version 3.0.5. |
| | | + jsvnlook 'cat' and 'lock' commands added. |
| | | + Update operation didn't work properly on sparse directories with 1.4.x Subversion servers, fixed. |
| | | + SASL: minor bugfixes. |
| | | + Other bugfixes. |
| | | |
| | | == version 1.2.0-rc3 |
| | | |
| | | + SVNKit Eclipse plugin divided into two features: core svnkit library and optional JNA library. |
| | | + SVNKit Eclipse plugin made compatible with base OSGI framework. |
| | | + SVN+SSH protocol performance improvements. |
| | | + File uid and guid wasn't properly fetched on OSX and BSD. |
| | | + Other bugfixes and minor improvements. |
| | | |
| | | == version 1.2.0-rc2 |
| | | |
| | | + SASL: incorrect output buffer size might result in failed commits, fixed. |
| | | + Possible NPE on copy operation fixed. |
| | | |
| | | == version 1.2.0-rc1 |
| | | |
| | | + Javadoc updated |
| | | + SASL authentication support bugfixes |
| | | + Bug in keyword expansion code fixed |
| | | + Other bugfixes |
| | | |
| | | == version 1.2.0-beta5 |
| | | |
| | | + SASL authentication support improved |
| | | + Java SSH Trilead library updated to build 213 |
| | | + JNA library updated to version 3.0.4 |
| | | + Fixed: SSH connectivity problems with non-OpenSSH servers |
| | | + Javadoc updated |
| | | + Other bugfixes |
| | | |
| | | == version 1.2.0-beta4 |
| | | |
| | | + Bugfixes |
| | | |
| | | == version 1.2.0-beta3 |
| | | |
| | | + SASL authentication support improved. |
| | | + Other bugfixes. |
| | | |
| | | == version 1.2.0-beta2 |
| | | |
| | | + JavaHL compatiblity bugfixes |
| | | + DAV protocol performance improvements |
| | | |
| | | == version 1.2.0-beta |
| | | |
| | | + Subversion 1.5.0 features support |
| | | |
| | | == version 1.1.7 |
| | | |
| | | + SVNKit didn't work properly with Subversion 1.5.0 servers over svn protocol |
| | | + JNA library updated to version 3.0.2 |
| | | + Trilead-SSH library updated to build 212 |
| | | + Other bugfixes |
| | | |
| | | == version 1.1.6 |
| | | |
| | | + Bugfixes: |
| | | + Copy WC to URL sometimes didn't work properly with switched directories. |
| | | + Several NPEs in HTTP connection code fixed. |
| | | + Authentication cancellation didn't work with SSH connection in some cases. |
| | | |
| | | == version 1.1.5 |
| | | |
| | | + Connections pool has been improved. |
| | | + New version of SSH library (Trilead build 211) is used. |
| | | + When possible, JNA library is used for most of native calls instead of Runtime.exec(...) |
| | | + HTTP Digest authentications works better. |
| | | + Bug in keywords expansion code fixed. |
| | | + Other bugfixes. |
| | | |
| | | = version 1.1.4 |
| | | |
| | | + Connections pool closes inactive connections on timeout. |
| | | + Bugfixes. |
| | | |
| | | = version 1.1.3 |
| | | |
| | | + Encrypted credentials supported on Windows. |
| | | + OpenVMS support improved. |
| | | + Bugfixes. |
| | | + Daily builds now available at http://teamcity.svnkit.com/ |
| | | |
| | | = version 1.1.2 |
| | | |
| | | + SVNKit command line client: interactive credentials prompt added. |
| | | + SVNKit command line client: jsvnversion added. |
| | | + JavaHL: SVNAdmin implemented using SVNKit API. |
| | | + System-wide configuration files support (e.g. /etc/subversion on Linux) |
| | | + bugfixes. |
| | | |
| | | = version 1.1.1 |
| | | |
| | | + added support for svnlook features. |
| | | + added support for svnadmin dump/verify/load/rmtxns/lstxns features. |
| | | + svn, svnadmin, svnlook and svnsync scripts are |
| | | renamed to jsvn, jsvnadmin, jsvnlook and jsvnsync to distinguish them |
| | | from the native programs. |
| | | + command line scripts supports OpenVMS. |
| | | + bugfixes. |
| | | |
| | | = version 1.1.0 |
| | | |
| | | + command line application and API to perform svnsync. |
| | | + bugfixes. |
| | | |
| | | = version 1.1.0.beta5 |
| | | |
| | | + support for Subversion 1.4 working copy and new fsfs repository format. |
| | | + support for new features introduced by Subversion 1.4. |
| | | + bugfixes. |
| | | |
| | | = version 1.1.0.beta4 |
| | | |
| | | + bug introduced in beta3 version fixed: |
| | | Eclipse keyring credentials storage support was broken. |
| | | |
| | | = version 1.1.0.beta3 |
| | | |
| | | + Minor API improvements. |
| | | + Minor bugfixes. |
| | | |
| | | = version 1.1.0.beta2 |
| | | |
| | | + NTLM authentication method support. |
| | | + Javadoc updated to match new SVNKit features. |
| | | + Minor bugfixes. |
| | | |
| | | = version 1.1.0.beta |
| | | |
| | | + 'file' protocol support (for 'fsfs' repositories). |
| | | |
| | | = version 1.0.3 |
| | | |
| | | + improved cancellation support |
| | | + improved versioned symlinks handling |
| | | + improved HTTP proxies support |
| | | + bugfixes |
| | | |
| | | = version 1.0.2 |
| | | |
| | | + full support of the new Subversion 1.3.0 features. |
| | | + ssh 'keyboard-interactive' authentication support. |
| | | + ssl client certificate prompt support. |
| | | + error codes and error messages hierarchy support in the API. |
| | | + utility classes to genereta operatios output in XML format. |
| | | + faster delta generation and delta processing code. |
| | | + utility API classes to process and generate deltas. |
| | | + documentations improved, Commit and Export examples simplified. |
| | | + bugfixes |
| | | |
| | | ! Note: |
| | | This version includes minor API changes and is not binary compatible |
| | | with the previous versions. API changes are: |
| | | * String error messages replaced with SVNErrorMessage objects |
| | | * ISVNFileRevisionHanlder callback interface changed |
| | | * all callback interfaces methods now declared as throwing SVNException |
| | | |
| | | = version 1.0.1 |
| | | |
| | | + bugfixes |
| | | |
| | | = version 1.0.0 |
| | | |
| | | + documentation related improvements |
| | | + bugfixes |
| | | |
| | | = version 0.9.3 |
| | | |
| | | + licensing conditions changed |
| | | + support for atomic commit from different working copies |
| | | + persistent connections support |
| | | + improvements in performance and memory consumption |
| | | + bugfixes |
| | | |
| | | = version 0.9.2 |
| | | |
| | | + RC2: bugfixes related to configuration handling and svn+ssh authentication |
| | | |
| | | = version 0.9.1 |
| | | |
| | | + RC1: All features planned for 1.0 version are completed. |
| | | |
| | | = version 0.8.8.1 |
| | | |
| | | + critical bug in SVNKit Eclipse plugin fixed. |
| | | |
| | | = version 0.8.8 |
| | | |
| | | + http digest auth support (requires apache version > 2.0.48) |
| | | + wc->url and url->wc copy operations |
| | | + use-commit-times option support |
| | | + bugfixes |
| | | |
| | | = version 0.8.7.2 |
| | | |
| | | + Subclipse v0.9.30 compatible |
| | | |
| | | = version 0.8.7.1 |
| | | |
| | | + Subclipse v0.9.29 compatible |
| | | |
| | | = version 0.8.7 |
| | | |
| | | + http proxy support |
| | | + svn "keywords" are expanded properly |
| | | + different eol's in a file are handled correctly |
| | | + other minor bugfixes |
| | | |
| | | = version 0.8.6 |
| | | |
| | | + annotate (blame) operation is implemented. |
| | | + http: server socket close detected properly and doesn't result in operation failure. |
| | | + SVNClient: absolute paths are used in notifications. |
| | | + SVNClient: fileContent method traces file renames. |
| | | + SVNClient: list and logMessages methods return paths sorted alphabetically. |
| | | + SVNClient: auth info is stored in Eclipse key ring when used within Eclipse. |
| | | |
| | | = version 0.8.5 |
| | | |
| | | + SVNClient: WC copy and move operations work properly on Linux and OS X. |
| | | + SVNClient: "conflicted" status is reported correctly during update |
| | | ("merged" was reported instead). |
| | | |
| | | = version 0.8.4 |
| | | |
| | | + Subclipse Extension supports Subclipse 0.9.28 |
| | | + tabulations in externals definitions processed correctly. |
| | | |
| | | = version 0.8.3 |
| | | |
| | | + children of copied or moved directories were not committed properly when |
| | | their wc revision was different from the parent's one. |
| | | + http: all DAV requests (including commit comments) are sent in UTF-8 encoding. |
| | | + SvnClient: add and remove methods didn't work for directories, fixed. |
| | | + SvnClient: commit of single file deletion didn't work, fixed. |
| | | + Eclipse: SVNKit features installed from update site supports automatic update |
| | | |
| | | = version 0.8.2 |
| | | |
| | | + svn+ssh: persistent ssh connection is used to improve svn+ssh performance. |
| | | + http: problems with accessing repository location that needs different credentials then |
| | | repository root is fixed. |
| | | + http: all paths in requests are canonicalized, some svn server versions failed to |
| | | process non-canonicalized paths. |
| | | + wc: changes in externals were not committed correctly over http when using ISVNWorkspace.commit(...), fixed. |
| | | + SvnClient: diff method implemented (so that Eclipse "generate patch" action works). |
| | | + SvnClient: copy and move methods fixed to work properly in Subclipse repository view. |
| | | + SvnClient: setPrompt support, better notifications, "windows" paths are handled correctly. |
| | | + logging: Pluggable loggers support and detailed http logging added (thanks to Marc Strapez). |
| | | + logging: Eclipse SVNKit version uses Eclipse logging facilities. |
| | | |
| | | = version 0.8.1 |
| | | |
| | | + bugs with committing files within moved directories fixed |
| | | + bugfixes related to operations over http connection |
| | | + for subclipse users: more detailed console notifications on svn operations |
| | | |
| | | = version 0.8.0 |
| | | |
| | | + new builds versioning schema introduced |
| | | + update site with eclipse plugin and subclipse extension added |
| | | |
| | | = build 20050131 |
| | | |
| | | + import works properly with single file and when importing to |
| | | non-yet-existing directories |
| | | + switch works properly when switching single file |
| | | + more minor bugfixes |
| | | |
| | | = build 20050120 |
| | | |
| | | + bugs with commiting locally copied files fixed |
| | | + DAV '/' repository location handled correctly |
| | | |
| | | = build 20050112 |
| | | |
| | | + lot of incompatibilities with native svn fixed |
| | | + SVNClient supports remote deletion, copy and move operations |
| | | |
| | | = build 20050106 |
| | | |
| | | + number of bugs in remote status implementation fixed |
| | | + ISVNWorkspace.getFileContent method restored to keep binary compatibility |
| | | + Diff generators framework added, now SVNKit provides API for |
| | | generating diff in different formats ('unified' and 'normal') for arbitrary |
| | | input sources |
| | | |
| | | = build 20050105 |
| | | |
| | | + svn+ssh authentication failed to work in some cases - fixed |
| | | + revisions in working copy now updated correctly after update |
| | | + got rid of number of minor inconsistences between SVNKit and native SVN |
| | | + http and https protocols supports compressed data (gzip) |
| | | |
| | | = build 20041223 |
| | | |
| | | + ISVNWorkspace.delete now accepts 'force' parameter |
| | | + bug fixed that prevented Subclipse committing single |
| | | file in non-windows systems |
| | | + complete svn and svn+ssh protocol logging may be enabled |
| | | with -Dsvnkit.log.svn=true command line switch |
| | | |
| | | = build 20041221 |
| | | |
| | | + when using svn+ssh SVNKit takes private key path from the java property, |
| | | if it is not defined explicitly |
| | | + svn+ssh bugfixes |
| | | + bugfixes |
| | | |
| | | = build 20041219 |
| | | |
| | | + infinite loop on commits that includes workspace root fixed |
| | | + JavaHL: SVNClient accepts all revision kinds (DATE, HEAD, etc.) |
| | | |
| | | = build 20041217 |
| | | |
| | | + bugfixes |
| | | |
| | | = build 20041216 |
| | | |
| | | + bugfixes |
| | | |
| | | = build 20041211 |
| | | |
| | | + command line svn client (status, import, checkout are implemented) |
| | | + python tests launcher to reuse original svn python tests suite |
| | | + bugfixes |
| | | |
| | | = build 20041209 |
| | | |
| | | + bugfixes |
| | | |
| | | = build 20041204 |
| | | |
| | | + bugfixes |
| | | + SVNKit works with Subclipse 0.9.24 |
| | | |
| | | = build 20041130 |
| | | |
| | | + bugfixes |
| | | |
| | | = build 20041126 |
| | | |
| | | + svn+shh protocol support (with the jsch library) |
| | | + bugfixes |
| | | |
| | | = build 20041124 |
| | | |
| | | + javahl copy, move and mkdir methods implementation |
| | | + methods to manage global ignore added to ISVNWorkspace |
| | | + bugfixes |
| | | |
| | | = build 20041123 |
| | | |
| | | + recursive property set operation |
| | | + ISVNWorkspace accepts credentials provider |
| | | + SSLContext made pluggable |
| | | + javahl replacement works with Subclipse |
| | | + bugfixes |
| | | |
| | | = build 20041118 |
| | | |
| | | + javahl implementation (SvnClient) is included into the library |
| | | + workspace accepts credentials provider |
| | | |
| | | = build 20041116 |
| | | |
| | | + bugfixes |
| | | |
| | | = build 20041110 |
| | | |
| | | + svn:externals support |
| | | + bugfixes |
| | | |
| | | = build 20041109 |
| | | |
| | | + bug that prevents checkout sometimes fixed |
| | | |
| | | = build 20041108 |
| | | |
| | | + authentication API simplified |
| | | + performance improvements |
| | | + bugfixes |
| | | |
| | | = build 20041105 |
| | | |
| | | + switch and relocate operations |
| | | + bugfixes |
| New file |
| | |
| | | #!/bin/sh |
| | | |
| | | cygwin=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true ;; |
| | | esac |
| | | |
| | | SVNKIT_HOME=`dirname $0` |
| | | SVNKIT_HOME=`cd "$SVNKIT_HOME" ; pwd` |
| | | |
| | | SVNKIT_CP="$SVNKIT_HOME/svnkit.jar":"$SVNKIT_HOME/svnkit-cli.jar":"$SVNKIT_HOME/trilead.jar":"$SVNKIT_HOME/jna.jar" |
| | | |
| | | if $cygwin ; then |
| | | SVNKIT_CP=`cygpath --windows --path "$SVNKIT_CP"` |
| | | fi |
| | | |
| | | SVNKIT_VM_OPTIONS="-Dsun.io.useCanonCaches=false -Djava.util.logging.config.file=$SVNKIT_HOME/logging.properties" |
| | | |
| | | SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svn.SVN |
| | | "$JAVA_HOME/bin/java" $SVNKIT_VM_OPTIONS -cp $SVNKIT_CP $SVNKIT_MAINCLASS "$@" |
| New file |
| | |
| | | @echo off |
| | | |
| | | set DEFAULT_SVNKIT_HOME=%~dp0 |
| | | |
| | | if "%SVNKIT_HOME%"=="" set SVNKIT_HOME=%DEFAULT_SVNKIT_HOME% |
| | | |
| | | set SVNKIT_CLASSPATH= "%SVNKIT_HOME%svnkit.jar";"%SVNKIT_HOME%svnkit-cli.jar";"%SVNKIT_HOME%trilead.jar";"%SVNKIT_HOME%jna.jar" |
| | | set SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svn.SVN |
| | | set SVNKIT_OPTIONS=-Djava.util.logging.config.file="%SVNKIT_HOME%/logging.properties" |
| | | |
| | | "%JAVA_HOME%\bin\java" %SVNKIT_OPTIONS% -cp %SVNKIT_CLASSPATH% %SVNKIT_MAINCLASS% %* |
| New file |
| | |
| | | #!/bin/sh |
| | | |
| | | cygwin=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true ;; |
| | | esac |
| | | |
| | | SVNKIT_HOME=`dirname $0` |
| | | SVNKIT_HOME=`cd "$SVNKIT_HOME" ; pwd` |
| | | SVNKIT_CP="$SVNKIT_HOME/svnkit.jar":"$SVNKIT_HOME/svnkit-cli.jar":"$SVNKIT_HOME/trilead.jar":"$SVNKIT_HOME/jna.jar" |
| | | |
| | | if $cygwin ; then |
| | | SVNKIT_CP=`cygpath --windows --path "$SVNKIT_CP"` |
| | | fi |
| | | |
| | | SVNKIT_VM_OPTIONS="-Dsun.io.useCanonCaches=false -Djava.util.logging.config.file=$SVNKIT_HOME/logging.properties" |
| | | |
| | | SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnadmin.SVNAdmin |
| | | "$JAVA_HOME/bin/java" $SVNKIT_VM_OPTIONS -cp $SVNKIT_CP $SVNKIT_MAINCLASS "$@" |
| New file |
| | |
| | | @echo off |
| | | |
| | | set DEFAULT_SVNKIT_HOME=%~dp0 |
| | | |
| | | if "%SVNKIT_HOME%"=="" set SVNKIT_HOME=%DEFAULT_SVNKIT_HOME% |
| | | |
| | | set SVNKIT_CLASSPATH= "%SVNKIT_HOME%svnkit.jar";"%SVNKIT_HOME%svnkit-cli.jar";"%SVNKIT_HOME%trilead.jar";"%SVNKIT_HOME%jna.jar" |
| | | set SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnadmin.SVNAdmin |
| | | set SVNKIT_OPTIONS=-Djava.util.logging.config.file="%SVNKIT_HOME%/logging.properties" |
| | | |
| | | "%JAVA_HOME%\bin\java" %SVNKIT_OPTIONS% -cp %SVNKIT_CLASSPATH% %SVNKIT_MAINCLASS% %* |
| New file |
| | |
| | | #!/bin/sh |
| | | |
| | | cygwin=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true ;; |
| | | esac |
| | | |
| | | SVNKIT_HOME=`dirname $0` |
| | | SVNKIT_HOME=`cd "$SVNKIT_HOME" ; pwd` |
| | | SVNKIT_CP="$SVNKIT_HOME/svnkit.jar":"$SVNKIT_HOME/svnkit-cli.jar":"$SVNKIT_HOME/trilead.jar":"$SVNKIT_HOME/jna.jar" |
| | | |
| | | if $cygwin ; then |
| | | SVNKIT_CP=`cygpath --windows --path "$SVNKIT_CP"` |
| | | fi |
| | | |
| | | SVNKIT_VM_OPTIONS="-Dsun.io.useCanonCaches=false -Djava.util.logging.config.file=$SVNKIT_HOME/logging.properties" |
| | | |
| | | SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svndumpfilter.SVNDumpFilter |
| | | "$JAVA_HOME/bin/java" $SVNKIT_VM_OPTIONS -cp $SVNKIT_CP $SVNKIT_MAINCLASS "$@" |
| New file |
| | |
| | | @echo off |
| | | |
| | | set DEFAULT_SVNKIT_HOME=%~dp0 |
| | | |
| | | if "%SVNKIT_HOME%"=="" set SVNKIT_HOME=%DEFAULT_SVNKIT_HOME% |
| | | |
| | | set SVNKIT_CLASSPATH= "%SVNKIT_HOME%svnkit.jar";"%SVNKIT_HOME%svnkit-cli.jar";"%SVNKIT_HOME%trilead.jar";"%SVNKIT_HOME%jna.jar" |
| | | set SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svndumpfilter.SVNDumpFilter |
| | | set SVNKIT_OPTIONS=-Djava.util.logging.config.file="%SVNKIT_HOME%/logging.properties" |
| | | |
| | | "%JAVA_HOME%\bin\java" %SVNKIT_OPTIONS% -cp %SVNKIT_CLASSPATH% %SVNKIT_MAINCLASS% %* |
| New file |
| | |
| | | #!/bin/sh |
| | | |
| | | cygwin=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true ;; |
| | | esac |
| | | |
| | | SVNKIT_HOME=`dirname $0` |
| | | SVNKIT_HOME=`cd "$SVNKIT_HOME" ; pwd` |
| | | SVNKIT_CP="$SVNKIT_HOME/svnkit.jar":"$SVNKIT_HOME/svnkit-cli.jar":"$SVNKIT_HOME/trilead.jar":"$SVNKIT_HOME/jna.jar" |
| | | |
| | | if $cygwin ; then |
| | | SVNKIT_CP=`cygpath --windows --path "$SVNKIT_CP"` |
| | | fi |
| | | |
| | | SVNKIT_VM_OPTIONS="-Dsun.io.useCanonCaches=false -Djava.util.logging.config.file=$SVNKIT_HOME/logging.properties" |
| | | |
| | | SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnlook.SVNLook |
| | | "$JAVA_HOME/bin/java" $SVNKIT_VM_OPTIONS -cp $SVNKIT_CP $SVNKIT_MAINCLASS "$@" |
| New file |
| | |
| | | @echo off |
| | | |
| | | set DEFAULT_SVNKIT_HOME=%~dp0 |
| | | |
| | | if "%SVNKIT_HOME%"=="" set SVNKIT_HOME=%DEFAULT_SVNKIT_HOME% |
| | | |
| | | set SVNKIT_CLASSPATH= "%SVNKIT_HOME%svnkit.jar";"%SVNKIT_HOME%svnkit-cli.jar";"%SVNKIT_HOME%trilead.jar";"%SVNKIT_HOME%jna.jar" |
| | | set SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnlook.SVNLook |
| | | set SVNKIT_OPTIONS=-Djava.util.logging.config.file="%SVNKIT_HOME%/logging.properties" |
| | | |
| | | "%JAVA_HOME%\bin\java" %SVNKIT_OPTIONS% -cp %SVNKIT_CLASSPATH% %SVNKIT_MAINCLASS% %* |
| New file |
| | |
| | | $! |
| | | $ if f$type(java) .nes. "STRING" .or. "''java'" .eqs. "" |
| | | $ then |
| | | $ write SYS$OUTPUT "You must have the JAVA symbol properly set before using this command" |
| | | $ exit |
| | | $ endif |
| | | $ env = f$env("PROCEDURE") |
| | | $ home = f$parse(env,,,"device") + f$parse(env,,,"directory") |
| | | $ define/job/nolog svnkit_home 'home' |
| | | $! |
| | | $ define/job/nolog decc$argv_parse_style enable |
| | | $ define/job/nolog decc$efs_case_preserve enable |
| | | $! |
| | | $ if f$edit(f$trnlnm("DECC$EFS_CASE_SPECIAL"),"UPCASE") .eqs. "ENABLE" |
| | | $ then |
| | | $ write sys$output " " |
| | | $ write sys$output "JSVNSETUP: DECC$EFS_CASE_SPECIAL defined! Please deassign logical otherwise jsvn might not function properly!" |
| | | $ write sys$output " " |
| | | $ endif |
| | | $! |
| | | $! |
| | | $ CP = "/svnkit_home/svnkit.jar" |
| | | $ CP = CP + ":/svnkit_home/svnkit-cli.jar" |
| | | $ CP = CP + ":/svnkit_home/trilead.jar" |
| | | $ CP = CP + ":/svnkit_home/jna.jar" |
| | | $ OPT = "" |
| | | $! OPT = "-Djava.util.logging.config.file=/svnkit_home/logging.properties" |
| | | $! |
| | | $ JV = f$edit(java,"collapse") |
| | | $ jsvn == "''JV' ''OPT' -cp ''CP' ""org.tmatesoft.svn.cli.svn.SVN""" |
| | | $ jsvnadmin == "''JV' ''OPT' -cp ''CP' ""org.tmatesoft.svn.cli.svnadmin.SVNAdmin""" |
| | | $ jsvnlook == "''JV' ''OPT' -cp ''CP' ""org.tmatesoft.svn.cli.svnlook.SVNLook""" |
| | | $ jsvnsync == "''JV' ''OPT' -cp ''CP' ""org.tmatesoft.svn.cli.svnsync.SVNSync""" |
| | | $ jsvndumpfilter == "''JV' ''OPT' -cp ''CP' ""org.tmatesoft.svn.cli.svndumpfilter.SVNDumpFilter""" |
| | | $ jsvnversion == "''JV' ''OPT' -cp ''CP' ""org.tmatesoft.svn.cli.svnversion.SVNVersion""" |
| | | $! |
| New file |
| | |
| | | #!/bin/sh |
| | | |
| | | cygwin=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true ;; |
| | | esac |
| | | |
| | | SVNKIT_HOME=`dirname $0` |
| | | SVNKIT_HOME=`cd "$SVNKIT_HOME" ; pwd` |
| | | SVNKIT_CP="$SVNKIT_HOME/svnkit.jar":"$SVNKIT_HOME/svnkit-cli.jar":"$SVNKIT_HOME/trilead.jar":"$SVNKIT_HOME/jna.jar" |
| | | |
| | | if $cygwin ; then |
| | | SVNKIT_CP=`cygpath --windows --path "$SVNKIT_CP"` |
| | | fi |
| | | |
| | | SVNKIT_VM_OPTIONS="-Dsun.io.useCanonCaches=false -Djava.util.logging.config.file=$SVNKIT_HOME/logging.properties" |
| | | |
| | | SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnsync.SVNSync |
| | | "$JAVA_HOME/bin/java" $SVNKIT_VM_OPTIONS -cp $SVNKIT_CP $SVNKIT_MAINCLASS "$@" |
| New file |
| | |
| | | @echo off |
| | | |
| | | set DEFAULT_SVNKIT_HOME=%~dp0 |
| | | |
| | | if "%SVNKIT_HOME%"=="" set SVNKIT_HOME=%DEFAULT_SVNKIT_HOME% |
| | | |
| | | set SVNKIT_CLASSPATH= "%SVNKIT_HOME%svnkit.jar";"%SVNKIT_HOME%svnkit-cli.jar";"%SVNKIT_HOME%trilead.jar";"%SVNKIT_HOME%jna.jar" |
| | | set SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnsync.SVNSync |
| | | set SVNKIT_OPTIONS=-Djava.util.logging.config.file="%SVNKIT_HOME%/logging.properties" |
| | | |
| | | "%JAVA_HOME%\bin\java" %SVNKIT_OPTIONS% -cp %SVNKIT_CLASSPATH% %SVNKIT_MAINCLASS% %* |
| New file |
| | |
| | | #!/bin/sh |
| | | |
| | | cygwin=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true ;; |
| | | esac |
| | | |
| | | SVNKIT_HOME=`dirname $0` |
| | | SVNKIT_HOME=`cd "$SVNKIT_HOME" ; pwd` |
| | | SVNKIT_CP="$SVNKIT_HOME/svnkit.jar":"$SVNKIT_HOME/svnkit-cli.jar":"$SVNKIT_HOME/trilead.jar":"$SVNKIT_HOME/jna.jar" |
| | | |
| | | if $cygwin ; then |
| | | SVNKIT_CP=`cygpath --windows --path "$SVNKIT_CP"` |
| | | fi |
| | | |
| | | SVNKIT_VM_OPTIONS="-Dsun.io.useCanonCaches=false -Djava.util.logging.config.file=$SVNKIT_HOME/logging.properties" |
| | | |
| | | SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnversion.SVNVersion |
| | | "$JAVA_HOME/bin/java" $SVNKIT_VM_OPTIONS -cp $SVNKIT_CP $SVNKIT_MAINCLASS "$@" |
| New file |
| | |
| | | @echo off |
| | | |
| | | set DEFAULT_SVNKIT_HOME=%~dp0 |
| | | |
| | | if "%SVNKIT_HOME%"=="" set SVNKIT_HOME=%DEFAULT_SVNKIT_HOME% |
| | | |
| | | set SVNKIT_CLASSPATH= "%SVNKIT_HOME%svnkit.jar";"%SVNKIT_HOME%svnkit-cli.jar";"%SVNKIT_HOME%trilead.jar";"%SVNKIT_HOME%jna.jar" |
| | | set SVNKIT_MAINCLASS=org.tmatesoft.svn.cli.svnversion.SVNVersion |
| | | set SVNKIT_OPTIONS=-Djava.util.logging.config.file="%SVNKIT_HOME%/logging.properties" |
| | | |
| | | "%JAVA_HOME%\bin\java" %SVNKIT_OPTIONS% -cp %SVNKIT_CLASSPATH% %SVNKIT_MAINCLASS% %* |
| New file |
| | |
| | | svnkit.level=FINEST |
| | | svnkit-network.level=FINEST |
| | | svnkit-wc.level=FINEST |
| | | svnkit-cli.level=FINEST |
| | | handlers = java.util.logging.FileHandler |
| | | |
| | | java.util.logging.FileHandler.pattern = %h/svnkit.%u.log |
| | | java.util.logging.FileHandler.limit = 0 |
| | | java.util.logging.FileHandler.count = 1 |
| | | java.util.logging.FileHandler.append = true |
| | | java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter |
| | | |
| New file |
| | |
| | | svnkit.version=1.2.0 |
| | | # could be overriden by build server, e.g. TeamCity. |
| | | build.number=${svnkit.version} |
| | | |
| | | #properties for SVN runtime |
| | | svnkit.version.string=SVN/1.5.2 SVNKit/1.2.0 (http://svnkit.com/) r4949 |
| | | svnkit.version.major=1 |
| | | svnkit.version.minor=2 |
| | | svnkit.version.micro=0 |
| | | svnkit.version.revision=4949 |
| | | |
| | | #build.xml properties |
| | | jna.version=3.0.5 |
| | | trilead.ssh2.version=build213-svnkit-1.2-patch |
| New file |
| | |
| | | =========================================================================== |
| | | 5.7 |
| | | |
| | | Fixed: TESTNG-169 Error message: <method> is depending on nonexistent method null ("null" is uninformative) |
| | | Fixed: -listener takes comma-separated classes |
| | | Added: RetryAnalyzer (experimental) (Jeremie) |
| | | |
| | | |
| | | =========================================================================== |
| | | 5.6 |
| | | |
| | | Added: SkipException/TimeBombedSkipException for manual skipping |
| | | Added: <tests> can now be disabled at xml level using <test enabled="false"> |
| | | Added: Suite files that only contain other suites do not get reported |
| | | Fixed: @BeforeClass methods would incorrectly report cyclic graphs |
| | | Added: get/setAttribute to ITestContext |
| | | Added: plugging in factory objects to handle the actual instantiation of tests |
| | | Added: dataProvider to @Factory |
| | | Added: ISuite now gives access to the current XmlSuite |
| | | Fixed: TESTNG-139 dependsOnMethods gets confused when dependency is "protected" |
| | | Fixed: TESTNG-141 junit attribute set to false in testng-failed.xml when it should be true |
| | | Fixed: TESTNG-142 Exceptions in DataProvider are not reported as failed test |
| | | Added: Improved behavior for @Before/@AfterClass when using @Factory |
| | | (http://forums.opensymphony.com/thread.jspa?threadID=6594&messageID=122294#122294) |
| | | Added: Support for concurrent execution for invocationCount=1 threadPoolSize>1 and @DataProvider |
| | | (http://forums.opensymphony.com/thread.jspa?threadID=64738&tstart=0) |
| | | Added: New TestNG specific XML report, generated by default in 'xml' subdirectory of test-output |
| | | Added: support in strprotocol for passing the ITest.getTestName() information |
| | | Fixed: TESTNG-152 If DataProvider is not found, the exception message should tell exactly what happened |
| | | |
| | | Eclipse plug-in |
| | | |
| | | Fixed: Bug that made group launch configurations unusable |
| | | Fixed: The plugin doesn't create the correct launch configuration for @Factory |
| | | Fixed: Method based launchers cannot be editted |
| | | Fixed: Plugin hangs while executing test with dataprovider that sends \n, \r messages |
| | | Added: display ITest.getTestName() |
| | | |
| | | IDEA plug-in |
| | | |
| | | Fixed: IDEA 7.0 compatibility |
| | | Fixed: occasional 'illegal arguments exception' |
| | | Fixed: TESTNG-151 Final passing test result is not properly hidden |
| | | Added: Auto-completion for dependsOnMethods |
| | | Added: Highlighting of invalid groups/methods in dependsOn* |
| | | =========================================================================== |
| | | 5.5 |
| | | |
| | | Fixed: @BeforeGroup methods were run twice when in a base class |
| | | Fixed: @BeforeGroup methods were run twice with a @Test at class level |
| | | Fixed: parallel="tests" didn't work as advertised |
| | | Added: Support for thread-count at test level |
| | | Added: Method selectors receive a Context and can stop the chain with setStopped() |
| | | Fixed: XmlMethodSelector was always run first regardless of its priority |
| | | Added: @BeforeGroups/@AfterGroups can live in classes without @Test methods |
| | | Added: DataProvider can now take an ITestContext parameter |
| | | Fixed: Wasn't parsing <selector-class-name> correctly |
| | | Fixed: Annotation Transformers now work on class-level annotations |
| | | Fixed: Some class-level @Test attributes were not always honored |
| | | Added: Clean separation between @Test invocation events and @Configuration invocation events |
| | | (see also TESTNG-111) |
| | | Added: Test instances created by @Factory now run in multiple threads in parallel mode |
| | | Fixed: @Before/@AfterGroups invocation order |
| | | Fixed: TESTNG-27: Parameters are not used on <test> level anymore |
| | | Fixed: TESTNG-107 don't create an output directory if "outputDirectory" is null |
| | | Fixed: TESTNG-127 UseDefaultListeners in Ant Task does not work |
| | | Fixed: TESTNG-119 Running TestNG runner with invalid '-sourcedir' on JDK14 JavaDoc annotated test classes won't fail. |
| | | Fixed: TESTNG-113 Dependent methods within the same static inner class are not found |
| | | Fixed: TESTNG-125 TestNG failed for test classes under *.java*.* pakages |
| | | |
| | | Eclipse plug-in |
| | | Fixed: issue with launch configuration |
| | | Fixed: TESTNG-124: setting location of testng reports output |
| | | |
| | | =========================================================================== |
| | | 5.4 |
| | | |
| | | Fixed: Ant task issue with paths containing spaces |
| | | Added: for @BeforeGroups and @AfterGroups specifying the groups() attribute will auto-include the method |
| | | into those groups by default (previously you had to also provide the value() attribute). |
| | | Added: the load @Tests (invocationCount + threadPoolSize) are triggered simultaneous |
| | | Fixed: reports are correctly displaying the thread info |
| | | Added: @DataProvider name defaults to method name |
| | | Added: support for remote protocol to pass parameter information |
| | | Fixed: TextReporter logs information about the parameters of the test methods |
| | | Fixed: concurrency issue in JUnitXMLReporter |
| | | Fixed: output of JUnitXMLReporter must be CDATA |
| | | Fixed: XML unsupported annotations/parallel attribute values are reported |
| | | |
| | | Eclipse plug-in |
| | | Fixed: groups with multi-attribute javadoc annotations |
| | | Fixed: consistent behavior for dependsOnMethods |
| | | Fixed: consistent behavior for tests with dependsOnGroups (a warning is emitted) |
| | | Fixed: consistent merge of configuration arguments when an existing launch configuration exists |
| | | =========================================================================== |
| | | 5.3 |
| | | |
| | | Fixed: use a single instance of bsh.Interpreter |
| | | Added: @Before/@AfterMethod can declare a java.lang.reflect.Method parameter to be informed about the @Test method |
| | | Fixed: super classes must not be listed in testng-failures.xml |
| | | Fixed: parallel attribute must not appear if empty or null in testng-failures.xml |
| | | Fixed: parsing for javadoc annotations is done on request only |
| | | Added: improved multiple suite summary page report |
| | | Added: -target option deprecated in favor of -annotations javadoc|jdk |
| | | Fixed: filesets in the ant task didn't work if the paths have spaces in them |
| | | Fixed: Before/After Suite were behaving wrong in parallel execution |
| | | Added: A generic/extensible RemoteTestNG was added to the core |
| | | Fixed: Before/AfterGroup-s were behaving wrong when using invocationCount, dataProvider and threadPoolSize |
| | | Fixed: improved support for running different annotation type tests in the same suite |
| | | Fixed: testng-failed.xml was generated even if there were no failures/skipps |
| | | Fixed: -usedefaultlisteners was wrongly passed to JVM instead of TestNG options |
| | | Added: Attribute dataProviderClass for @Test and @testng.test |
| | | Fixed: Forgot to account for cases where both invocationCount and DataProviders are present |
| | | Fixed: AfterGroups were invoked out of order with invocationCount and DataProviders |
| | | Fixed: Reporter.getOutput() returned an empty array if a timeOut was specified |
| | | Added: testng.xml now supports <suite-files> |
| | | Added: ant task can receive several listeners |
| | | Fixed: TESTNG-109 Skipped tests with expected exceptions are reported as failures |
| | | Added: ant task can now select the parallel mode for running tests |
| | | Fixed: ant task correctly deals with empty groups and excludedgroups parameters |
| | | Added: ant task can override default suite and test names |
| | | Added: comand line support for setting parallel mode, suite and test names |
| | | |
| | | Eclipse plug-in |
| | | Added: Support for configuring per project usedefaultlisteners |
| | | Added: Contextual drop-down menu on failures tab of the TestNG view to enable running/debugging method failure only |
| | | Added: Suppport for configuring per project TestNG jar usage (project provided one or plugin provided one) |
| | | |
| | | =========================================================================== |
| | | 5.2 |
| | | |
| | | Added: "-usedefaultlisteners true/false" to command line and ant |
| | | Added: EmailableReporter (from Paul Mendelson) |
| | | Added: parallel can now be "methods" or "tests". Boolean version deprecated |
| | | Added: TestNGAntTask now uses the @ syntax to invoke TestNG |
| | | Added: Command line understands @ syntax |
| | | Added: JUnitConverter uses the new syntax |
| | | Added: -groups to JUnitConverter |
| | | Fixed: Throw proper exception when a DataProvider declares parameters |
| | | Added: completely revamped JUnit support (should run all kind of JUnit tests) |
| | | Fixed: TESTNG-40 (Bug in testng-failed.xml generation) |
| | | Fixed: TESTNG-106 (Failed "@BeforeSuite" method just skipps the last test in xml-file) |
| | | Fixed: Success on 0 tests (http://forums.opensymphony.com/thread.jspa?threadID=41213) |
| | | |
| | | Eclipse plug-in |
| | | Added: TESTNG-105 Automaticaly define TESTNG_HOME classpath variable |
| | | |
| | | =========================================================================== |
| | | 5.1 |
| | | |
| | | Added: @Test(sequential = true) |
| | | Fixed: TESTNG-102 (Incorrect ordering of @BeforeMethod calls when a dependency is specified) |
| | | Fixed: TESTNG-101 (HTML output contains nested <P> tags and a missing <tr> tag) |
| | | Added: support for specifying test-only classpath (http://forums.opensymphony.com/thread.jspa?messageID=78048&tstart=0) |
| | | Fixed: TESTNG-93 (method selectors filtering @BeforeMethod) |
| | | Fixed: TESTNG-81 (Assert.assertFalse() displays wrong expected, actual value) |
| | | Fixed: TESTNG-59 (multiple method selectors usage results in no tests run) |
| | | Fixed: TESTNG-56 (invocation of @Before/AfterClass methods in parallel/sequential scenarios) |
| | | Fixed: TESTNG-40 (failures suite does not contain @Before/After Suite/Test methods) |
| | | Fixed: TESTNG-37 (allow passing null parameter value from testng.xml) |
| | | Fixed: TESTNG-7 (display classname when hovering method) |
| | | |
| | | |
| | | Eclipse plug-in |
| | | |
| | | Added: run contextual test classes with parameters from suite definition files |
| | | Added: TESTNG-100 (Show HTML reports after running tests) |
| | | Added: TESTNG-97 (Double click top stack to raise comparison) |
| | | Added: TESTNG-84 (plug-in UI for suite option should support absolute path) |
| | | Added: TESTNG-20 (copy stack trace) |
| | | |
| | | Fixed: TESTNG-72 (display groups with non-array values) |
| | | Fixed: TESTNG-64 (Eclipse plug-in applies added groups to all launch configurations) |
| | | Fixed: TESTNG-28 (Cannot select groups from dependent eclipse projects) |
| | | Fixed: TESTNG-25 (do not display fully qualified method name when running contextual test class) |
| | | |
| | | Improved behavior: |
| | | TESTNG-98 (temporary files have guaranteed fixed names) |
| | | TESTNG-95 (Assertion failed comparison trims trailing ">") |
| | | TESTNG-70 (TestNG prevents eclipse from opening an older CVS version of a java class) |
| | | display of test hierarchy information (TESTNG-29) |
| | | |
| | | =========================================================================== |
| | | |
| | | 5.0.1 |
| | | |
| | | Eclipse plug-in |
| | | |
| | | Added: Output directory for the tests |
| | | Added: Can now specify listener classes |
| | | |
| | | =========================================================================== |
| | | 5.0.1 |
| | | |
| | | Fixed: reports generated by SuiteHTMLReporter do not work with JDK1.4 |
| | | |
| | | =========================================================================== |
| | | |
| | | 5.0 |
| | | |
| | | Added: Ant task: support for JVM, workingDir, timeout |
| | | Added: Stack traces can be interactively shown in the HTML reports |
| | | Added: Link to testng.xml in the reports |
| | | Added: New structure for reports, suites go in their individual directory |
| | | Added: @Test(suiteName) and @Test(testName) |
| | | Added: The stack traces in reports do not include TestNG frames (system property testng.exception) |
| | | (see: http://groups.google.com/group/testng-dev/browse_thread/thread/9f4d46ade10b0fda) |
| | | Fixed: Exit with error when no methods are run |
| | | (see: http://groups.google.com/group/testng-dev/browse_thread/thread/3c26e8a5658f22ac) |
| | | Added: List of methods in alphabetical order |
| | | Fixed: Class-scoped annotations were not recognized when inherited |
| | | Added: Deprecated @Configuration and introduced @BeforeSuite/Test/Class/TestMethod |
| | | Added: Deprecated @ExpectedExceptions and moved it into @Test |
| | | Added: expectedExceptions to @Test, deprecated @ExpectedExceptions |
| | | Added: New annotations: @BeforeSuite, @BeforeTest, etc... |
| | | Fixed: Was returning an exit code of 0 if a cyclic graph was detected |
| | | Added: Interface org.testng.ITest so that tests can declare a name |
| | | Fixed: The Text reporter was reporting the square of the actual number of methods |
| | | Fixed: Bug reported by Eran about dependencies with an afterClass method |
| | | Added: IHookCallBack now receives the ITestResult in its run() method |
| | | Added: Name of suite for command line can be set with -Dtestng.suite.name=xxx |
| | | Fixed: TestNGAntTask was hardcoding m_haltOnFSP to true |
| | | Fixed: Passing a null parameter caused an NPE in the reports |
| | | Added: "listener" to the ant task (and documentation) |
| | | Added: if patch-testng-sourcedir.properties is found in the classpath |
| | | with a property "sourcedir" containing a ; separated list of |
| | | directories, this list will override -sourcedir. |
| | | |
| | | =========================================================================== |
| | | |
| | | |
| | | 4.7 |
| | | |
| | | Added: Maven 2 plug-in |
| | | Fixed: Message formattings in TestNG assertion utility class |
| | | Fixed: @Factory methods were counted as @Test as well |
| | | http://jira.opensymphony.com/browse/TESTNG-51 |
| | | Fixed: All DataProvider parameters were shown in the HTML report |
| | | Fixed: Bug in testng-failed.xml generation |
| | | Fixed: <packages> bug when using a jar file to load the test classes |
| | | Added: alwaysRun for before @Configuration methods |
| | | http://jira.opensymphony.com/browse/TESTNG-35 |
| | | Fixed: groupless @Configurations were not invoked if a method depends on a group |
| | | http://jira.opensymphony.com/browse/TESTNG-45 |
| | | Added: beforeGroups/afterGroups to @Configuration |
| | | |
| | | Eclipse plugin: |
| | | |
| | | Added: last contextual launch is available in Eclipse launcher lists |
| | | Fixed: 3.2M5 integration (removed dependency on non-existing class) |
| | | Fixed: testng-failures.xml generation |
| | | |
| | | =========================================================================== |
| | | |
| | | 4.6 |
| | | |
| | | Added: Documentation contains the new reports |
| | | Added: TestNG.setUseDefaultListeners(boolean) |
| | | Added: Descriptions now appear in TextReporter (verbose>=2) and the HTML reports |
| | | Added: description attribute to @Test and @Configuration |
| | | Added: combined Reporter output in the reports |
| | | Added: methods not run in the reports |
| | | Added: org.testng.IReporter |
| | | Added: threadPoolSize to @Test |
| | | Added: Reports now show relative timings (start at 0) |
| | | Added: Reports now show different colors depending on the methods' classes |
| | | Added: Reports now show all parameters used to invoke the test method |
| | | Added: org.testng.Reporter |
| | | Added: DataProviders can accept a Method as first parameter |
| | | Fixed: Extraneous implicit inclusion of a method |
| | | |
| | | Eclipse plugin: |
| | | |
| | | Added: Run/Debug as TestNG test from the editor contextual menu |
| | | Fixed: TESTNG-24: 'Run as testng test' does not appear of the Test annotation does not have a group |
| | | Fixed: TESTNG-18: Eclipse plugin ignores Factory annotation |
| | | Fixed: TESTNG-21: Show differences when double clicking assertion exceptions |
| | | Added: UI allows setting orientation (even more space) |
| | | http://forums.opensymphony.com/thread.jspa?threadID=17225&messageID=33805#33805 |
| | | |
| | | =========================================================================== |
| | | |
| | | 4.5 |
| | | |
| | | Core: |
| | | |
| | | Fixed: Methods were not implicitly included, only groups |
| | | Fixed: Bug with failed parent @Configuration don't skip child @Configuration/@Test invocations |
| | | Fixed: Bug with overridding @Configuration methods (both parent and child were run) |
| | | Fixed: Bug when overriding beforeClass methods in base class (cyclic graph) |
| | | Added: Support for JAAS (see org.testng.IHookable) |
| | | Fixed: Problem with nested classes inside <package name="foo.*" |
| | | Fixed: If a group is not found, mark the method as a skip instead of aborting |
| | | Fixed: testng-failed.xml was not respecting dependencies |
| | | Fixed: class/include method in testng.xml didn't work on default package |
| | | Fixed: DTD only allowed one <define> |
| | | Fixed: ArrayIndexOutOfBoundsException for jMock |
| | | Added: dependsOnMethods can contain methods from another class |
| | | Fixed: JUnitConverter required -restore, not any more (option is now a no-op) |
| | | Fixed: JUnit mode wasn't invoking setName() on test classes |
| | | Added: Regular expressions for classes in <package> |
| | | Added: Distributed TestNG |
| | | Fixed: Command line parameters and testng.xml are now cumulative |
| | | Fixed: Reports now work for multiple suites |
| | | Fixed: Was ignoring abstract classes even if they have non-abstract instances |
| | | Fixed: If setUp() failed, methods were not skipped |
| | | Fixed: Was not clearly indicating when beforeSuite fails |
| | | Added: @Configuration.inheritGroups |
| | | Fixed: inconsistency between testng.xml and objects regarding method selectors |
| | | |
| | | Eclipse plug-in: |
| | | |
| | | New look for the progress view. |
| | | |
| | | =========================================================================== |
| | | |
| | | 4.4 |
| | | |
| | | Core: |
| | | |
| | | Fixed: testng-failures.xml was not excluding methods from base classes |
| | | Fixed: Bug in suites of suites for JUnit mode |
| | | |
| | | =========================================================================== |
| | | |
| | | 4.3 |
| | | |
| | | Core: |
| | | |
| | | Fixed: testng-failures.xml was not excluding methods from base classes |
| | | Fixed: Bug in suites of suites for JUnit mode |
| | | Added: Excluded groups on command line and ant task |
| | | Fixed: When including a group, implicitly include groups depended upon |
| | | Fixed: When depending on several groups, wasn't skipped if one of them failed |
| | | Fixed: Failures weren't reported accurately in the JUnitReports report |
| | | Fixed: Wasn't throwing an exception if depending on a non-existing group |
| | | |
| | | =========================================================================== |
| | | |
| | | 4.2 |
| | | |
| | | Core: |
| | | |
| | | Fixed: wasn't excluding methods in base classes |
| | | Added: alwaysRun for tests (soft dependencies) |
| | | Fixed: Class-level enabled=false were not honored |
| | | Fixed: Bug with multiple dataproviders on same class |
| | | Fixed: Bug with dataprovider defined in the parent class |
| | | Fixed: Bug with dataprovider defined in a subclass |
| | | Fixed: Bug with dataprovider defined in an abstract class |
| | | Fixed: testng-failures generation was excluding the methods even if a failed test depended on it |
| | | |
| | | =========================================================================== |
| | | |
| | | 4.1 |
| | | |
| | | Core: |
| | | |
| | | Added: @DataProviders can return Iterable<Object[]> |
| | | Fixed: Superclass test methods were not called in the presence of a class @Test |
| | | Added: Reporter class to log messages in the HTML reports |
| | | |
| | | =========================================================================== |
| | | |
| | | 4.0 |
| | | |
| | | Core: |
| | | |
| | | Fixed: suite methods now invoked only once in a hierarchy |
| | | Added: @DataProvider and @testng.data-provider |
| | | Fixed: Interleave order now respected for before/afterClass methods |
| | | Added: Can now invoke java -jar testng-2.6.jar <...> |
| | | Added: Support for BeanShell |
| | | Added: Method Selectors (IMethodSelector) |
| | | Fixed: In the absence of dependencies, @Configuration methods respect inheritance |
| | | Fixed: Bug in multithreaded dependencies on methods |
| | | Fixed: dependsOnGroups wasn't working on regular expressions |
| | | Fixed: Bug in <package> when directories contain spaces in their names |
| | | Fixed: Introduced a JDK5 dependency in the JDK1.4 build (getEnclosingClass()) |
| | | Fixed: Output directory in ant task was not honored if it didn't exist |
| | | Fixed: Problem with timeout according to |
| | | http://forums.opensymphony.com/thread.jspa?threadID=6707 |
| | | |
| | | Eclipse plug-in: |
| | | |
| | | Fixed: Wasn't handling linked directories correctly |
| | | Fixed: Bug in QuickFix implementation |
| | | Added: Quick Fix for JUnit conversion (Annotations and JavaDoc) |
| | | Fixed: Methods Run as TestNG test |
| | | Added: Package level Run as TestNG test |
| | | Fixed: Resources from the linked directories are using a wrong path when |
| | | passed to command line TestNG |
| | | |
| | | IDEA plug-in: |
| | | |
| | | Added: Support for JDK 1.4 (both projects and IDEA itself) |
| | | Fixed: Classes that contained only configuration were ignored |
| | | |
| | | =========================================================================== |
| | | |
| | | 2.5 |
| | | |
| | | Added: ITestListener.onTestStart(ITestResult) |
| | | Added: Support for <packages> |
| | | Added: Resource files for easier ant taskdefs |
| | | Fixed: @Configuration methods were not invoked with individual test methods |
| | | Fixed: Bug with ExpectedExceptions |
| | | Fixed: Didn't support nested factory classes |
| | | Fixed: NPE if -target is omitted with JDK 1.4 |
| | | Fixed: @Configuration failures in a class would cause other classes to fail |
| | | Added: alwaysRun |
| | | Fixed: beforeTestClass/afterTestClass were broken for a pathological case |
| | | Added: @Configuration(alwaysRun) |
| | | Added: JUnitConverter task |
| | | Fixed: < and > characters in reports were not escaped |
| | | |
| | | Eclipse plug-in: |
| | | |
| | | Fixed: Class dialog wasn't showing @Factory classes |
| | | |
| | | IDEA plug-in: |
| | | |
| | | First release! |
| | | |
| | | Documentation: |
| | | |
| | | Added: Brand new look!!! |
| | | Added: Section on testng.xml |
| | | Fixed: Numbering of sections |
| | | |
| | | =========================================================================== |
| | | |
| | | 2.4 |
| | | Changed: New package: testng.org |
| | | Fixed: Bug with @ExpectedException occuring the parallel mode |
| | | Fixed: Bug with parameters and beforeTest |
| | | Added: IInstanceInfo support |
| | | Fixed: methods were not excluded when included by groups |
| | | Fixed: testng-failures.xml is now including also the beforeSuite/afterSuite methods |
| | | Fixed: generating the testng-failures.xml is now working as expected |
| | | Fixed: Factories call all the tests even if some of them fail along the way |
| | | Fixed: Better JUnit support (wasn't creating individual instances) |
| | | Fixed: dependsOnGroups didn't work across different classes |
| | | Added: command line (and Ant) -groups option |
| | | Added: @Parameters (and made parameters attribute deprecated) |
| | | Added: Parameters for constructors |
| | | Fixed: Better interleaving of before/afterTestMethods |
| | | Fixed: Ant task |
| | | Fixed: TestNGException thrown when TestNG conditions are not fulfilled |
| | | |
| | | Documentation: |
| | | - New assert classes |
| | | - New ways to launch |
| | | - JUnitConverter documentation |
| | | - new beforeSuite/afterSuite |
| | | |
| | | =========================================================================== |
| | | |
| | | 2.3 |
| | | |
| | | Fixed: Spaces are now legal in JavaDoc comments |
| | | Added: documentation for @Factory |
| | | Fixed: factories were called multiple times |
| | | Added: beforeSuite and afterSuite |
| | | Fixed: inheritance and scope now working properly for annotations |
| | | Fixed: dependsOnMethods wasn't working for 1.4 |
| | | Added: Better stack traces |
| | | Added: Better syntax for included/excluded methods |
| | | Fixed: Better verbose support |
| | | Fixed: Various fixes for the Eclipse plug-in |
| | | Added: Can specify a class name on the command line |
| | | Fixed: Default package bug in JUnitConverter |
| | | Added: Regression tests for JUnitConverter |
| | | Added: -quiet option to JUnitConverter |
| | | |
| | | =========================================================================== |
| | | |
| | | 2.2 |
| | | |
| | | Fixed: Wasn't handling several testng.xml files correctly |
| | | Fixed: Renamed -src to -sourcedir |
| | | Fixed: Complains if no sourcedir is specified in 1.4 |
| | | Added: In 1.4, don't require annotations="javadoc" |
| | | Fixed: If setUp fails, complain and mark test methods as skips |
| | | Fixed: Dependent methods weren't working for 1.4 |
| | | |
| | | =========================================================================== |
| | | |
| | | 2.1 |
| | | |
| | | Added: Parser can accept an InputStream for testng.xml |
| | | Fixed: expected-exceptions now fails if test passes |
| | | Fixed: reports now use the suite name in HTML |
| | | Added: invocationCount and successPercentage |
| | | Added: dependsOnMethods |
| | | Added: timeOut works in non-parallel mode |
| | | |
| | | =========================================================================== |
| | | |
| | | 2.0 |
| | | |
| | | Added: port on JDK 1.4 |
| | | |
| | | =========================================================================== |
| | | |
| | | 1.3 |
| | | |
| | | Added: new view: classes (still experimental) |
| | | Added: timeout on methods |
| | | Added: thread-count |
| | | Added: TestNG is now multithread, see "parallel" in <suite> |
| | | |
| | | =========================================================================== |
| | | |
| | | 1.2 |
| | | |
| | | Added: JUnitConverter |
| | | Fixed: Bug with afterClasses (test: AfterClassCalledAtTheEnd) |
| | | |
| | | =========================================================================== |
| | | |
| | | 1.1 |
| | | |
| | | Added: new links for methods and groups in the HTML report |
| | | Added: <methods> |
| | | Added: <fileset> to <testng> |
| | | |
| | | =========================================================================== |
| | | |
| | | 1.0 |
| | | |
| | | Fixed: Updated to the new DTD |
| | | Fixed: Suite table of contents displays failures first |
| | | Fixed: Bug in afterTestClass |
| | | Added: Validating testng.xml |
| | | Added: Scoped parameters |
| | | Added: testng.xml |
| | | Removed: Property quiet |
| | | Changed: Verbose is now an integer |
| | | Added: Dependent methods |
| | | |
| | | =========================================================================== |
| | | |
| | | 0.9 |
| | | |
| | | Added: Groups of groups |
| | | Added: Groups for Configuration methods |
| | | Added: Parameters |
| | | |
| | | =========================================================================== |
| | | |
| | | 0.2 |
| | | |
| | | Fixed: Merged TestMethod and TestClass into Test |
| | | Added: HTML report |
| | | Added: Regexps for groups |
| | | Fixed: Inheritance of methods |
| | | Fixed: ExpectedException is now called ExpectedExceptions |
| New file |
| | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
| New file |
| | |
| | | We've had to make a few fixes to the TestNG source. Before upgrading |
| | | to a newer version of TestNG, please make sure that the two fixes in |
| | | opends-fixes-diff.txt have made it into the TestNG trunk or apply them |
| | | yourself to a version that you check out. |
| New file |
| | |
| | | Index: src/main/org/testng/internal/MethodInheritance.java |
| | | =================================================================== |
| | | --- src/main/org/testng/internal/MethodInheritance.java (revision 502) |
| | | +++ src/main/org/testng/internal/MethodInheritance.java (working copy) |
| | | @@ -102,27 +102,19 @@ |
| | | // Sort them |
| | | sortMethodsByInheritance(l, baseClassToChild); |
| | | |
| | | - // Set methodDependedUpon accordingly |
| | | - if (baseClassToChild) { |
| | | - for (int i = 1; i < l.size(); i++) { |
| | | - ITestNGMethod m1 = l.get(i - 1); |
| | | - ITestNGMethod m2 = l.get(i); |
| | | + for (int i = 0; i < l.size(); i++) { |
| | | + ITestNGMethod m1 = l.get(i); |
| | | + // Look for any method further down that is a subclass of this one. |
| | | + // This handles the case when there are multiple BeforeClass/AfterClass |
| | | + // methods in the same class. |
| | | + for (int j = i + 1; j < l.size(); j++) { |
| | | + ITestNGMethod m2 = l.get(j); |
| | | if (! equalsEffectiveClass(m1, m2)) { |
| | | Utils.log("MethodInheritance", 4, m2 + " DEPENDS ON " + m1); |
| | | m2.addMethodDependedUpon(MethodHelper.calculateMethodCanonicalName(m1)); |
| | | } |
| | | } |
| | | } |
| | | - else { |
| | | - for (int i = 0; i < l.size() - 1; i++) { |
| | | - ITestNGMethod m1 = l.get(i); |
| | | - ITestNGMethod m2 = l.get(i + 1); |
| | | - if (! equalsEffectiveClass(m1, m2)) { |
| | | - m2.addMethodDependedUpon(MethodHelper.calculateMethodCanonicalName(m1)); |
| | | - Utils.log("MethodInheritance", 4, m2 + " DEPENDS ON " + m1); |
| | | - } |
| | | - } |
| | | - } |
| | | } |
| | | } |
| | | } |
| | | Index: src/main/org/testng/TestRunner.java |
| | | =================================================================== |
| | | --- src/main/org/testng/TestRunner.java (revision 502) |
| | | +++ src/main/org/testng/TestRunner.java (working copy) |
| | | @@ -536,9 +536,13 @@ |
| | | List<ITestNGMethod> parallelList= new ArrayList<ITestNGMethod>(); |
| | | |
| | | computeTestLists(sequentialList, parallelList); |
| | | + |
| | | + int sequentialSize = 0; |
| | | + for (List<ITestNGMethod> methodList: sequentialList) { |
| | | + sequentialSize += methodList.size(); |
| | | + } |
| | | + log(3, "Found " + (sequentialSize + parallelList.size()) + " applicable methods"); |
| | | |
| | | - log(3, "Found " + (sequentialList.size() + parallelList.size()) + " applicable methods"); |
| | | - |
| | | // |
| | | // Create the workers |
| | | // |
| | | @@ -753,7 +757,9 @@ |
| | | findAnnotation(cls, org.testng.internal.annotations.ITest.class); |
| | | if (test != null) { |
| | | if (test.getSequential()) { |
| | | - String className = cls.getName(); |
| | | + // This must not be cls.getName() because that will sort methods in a super class together |
| | | + // instead of with the instance class itself (i.e. the subclass). |
| | | + String className = tm.getTestClass().getRealClass().getName(); |
| | | List<ITestNGMethod> list = sequentialAttributeList.get(className); |
| | | if (list == null) { |
| | | list = new ArrayList<ITestNGMethod>(); |
| New file |
| | |
| | | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > |
| | | <suite name="OpenDS" verbose="1" > |
| | | <test name="default"> |
| | | <!-- DO NOT REMOVE! - GENERATED DEFAULT TAGS (see PrepTestNG class) --> |
| | | </test> |
| | | |
| | | <test name="precommit"> |
| | | <groups> |
| | | <run> |
| | | <!-- DO NOT REMOVE! - GENERATED GLOBAL RUN TAGS (see PrepTestNG class) --> |
| | | <include name="precommit"/> |
| | | <exclude name="broken"/> |
| | | </run> |
| | | </groups> |
| | | </test> |
| | | |
| | | <test name="functional"> |
| | | <groups> |
| | | <run> |
| | | <!-- DO NOT REMOVE! - GENERATED GLOBAL RUN TAGS (see PrepTestNG class) --> |
| | | <include name="functional"/> |
| | | <exclude name="broken"/> |
| | | </run> |
| | | </groups> |
| | | </test> |
| | | |
| | | </suite> |