Author: antonio Date: Sat Apr 30 00:56:51 2005 New Revision: 165393 URL: http://svn.apache.org/viewcvs?rev=165393&view=rev Log: Update to ant 1.6.3
Modified: cocoon/trunk/status.xml cocoon/trunk/tools/bin/ant cocoon/trunk/tools/bin/ant.bat cocoon/trunk/tools/bin/ant.cmd cocoon/trunk/tools/bin/antRun.bat cocoon/trunk/tools/bin/antenv.cmd cocoon/trunk/tools/bin/envset.cmd cocoon/trunk/tools/bin/lcp.bat cocoon/trunk/tools/bin/runrc.cmd cocoon/trunk/tools/lib/ant-junit.jar cocoon/trunk/tools/lib/ant-launcher.jar cocoon/trunk/tools/lib/ant-nodeps.jar cocoon/trunk/tools/lib/ant-trax.jar cocoon/trunk/tools/lib/ant.jar Modified: cocoon/trunk/status.xml URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/status.xml (original) +++ cocoon/trunk/status.xml Sat Apr 30 00:56:51 2005 @@ -430,6 +430,9 @@ </action> </release> <release version="2.1.8" date="TBD"> + <action dev="AG" type="update"> + Updated ant to 1.6.3. + </action> <action dev="VG" type="update"> OJB Block: Added support for OJB 1.1. </action> Modified: cocoon/trunk/tools/bin/ant URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/ant?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/ant (original) +++ cocoon/trunk/tools/bin/ant Sat Apr 30 00:56:51 2005 @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright 2001-2004 The Apache Software Foundation +# Copyright 2001-2005 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -87,15 +87,6 @@ esac if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then - # try to find ANT - if [ -d /opt/ant ] ; then - ANT_HOME=/opt/ant - fi - - if [ -d "${HOME}/opt/ant" ] ; then - ANT_HOME="${HOME}/opt/ant" - fi - ## resolve links - $0 may be a link to ant's home PRG="$0" progname=`basename "$0"` @@ -192,7 +183,7 @@ LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH" fi - # remove class path from launcher -lib option + # remove class path from launcher -cp option CLASSPATH="" fi else @@ -223,6 +214,10 @@ 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 @@ -232,9 +227,11 @@ ANT_HOME=`cygpath --$format "$ANT_HOME"` ANT_LIB=`cygpath --$format "$ANT_LIB"` JAVA_HOME=`cygpath --$format "$JAVA_HOME"` - LOCALCLASSPATH=`cygpath --path --$format "$LOCALCLASSPATH"` + LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"` + LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"` if [ -n "$CLASSPATH" ] ; then - CLASSPATH=`cygpath --path --$format "$CLASSPATH"` + CP_TEMP=`cygpath --path --unix "$CLASSPATH"` + CLASSPATH=`cygpath --path --$format "$CP_TEMP"` fi CYGHOME=`cygpath --$format "$HOME"` fi @@ -295,7 +292,7 @@ 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 -lib \"$CLASSPATH\" $ant_exec_args" +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 Modified: cocoon/trunk/tools/bin/ant.bat URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/ant.bat?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/ant.bat (original) +++ cocoon/trunk/tools/bin/ant.bat Sat Apr 30 00:56:51 2005 @@ -1,106 +1,126 @@ [EMAIL PROTECTED] off - -REM Copyright 2001,2004 The Apache Software Foundation -REM -REM Licensed under the Apache License, Version 2.0 (the "License"); -REM you may not use this file except in compliance with the License. -REM You may obtain a copy of the License at -REM -REM http://www.apache.org/licenses/LICENSE-2.0 -REM -REM Unless required by applicable law or agreed to in writing, software -REM distributed under the License is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM See the License for the specific language governing permissions and -REM limitations under the License. - -if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat" - -if "%OS%"=="Windows_NT" @setlocal - -rem %~dp0 is expanded pathname of the current script under NT -set DEFAULT_ANT_HOME=%~dp0.. - -if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME% -set DEFAULT_ANT_HOME= - -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 -set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1 -shift -goto setupArgs -rem This label provides a place for the argument list loop to break out -rem and for NT handling to skip to. - -:doneStart -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 not "%CLASSPATH%"=="" goto runAntWithClasspath -"%_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% -goto end - -:runAntWithClasspath -"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -lib "%CLASSPATH%" %ANT_CMD_LINE_ARGS% -goto end - -:runAntWithJikes -if not "%CLASSPATH%"=="" goto 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% %ANT_CMD_LINE_ARGS% -goto end - -: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% -lib "%CLASSPATH%" %ANT_CMD_LINE_ARGS% -goto end - -:end -set _JAVACMD= -set ANT_CMD_LINE_ARGS= - -if "%OS%"=="Windows_NT" @endlocal - -:mainEnd -if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat" - [EMAIL PROTECTED] off + +REM Copyright 2001,2004-2005 The Apache Software Foundation +REM +REM Licensed under the Apache License, Version 2.0 (the "License"); +REM you may not use this file except in compliance with the License. +REM You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat" + +if "%OS%"=="Windows_NT" @setlocal +if "%OS%"=="WINNT" @setlocal + +rem %~dp0 is expanded pathname of the current script under NT +set DEFAULT_ANT_HOME=%~dp0.. + +if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME% +set DEFAULT_ANT_HOME= + +set _USE_CLASSPATH=yes + +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 +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 +if not "%CLASSPATH%"=="" goto runAntWithClasspath +"%_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% +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% +goto end + +: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% +goto end + +:runAntWithJikes +if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath +if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath + +: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% +goto end + +: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% +goto end + +:end +set _JAVACMD= +set ANT_CMD_LINE_ARGS= + +if "%OS%"=="Windows_NT" @endlocal +if "%OS%"=="WINNT" @endlocal + +:mainEnd +if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat" + Modified: cocoon/trunk/tools/bin/ant.cmd URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/ant.cmd?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/ant.cmd (original) +++ cocoon/trunk/tools/bin/ant.cmd Sat Apr 30 00:56:51 2005 @@ -1,92 +1,92 @@ -/* - Copyright 2003-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - 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 +/* + Copyright 2003-2004 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 Modified: cocoon/trunk/tools/bin/antRun.bat URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/antRun.bat?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/antRun.bat (original) +++ cocoon/trunk/tools/bin/antRun.bat Sat Apr 30 00:56:51 2005 @@ -1,45 +1,47 @@ [EMAIL PROTECTED] off - -REM -REM Copyright 2001-2002,2004 The Apache Software Foundation -REM -REM Licensed under the Apache License, Version 2.0 (the "License"); -REM you may not use this file except in compliance with the License. -REM You may obtain a copy of the License at -REM -REM http://www.apache.org/licenses/LICENSE-2.0 -REM -REM Unless required by applicable law or agreed to in writing, software -REM distributed under the License is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM See the License for the specific language governing permissions and -REM limitations under the License. -REM -REM - -if "%OS%"=="Windows_NT" @setlocal - -if ""%1""=="""" goto runCommand - -rem Change drive and directory to %1 -if "%OS%"=="Windows_NT" cd /d ""%1"" -if not "%OS%"=="Windows_NT" cd ""%1"" -shift - -rem Slurp the command line arguments. This loop allows for an unlimited number -rem of agruments (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 - [EMAIL PROTECTED] off + +REM +REM Copyright 2001-2002,2004-2005 The Apache Software Foundation +REM +REM Licensed under the Apache License, Version 2.0 (the "License"); +REM you may not use this file except in compliance with the License. +REM You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. +REM +REM + +if "%OS%"=="Windows_NT" @setlocal +if "%OS%"=="WINNT" @setlocal + +if ""%1""=="""" goto runCommand + +rem Change drive and directory to %1 +if "%OS%"=="Windows_NT" cd /d ""%1"" +if not "%OS%"=="Windows_NT" cd ""%1"" +shift + +rem Slurp the command line arguments. This loop allows for an unlimited number +rem of agruments (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 + Modified: cocoon/trunk/tools/bin/antenv.cmd URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/antenv.cmd?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/antenv.cmd (original) +++ cocoon/trunk/tools/bin/antenv.cmd Sat Apr 30 00:56:51 2005 @@ -1,99 +1,99 @@ -/* - Copyright 2003-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Ant environment -*/ - -'@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 +/* + Copyright 2003-2004 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Ant environment +*/ + +'@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 Modified: cocoon/trunk/tools/bin/envset.cmd URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/envset.cmd?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/envset.cmd (original) +++ cocoon/trunk/tools/bin/envset.cmd Sat Apr 30 00:56:51 2005 @@ -1,130 +1,130 @@ -/* - - Copyright 2003-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -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 +/* + + Copyright 2003-2004 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +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 Modified: cocoon/trunk/tools/bin/lcp.bat URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/lcp.bat?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/lcp.bat (original) +++ cocoon/trunk/tools/bin/lcp.bat Sat Apr 30 00:56:51 2005 @@ -1,30 +1,30 @@ -REM -REM Copyright 2001-2004 The Apache Software Foundation -REM -REM Licensed under the Apache License, Version 2.0 (the "License"); -REM you may not use this file except in compliance with the License. -REM You may obtain a copy of the License at -REM -REM http://www.apache.org/licenses/LICENSE-2.0 -REM -REM Unless required by applicable law or agreed to in writing, software -REM distributed under the License is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM See the License for the specific language governing permissions and -REM limitations under the License. -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=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH% - +REM +REM Copyright 2001-2004 The Apache Software Foundation +REM +REM Licensed under the Apache License, Version 2.0 (the "License"); +REM you may not use this file except in compliance with the License. +REM You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. +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=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH% + Modified: cocoon/trunk/tools/bin/runrc.cmd URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/bin/runrc.cmd?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== --- cocoon/trunk/tools/bin/runrc.cmd (original) +++ cocoon/trunk/tools/bin/runrc.cmd Sat Apr 30 00:56:51 2005 @@ -1,59 +1,59 @@ -/* - Copyright 2003-2004 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - 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 +/* + Copyright 2003-2004 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 Modified: cocoon/trunk/tools/lib/ant-junit.jar URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/lib/ant-junit.jar?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== Binary files - no diff available. Modified: cocoon/trunk/tools/lib/ant-launcher.jar URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/lib/ant-launcher.jar?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== Binary files - no diff available. Modified: cocoon/trunk/tools/lib/ant-nodeps.jar URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/lib/ant-nodeps.jar?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== Binary files - no diff available. Modified: cocoon/trunk/tools/lib/ant-trax.jar URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/lib/ant-trax.jar?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== Binary files - no diff available. Modified: cocoon/trunk/tools/lib/ant.jar URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/lib/ant.jar?rev=165393&r1=165392&r2=165393&view=diff ============================================================================== Binary files - no diff available.