Administrator
|
This does not work here
This patch fixes the issue for me, please check on your side before I commit Index: ant.bat =================================================================== --- ant.bat (revision 1606305) +++ ant.bat (working copy) @@ -29,7 +29,7 @@ SET LAUNCHER_JAR= SET BASE_LIB=%TOP%\framework\base\lib SET ANT_LIB=%BASE_LIB%\ant -FOR %%G IN (%BASE_LIB%\ant-*-ant-launcher.jar) DO SET LAUNCHER_JAR=%BASE_LIB%\%%G +FOR %%G IN (%BASE_LIB%\ant-*-ant-launcher.jar) DO SET LAUNCHER_JAR=%%G ECHO %LAUNCHER_JAR% IF [%LAUNCHER_JAR%] == [] ( ECHO "Couldn't find ant-launcher.jar" Jacques Le 26/06/2014 18:17, Adam Heath a écrit : > From a single linux-based machine, I can now do: > > ../../ant [options] [targets] > > or > > wine cmd /c ../../ant [options] [targets] > > The later is used to test underneath wine-i386(aka, 32-bit). > > On 06/26/2014 11:15 AM, [hidden email] wrote: >> Author: doogie >> Date: Thu Jun 26 16:15:03 2014 >> New Revision: 1605836 >> >> URL: http://svn.apache.org/r1605836 >> Log: >> Port the same set of features in the ant shell script to the ant batch >> file. >> >> * Automatically find the correct ant-launcher.jar version. >> * You can now run the batch file from sub directories. ../../ant works. >> >> Modified: >> ofbiz/trunk/ant.bat >> >> Modified: ofbiz/trunk/ant.bat >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/ant.bat?rev=1605836&r1=1605835&r2=1605836&view=diff >> ============================================================================== >> --- ofbiz/trunk/ant.bat (original) >> +++ ofbiz/trunk/ant.bat Thu Jun 26 16:15:03 2014 >> @@ -19,5 +19,21 @@ REM # under the License. >> REM ##################################################################### >> ECHO ON >> -"%JAVA_HOME%\bin\java" -jar framework/base/lib/ant-1.9.0-ant-launcher.jar -lib framework/base/lib/ant %1 %2 %3 %4 %5 %6 >> +IF DEFINED JAVA_HOME ( >> + SET JAVA="%JAVA_HOME%\bin\java" >> +) ELSE ( >> + SET JAVA="java" >> +) >> + >> +SET TOP=%~dp0 >> +SET LAUNCHER_JAR= >> +SET BASE_LIB=%TOP%\framework\base\lib >> +SET ANT_LIB=%BASE_LIB%\ant >> +FOR %%G IN (%BASE_LIB%\ant-*-ant-launcher.jar) DO SET LAUNCHER_JAR=%BASE_LIB%\%%G >> +ECHO %LAUNCHER_JAR% >> +IF [%LAUNCHER_JAR%] == [] ( >> + ECHO "Couldn't find ant-launcher.jar" >> +) ELSE ( >> + %JAVA% -jar "%LAUNCHER_JAR%" -lib "%ANT_LIB%" %1 %2 %3 %4 %5 %6 >> +) >> >> > > -- |
Your patch doesn't work for me. Bother, that's cute. On my side, the
for loop %G is just the basename, but on your side, it's the full path. Your side actually makes more sense. Go ahead and apply your change, then I'll make it smarter on my side. On 06/28/2014 03:25 AM, Jacques Le Roux wrote: > This does not work here > > This patch fixes the issue for me, please check on your side before I > commit > > Index: ant.bat > =================================================================== > --- ant.bat (revision 1606305) > +++ ant.bat (working copy) > @@ -29,7 +29,7 @@ > SET LAUNCHER_JAR= > SET BASE_LIB=%TOP%\framework\base\lib > SET ANT_LIB=%BASE_LIB%\ant > -FOR %%G IN (%BASE_LIB%\ant-*-ant-launcher.jar) DO SET > LAUNCHER_JAR=%BASE_LIB%\%%G > +FOR %%G IN (%BASE_LIB%\ant-*-ant-launcher.jar) DO SET LAUNCHER_JAR=%%G > ECHO %LAUNCHER_JAR% > IF [%LAUNCHER_JAR%] == [] ( > ECHO "Couldn't find ant-launcher.jar" > > Jacques > > Le 26/06/2014 18:17, Adam Heath a écrit : >> From a single linux-based machine, I can now do: >> >> ../../ant [options] [targets] >> >> or >> >> wine cmd /c ../../ant [options] [targets] >> >> The later is used to test underneath wine-i386(aka, 32-bit). >> >> On 06/26/2014 11:15 AM, [hidden email] wrote: >>> Author: doogie >>> Date: Thu Jun 26 16:15:03 2014 >>> New Revision: 1605836 >>> >>> URL: http://svn.apache.org/r1605836 >>> Log: >>> Port the same set of features in the ant shell script to the ant batch >>> file. >>> >>> * Automatically find the correct ant-launcher.jar version. >>> * You can now run the batch file from sub directories. ../../ant works. >>> >>> Modified: >>> ofbiz/trunk/ant.bat >>> >>> Modified: ofbiz/trunk/ant.bat >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/ant.bat?rev=1605836&r1=1605835&r2=1605836&view=diff >>> ============================================================================== >>> >>> --- ofbiz/trunk/ant.bat (original) >>> +++ ofbiz/trunk/ant.bat Thu Jun 26 16:15:03 2014 >>> @@ -19,5 +19,21 @@ REM # under the License. >>> REM >>> ##################################################################### >>> ECHO ON >>> -"%JAVA_HOME%\bin\java" -jar >>> framework/base/lib/ant-1.9.0-ant-launcher.jar -lib >>> framework/base/lib/ant %1 %2 %3 %4 %5 %6 >>> +IF DEFINED JAVA_HOME ( >>> + SET JAVA="%JAVA_HOME%\bin\java" >>> +) ELSE ( >>> + SET JAVA="java" >>> +) >>> + >>> +SET TOP=%~dp0 >>> +SET LAUNCHER_JAR= >>> +SET BASE_LIB=%TOP%\framework\base\lib >>> +SET ANT_LIB=%BASE_LIB%\ant >>> +FOR %%G IN (%BASE_LIB%\ant-*-ant-launcher.jar) DO SET >>> LAUNCHER_JAR=%BASE_LIB%\%%G >>> +ECHO %LAUNCHER_JAR% >>> +IF [%LAUNCHER_JAR%] == [] ( >>> + ECHO "Couldn't find ant-launcher.jar" >>> +) ELSE ( >>> + %JAVA% -jar "%LAUNCHER_JAR%" -lib "%ANT_LIB%" %1 %2 %3 %4 %5 %6 >>> +) >>> >>> >> >> > |
Free forum by Nabble | Edit this page |