PR: 28226 Submitted by: Zdenek Wagner <wagner at cesnet dot cz> Adapted to new license while I was at it. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276309 13f79535-47bb-0310-9956-ffa450edef68master
@@ -192,3 +192,4 @@ William Ferguson | |||||
Wolfgang Werner | Wolfgang Werner | ||||
Wolf Siberski | Wolf Siberski | ||||
Yohann Roussel | Yohann Roussel | ||||
Zdenek Wagner |
@@ -133,6 +133,9 @@ Other changes: | |||||
transfer and new [local|remote][File|Todir] alternatives to file and | transfer and new [local|remote][File|Todir] alternatives to file and | ||||
todir that explicitly state the direction of the transfer. | 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 | Changes from Ant 1.6.0 to Ant 1.6.1 | ||||
============================================= | ============================================= | ||||
@@ -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 | parse arg mode envarg '::' antarg | ||||
if mode\='.' & mode\='..' & mode\='/' then do | if mode\='.' & mode\='..' & mode\='/' then do | ||||
@@ -21,14 +33,7 @@ x = setlocal() | |||||
env="OS2ENVIRONMENT" | env="OS2ENVIRONMENT" | ||||
antenv = _getenv_('antenv') | 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 mode = _getenv_('ANT_MODE' '..') | ||||
if mode \= '/' then do | if mode \= '/' then do | ||||
@@ -39,15 +44,31 @@ if mode \= '/' then do | |||||
interpret 'call "' || runrc || '"' antrc '"' || mode || '"' | interpret 'call "' || runrc || '"' antrc '"' || mode || '"' | ||||
end | 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 | settings = '-Dant.home=' || ANT_HOME '-Djava.home=' || JAVA_HOME | ||||
java = _getenv_('javacmd' 'java') | java = _getenv_('javacmd' 'java') | ||||
opts = value('ANT_OPTS',,env) | opts = value('ANT_OPTS',,env) | ||||
args = value('ANT_ARGS',,env) | args = value('ANT_ARGS',,env) | ||||
lcp = value('LOCALCLASSPATH',,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() | x = endlocal() | ||||
@@ -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 RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" | ||||
call SysLoadFuncs | call SysLoadFuncs | ||||
@@ -47,20 +59,7 @@ if classes \= '' then classpath = prepend(classpath classes) | |||||
classes = stream(JAVA_HOME || "\lib\tools.jar", "C", "QUERY EXISTS") | classes = stream(JAVA_HOME || "\lib\tools.jar", "C", "QUERY EXISTS") | ||||
if classes \= '' then classpath = prepend(classpath classes) | 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 | 'SET CLASSPATH=' || classpath | ||||
/* Setting classpathes, options and arguments */ | /* Setting classpathes, options and arguments */ | ||||