[jboss-cvs] JBossAS SVN: r61857 - branches/Branch_4_2/build.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 29 13:18:39 EDT 2007


Author: dimitris at jboss.org
Date: 2007-03-29 13:18:39 -0400 (Thu, 29 Mar 2007)
New Revision: 61857

Modified:
   branches/Branch_4_2/build/build.bat
Log:
JBAS-4243, process all command line arguments

Modified: branches/Branch_4_2/build/build.bat
===================================================================
--- branches/Branch_4_2/build/build.bat	2007-03-29 16:50:14 UTC (rev 61856)
+++ branches/Branch_4_2/build/build.bat	2007-03-29 17:18:39 UTC (rev 61857)
@@ -10,11 +10,6 @@
 REM  ======================================================================
 REM
 REM $Id$
-REM
-REM Authors:
-REM     Jason Dillon <jason at planet57.com>
-REM     Sacha Labourey <sacha.labourey at cogito-info.ch>
-REM
 
 REM ******************************************************
 REM Ignore the ANT_HOME variable: we want to use *our*
@@ -26,6 +21,7 @@
 
 SETLOCAL
 
+set NOPAUSE=true
 set CLASSPATH=
 set ANT_HOME=
 
@@ -40,51 +36,51 @@
 set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
 
 REM ******************************************************
+REM ********Save the command line arguments***************
 REM ******************************************************
+set BUILD_ARGS=%1
+if ""%1""=="""" goto completedArgs
+shift
+:processArg
+if ""%1""=="""" goto completedArgs
+set BUILD_ARGS=%BUILD_ARGS% %1
+shift
+goto processArg
 
+:completedArgs
+
+REM ******************************************************
+REM ******************************************************
+
 SET EXECUTED=FALSE
-for %%i in (%NAMES%) do call :subLoop %%i %*
+for %%i in (%NAMES%) do call :subLoop %%i %BUILD_ARGS%
 
 goto :EOF
 
-
 REM ******************************************************
 REM ********* Search for names in the subfolders *********
 REM ******************************************************
 
 :subLoop
-SET SUBDIR=%1
-SHIFT
+for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %BUILD_ARGS%
 
-set OTHER_ARGS=
-:setupArgs
-if %1a==a goto doneSetupArgs
-set OTHER_ARGS=%OTHER_ARGS% %1
-shift
-goto setupArgs
-:doneSetupArgs
-
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%SUBDIR%\bin\ant.bat %OTHER_ARGS%
-
 goto :EOF
 
-
 REM ******************************************************
 REM ************ Test if ANT Batch file exists ***********
 REM ******************************************************
 
 :testIfExists
-if exist %1 call :BatchFound %*
+if exist %1 call :BatchFound %1 %BUILD_ARGS%
 
 goto :EOF
 
-
 REM ******************************************************
 REM ************** Batch file has been found *************
 REM ******************************************************
 
 :BatchFound
-if (%EXECUTED%)==(FALSE) call :ExecuteBatch %*
+if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %BUILD_ARGS%
 set EXECUTED=TRUE
 
 goto :EOF
@@ -94,8 +90,8 @@
 REM ******************************************************
 
 :ExecuteBatch
-echo Calling %*
-call %*
+echo Calling %1 %BUILD_ARGS%
+call %1 %BUILD_ARGS%
 
 :end
 




More information about the jboss-cvs-commits mailing list