bodewig 2004/04/14 08:33:31 Modified: . CONTRIBUTORS WHATSNEW src/script ant.cmd antenv.cmd Log: Adapt the OS/2 wrapper scripts to the new launcher. PR: 28226 Submitted by: Zdenek Wagner <wagner at cesnet dot cz> Adapted to new license while I was at it. Revision Changes Path 1.12 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS =================================================================== RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CONTRIBUTORS 13 Apr 2004 11:40:08 -0000 1.11 +++ CONTRIBUTORS 14 Apr 2004 15:33:31 -0000 1.12 @@ -192,3 +192,4 @@ Wolfgang Werner Wolf Siberski Yohann Roussel +Zdenek Wagner 1.584 +3 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.583 retrieving revision 1.584 diff -u -r1.583 -r1.584 --- WHATSNEW 13 Apr 2004 21:46:02 -0000 1.583 +++ WHATSNEW 14 Apr 2004 15:33:31 -0000 1.584 @@ -133,6 +133,9 @@ transfer and new [local|remote][File|Todir] alternatives to file and todir that explicitly state the direction of the transfer. +* The OS/2 wrapper scripts have been adapted to use the new launcher. + Bugzilla Report 28226. + Changes from Ant 1.6.0 to Ant 1.6.1 ============================================= 1.2 +35 -14 ant/src/script/ant.cmd Index: ant.cmd =================================================================== RCS file: /home/cvs/ant/src/script/ant.cmd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ant.cmd 23 Apr 2003 15:57:43 -0000 1.1 +++ ant.cmd 14 Apr 2004 15:33:31 -0000 1.2 @@ -1,10 +1,22 @@ /* - Copyright (c) 2003 The Apache Software Foundation. All rights - reserved. - - Run ant + 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 @@ -21,14 +33,7 @@ env="OS2ENVIRONMENT" antenv = _getenv_('antenv') -if _testenv_() = 0 then do - interpret 'call "' || antenv || '"' '"' || envarg || '"' - if _testenv_() = 0 then do - say 'Ant environment is not set properly' - x = endlocal() - exit 16 - end -end +if _testenv_() = 0 then interpret 'call "' || antenv || '"' '"' || envarg || '"' if mode = '' then mode = _getenv_('ANT_MODE' '..') if mode \= '/' then do @@ -39,15 +44,31 @@ 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) -if lcp\='' then lcp = '-cp' lcp +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 -java opts lcp 'org.apache.tools.ant.Main' settings args antarg +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() 1.2 +16 -17 ant/src/script/antenv.cmd Index: antenv.cmd =================================================================== RCS file: /home/cvs/ant/src/script/antenv.cmd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- antenv.cmd 23 Apr 2003 15:57:43 -0000 1.1 +++ antenv.cmd 14 Apr 2004 15:33:31 -0000 1.2 @@ -1,10 +1,22 @@ /* - Copyright (c) 2003 The Apache Software Foundation. All rights - reserved. + 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 + Ant environment */ +'@echo off' call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" call SysLoadFuncs @@ -47,20 +59,7 @@ classes = stream(JAVA_HOME || "\lib\tools.jar", "C", "QUERY EXISTS") if classes \= '' then classpath = prepend(classpath classes) -mincp = classpath -call SysFileTree ANT_HOME || '\lib\*.jar', 'jar', 'FO' -do i = 1 to jar.0 - nm = filespec('name', jar.i) - if pos('ant-', nm) == 0 then classpath = prepend(classpath jar.i) -end -if length(classpath) > 512 then do - say 'Classpath is too long, switching to the minimal version...' - say '... some tasks will not work' - classpath = mincp - classpath = prepend(classpath ANT_HOME || '\lib\ant.jar') - classpath = prepend(classpath ANT_HOME || '\lib\optional.jar') -end - +classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar') 'SET CLASSPATH=' || classpath /* Setting classpathes, options and arguments */
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]