forked from oracle/coherence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfgwindows.cmd
executable file
·105 lines (91 loc) · 2.25 KB
/
cfgwindows.cmd
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
@echo off
rem Copyright (c) 2000, 2020, Oracle and/or its affiliates.
rem Licensed under the Universal Permissive License v 1.0 as shown at
rem http://oss.oracle.com/licenses/upl.
rem
rem This script sets all environment variables necessary to build Coherence.
rem
rem Command line:
rem cfgwindows [-reset]
rem
rem This script is responsible for the following environment variables:
rem
rem DEV_ROOT e.g. c:\dev
rem MAVEN_HOME e.g. c:\dev\tools\maven
rem TDE_HOME e.g. c:\dev\tools\tde
rem CLASSPATH e.g.
rem PATH e.g. %ANT_HOME%\bin;%MAVEN_HOME%\bin;%PATH%
rem
rem _TDE_HOME saved TDE_HOME
rem _CLASSPATH saved CLASSPATH
rem _PATH saved PATH
rem
rem
rem Reset the build environment if the "-reset" flag was passed
rem
if "%1"=="-reset" (
if "%DEV_ROOT%"=="" (
echo Build environment already reset.
goto exit
)
set MAVEN_HOME=%_MAVEN_HOME%
set TDE_HOME=%_TDE_HOME%
set CLASSPATH=%_CLASSPATH%
set PATH=%_PATH%
set DEV_ROOT=
set _MAVEN_HOME=
set _TDE_HOME=
set _CLASSPATH=
set _PATH=
echo Build environment reset.
goto exit
)
rem
rem Ensure that the JAVA_HOME envirionment variable has been set
rem
if defined JAVA_HOME (
:: Strip quotes from JAVA_HOME environment variable if present
set JAVA_HOME=%JAVA_HOME:"=%
) else (
echo Please set JAVA_HOME appropriately.
goto exit
)
echo JAVA_HOME = %JAVA_HOME%
"%JAVA_HOME%\bin\java" -version
rem
rem Determine the root of the dev tree
rem
if not "%DEV_ROOT%"=="" (
echo Build environment already set.
goto exit
)
for %%i in ("%~dp0..") do @set DEV_ROOT=%%~fni
echo DEV_ROOT = %DEV_ROOT%
rem
rem Set the MAVEN_HOME environment variable if %DEV_ROOT%\tools\maven exists
rem
set _MAVEN_HOME=%MAVEN_HOME%
if exist %DEV_ROOT%\tools\maven (
set MAVEN_HOME=%DEV_ROOT%\tools\maven
echo MAVEN_HOME = %MAVEN_HOME%
)
rem
rem Set the TDE_HOME environment variable
rem
set _TDE_HOME=%TDE_HOME%
set TDE_HOME=%DEV_ROOT%\tools\tde
echo TDE_HOME = %TDE_HOME%
rem
rem Set the CLASSPATH environment variable
rem
set _CLASSPATH=%CLASSPATH%
set CLASSPATH=
echo CLASSPATH = %CLASSPATH%
rem
rem Set the PATH environment variable
rem
set _PATH=%PATH%
set PATH=%TDE_HOME%\bin;%PATH%
echo PATH = %PATH%
echo Build environment set.
:exit