-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathfind-dqo-classpath.cmd
64 lines (58 loc) · 2.35 KB
/
find-dqo-classpath.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
@echo off
@REM
@REM Copyright © 2021-2024 DQOps ([email protected])
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.
@REM
if exist "%~dp0dqops\pom.xml" (
"%JAVA_HOME%\bin\javac" --version > nul 2> nul
if ERRORLEVEL 1 (
echo Java JDK is not installed. Make sure that your JAVA_HOME points to a JDK 11 or never installation. Java JRE is not enough to compile DQOps
exit /b 1
)
if not exist "%~dp0dqops\target\dqo-dqops-%DQO_VERSION%.jar" (
if exist "%~dp0dqops" (
pushd "%~dp0"
call "%~dp0\mvnw.cmd" package -DskipTests -Pbuild-with-jdk-11 -Prun-npm -f "%~dp0\pom.xml"
popd
if ERRORLEVEL 1 (
echo DQO failed to compile
exit /b 1
)
) else (
echo DQO jar not found
exit /b 1
)
)
if not "x%DQO_PREPEND_CLASSES%"=="x" (
set DQO_LAUNCH_CLASSPATH="%DQO_PREPEND_CLASSES%;%DQO_USER_HOME%\jars\*;%DQO_USER_HOME%\jars\;%~dp0dqops\target\dqo-dqops-%DQO_VERSION%.jar;%~dp0lib\target\output\dqo-lib-%DQO_VERSION%\jars\*"
) else (
set DQO_LAUNCH_CLASSPATH="%DQO_USER_HOME%\jars\*;%DQO_USER_HOME%\jars\;%~dp0dqops\target\dqo-dqops-%DQO_VERSION%.jar;%~dp0lib\target\output\dqo-lib-%DQO_VERSION%\jars\*"
)
) else (
if not exist "%DQO_HOME%\jars" (
echo DQO_HOME does not have a %DQO_HOME%\jars folder
exit /b 1
)
if not "x%DQO_PREPEND_CLASSES%"=="x" (
set DQO_LAUNCH_CLASSPATH="%DQO_PREPEND_CLASSES%;%DQO_USER_HOME%\jars\*;%DQO_USER_HOME%\jars\;%DQO_HOME%\jars\*"
) else (
set DQO_LAUNCH_CLASSPATH="%DQO_USER_HOME%\jars\*;%DQO_USER_HOME%\jars\;%DQO_HOME%\jars\*"
)
)
if not "x%HADOOP_HOME%"=="x" (
set HADOOP_HOME=%DQO_HOME%
)
if not "x%AZURE_ENABLE_HTTP_CLIENT_SHARING%"=="x" (
set AZURE_ENABLE_HTTP_CLIENT_SHARING=true
)