modules/common/ant-bundle/src/main/assembly/bin/antenv.cmd | 98 -----
modules/common/ant-bundle/src/main/assembly/bin/envset.cmd | 131 ------
modules/common/ant-bundle/src/main/assembly/bin/lcp.bat | 31 -
modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat | 231 ++++++++++++
modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.cmd | 93 ----
modules/common/ant-bundle/src/main/assembly/bin/runrc.cmd | 60 ---
modules/common/ant-bundle/src/main/scripts/assembly.xml | 2
7 files changed, 232 insertions(+), 414 deletions(-)
New commits:
commit d3799e2f59f40845bdf2da3898d347ae4e795cdd
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Feb 11 14:52:59 2011 -0500
missed two places where the rhq ant main should be specified
diff --git a/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat
b/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat
index 69e5cf6..da43fe8 100644
--- a/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat
+++ b/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat
@@ -135,14 +135,14 @@ if not "%JIKESPATH%"=="" goto runAntWithJikes
:runAnt
if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
:runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_ANT_HOME%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%"
%ANT_CMD_LINE_ARGS%
+"%_JAVACMD%" %ANT_OPTS% -classpath
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_ANT_HOME%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" -main
org.rhq.bundle.ant.AntMain %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
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_ANT_HOME%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+"%_JAVACMD%" %ANT_OPTS% -classpath
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_ANT_HOME%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% -main org.rhq.bundle.ant.AntMain
%ANT_CMD_LINE_ARGS%
rem Check the error code of the Ant build
if not "%OS%"=="Windows_NT" goto onError
set ANT_ERROR=%ERRORLEVEL%
commit 5a7f6fb357fab1abfdfe1d40735596e1f7ad5baf
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Feb 11 13:49:38 2011 -0500
remove the old windows scripts and replace with the newer one that should work on
current windows machines
diff --git a/modules/common/ant-bundle/src/main/assembly/bin/antenv.cmd
b/modules/common/ant-bundle/src/main/assembly/bin/antenv.cmd
deleted file mode 100644
index 170d89f..0000000
--- a/modules/common/ant-bundle/src/main/assembly/bin/antenv.cmd
+++ /dev/null
@@ -1,98 +0,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.
-*/
-
-'@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
diff --git a/modules/common/ant-bundle/src/main/assembly/bin/envset.cmd
b/modules/common/ant-bundle/src/main/assembly/bin/envset.cmd
deleted file mode 100644
index 3b07419..0000000
--- a/modules/common/ant-bundle/src/main/assembly/bin/envset.cmd
+++ /dev/null
@@ -1,131 +0,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.
-
-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
diff --git a/modules/common/ant-bundle/src/main/assembly/bin/lcp.bat
b/modules/common/ant-bundle/src/main/assembly/bin/lcp.bat
deleted file mode 100644
index 4bf2e7c..0000000
--- a/modules/common/ant-bundle/src/main/assembly/bin/lcp.bat
+++ /dev/null
@@ -1,31 +0,0 @@
-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%
-
diff --git a/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat
b/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat
new file mode 100644
index 0000000..69e5cf6
--- /dev/null
+++ b/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.bat
@@ -0,0 +1,231 @@
+@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.
+
+REM -----RHQ CHANGES START-----
+REM THIS FILE WAS ORIGINALLY ANT.BAT VERSION 1.8.0
+REM IT HAS BEEN ALTERED IN THE FOLLOWING WAYS:
+REM 1. -main ARGUMENT WAS ADDED TO THE ANT START COMMAND
+REM 2. ANT_HOME HAS BEEN RENAMED TO RHQ_ANT_HOME
+REM 3. antrc_pre/post.bat HAVE BEEN RENAMED TO rhq-antrc_pre/post.bat
+REM -----RHQ CHANGES STOP-----
+
+if "%HOME%"=="" goto homeDrivePathPre
+if exist "%HOME%\rhq-antrc_pre.bat" call "%HOME%\rhq-antrc_pre.bat"
+
+:homeDrivePathPre
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre
+if exist "%HOMEDRIVE%%HOMEPATH%\rhq-antrc_pre.bat" call
"%HOMEDRIVE%%HOMEPATH%\rhq-antrc_pre.bat"
+
+:userProfilePre
+if "%USERPROFILE%"=="" goto alpha
+if "%USERPROFILE%"=="%HOME%" goto alpha
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha
+if exist "%USERPROFILE%\rhq-antrc_pre.bat" call
"%USERPROFILE%\rhq-antrc_pre.bat"
+
+:alpha
+
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+if "%RHQ_ANT_HOME%"=="" goto setDefaultAntHome
+
+:stripAntHome
+if not _%RHQ_ANT_HOME:~-1%==_\ goto checkClasspath
+set RHQ_ANT_HOME=%RHQ_ANT_HOME:~0,-1%
+goto stripAntHome
+
+:setDefaultAntHome
+rem %~dp0 is expanded pathname of the current script under NT
+set RHQ_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).
+: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 RHQ_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 "%RHQ_ANT_HOME%\lib\ant.jar" goto checkJava
+
+rem check for ant in Program Files
+if not exist "%ProgramFiles%\ant" goto checkSystemDrive
+set RHQ_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 RHQ_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 RHQ_ANT_HOME=C:\ant
+goto checkJava
+
+:noAntHome
+echo RHQ_ANT_HOME is set incorrectly or ant could not be located. Please set
RHQ_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
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_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
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_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
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_ANT_HOME%"
"-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%
-cp "%CLASSPATH%" -main org.rhq.bundle.ant.AntMain %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
"%RHQ_ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%RHQ_ANT_HOME%"
"-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%
-main org.rhq.bundle.ant.AntMain %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%\rhq-antrc_post.bat" call
"%HOME%\rhq-antrc_post.bat"
+
+:homeDrivePathPost
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost
+if exist "%HOMEDRIVE%%HOMEPATH%\rhq-antrc_post.bat" call
"%HOMEDRIVE%%HOMEPATH%\rhq-antrc_post.bat"
+
+:userProfilePost
+if "%USERPROFILE%"=="" goto omega
+if "%USERPROFILE%"=="%HOME%" goto omega
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega
+if exist "%USERPROFILE%\rhq-antrc_post.bat" call
"%USERPROFILE%\rhq-antrc_post.bat"
+
+:omega
+
diff --git a/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.cmd
b/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.cmd
deleted file mode 100644
index d221a40..0000000
--- a/modules/common/ant-bundle/src/main/assembly/bin/rhq-ant.cmd
+++ /dev/null
@@ -1,93 +0,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.
-
- 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
diff --git a/modules/common/ant-bundle/src/main/assembly/bin/runrc.cmd
b/modules/common/ant-bundle/src/main/assembly/bin/runrc.cmd
deleted file mode 100644
index c68f04d..0000000
--- a/modules/common/ant-bundle/src/main/assembly/bin/runrc.cmd
+++ /dev/null
@@ -1,60 +0,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.
-
- 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
commit 180ef219ff8014635a543c98d75b09ee65c9fcd3
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Feb 11 13:43:00 2011 -0500
make the name of the base directory the same as the name of the zip as it will appear
to the user.
this means when we extract the bundle tool, the top zip directory that gets created
will be
rhq-bundle-deployer-VERSION
diff --git a/modules/common/ant-bundle/src/main/scripts/assembly.xml
b/modules/common/ant-bundle/src/main/scripts/assembly.xml
index d7c9af7..4477694 100644
--- a/modules/common/ant-bundle/src/main/scripts/assembly.xml
+++ b/modules/common/ant-bundle/src/main/scripts/assembly.xml
@@ -9,7 +9,7 @@
<format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
- <baseDirectory>${project.build.finalName}</baseDirectory>
+ <baseDirectory>rhq-bundle-deployer-${project.version}</baseDirectory>
<!-- matches the zip when it is renamed in rhq-container.build.xml -->
<fileSets>