forked from pentaho/mondrian
-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildOnJdk.bat
executable file
·69 lines (52 loc) · 1.91 KB
/
buildOnJdk.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
rem $Id$
echo %JAVA_HOME%
rem **** This program takes 1 argument and a series of other arguments to pass to Ant.
rem **** - buildOnJdk.bat [jdk version] [ant arguments]
rem **** The value of [jdk version] must be one of:
rem **** - jdk1.5
rem **** - jdk1.6
rem **** - jdk1.7
rem **** It assumes the following environment variables are set.
rem **** - JAVA_HOME_15: Home directory of a JDK 1.5.X.
rem **** - JAVA_HOME_16: Home directory of a JDK 1.6.X.
rem **** - JAVA_HOME_17: Home directory of a JDK 1.7.X.
rem **** It also assumes that Ant is on the classpath.
rem =============================================================================
rem ===== You can set some environment variables right here if needed ===========
rem Change the following line to point to your JDK 1.5 home.
rem set JAVA_HOME_15=C:\apps\java\jdk1.5.0_22
rem Change the following line to point to your JDK 1.6 home.
rem set JAVA_HOME_16=C:\apps\java\jdk1.6.0_27
rem Change the following line to point to your JDK 1.7 home.
rem set JAVA_HOME_17=C:\apps\java\jdk1.7.0_01
rem Change the following line to point to your ant home.
rem set ANT_HOME=C:\apps\ant\1.7.1
rem set ANT_HOME=C:\apps\ant\1.8.1
rem ======================================================
rem ===== Don't touch anything below this line ===========
if %1==jdk1.5 (
if "%JAVA_HOME_15%" NEQ "" (
set JAVA_HOME=%JAVA_HOME_15%
))
if %1==jdk1.6 (
if "%JAVA_HOME_16%" NEQ "" (
set JAVA_HOME=%JAVA_HOME_16%
))
if %1==jdk1.7 (
if "%JAVA_HOME_17%" NEQ "" (
set JAVA_HOME=%JAVA_HOME_17%
))
set ANT_ARGUMENTS=-Drequested.java.version=%1
for %%A in (%*) do (
set ANT_ARGUMENTS=%ANT_ARGUMENTS% %%A
)
rem We set JAVACMD for the benefit of Ant.
set JAVACMD=%JAVA_HOME%\bin\java.exe
rem Some debug info
echo Using ANT_HOME: %ANT_HOME%
echo Using JAVA_HOME: %JAVA_HOME%
echo Using JAVACMD: %JAVACMD%
echo Using Ant arguments: %ANT_ARGUMENTS%
ant %ANT_ARGUMENTS%
rem End buildOnJdk.bat