svn commit: r1605836 - /ofbiz/trunk/ant.bat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1605836 - /ofbiz/trunk/ant.bat

doogie-3
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
+)
 


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1605836 - /ofbiz/trunk/ant.bat

Adam Heath-2
 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
> +)
>  
>
>