-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployScript_onlySquirrel.bat
70 lines (58 loc) · 1.96 KB
/
deployScript_onlySquirrel.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
70
@ECHO off
:: Change these variables to reflect your system
set semantecosquirrel=C:\Users\student\Documents\GitHub\SemantEco\facets\semanteco-squirrel-facet\
set semantaqua=C:\Users\student\Documents\GitHub\SemantEco\
set tomcat=C:\Users\student\Desktop\apache-tomcat-7.0.37\
echo ==========================================
echo = Running Deploy Script - Skipping Tests =
echo ==========================================
:: Kill tomcat server if it is running
cd /d %tomcat%bin\
call shutdown.bat
:: Build using maven
cd /d %semantecosquirrel%
call mvn clean install -fail-fast -DskipTests
if not "%ERRORLEVEL%" == "0" (
cd /d %~dp0
echo .
echo =====================================
echo = !!!!!!!! COMPILE FAILURE !!!!!!!! =
echo =====================================
pause > nul
exit /b
)
:: Delete old compiled servlet
cd /d %tomcat%webapps\
rmdir semanteco /s /q
del semanteco.war /F
:: Initiate tomcat server so we can push new servlet to it
cd /d %tomcat%bin\
call startup.bat -Xmx1024m -Xms256m
:: Wait for server to start before calling deploy
echo =======================================================================
echo = Starting Tomcat Server. I will wait for 5 seconds and then continue =
echo =======================================================================
ping 192.0.2.2 -n 1 -w 5000 > nul
:: Deploy our built project as a servlet to the Tomcat server
cd /d %semantaqua%webapp\
call mvn clean tomcat7:deploy -DskipTests
if not "%ERRORLEVEL%" == "0" (
cd /d %~dp0
echo .
echo ====================================
echo = !!!!!!!! DEPLOY FAILURE !!!!!!!! =
echo ====================================
pause > nul
exit /b
)
:: Return to original directory (for conveinence)
cd /d %~dp0
:: Start up webview for the annotator
start http://localhost:8080/semanteco/
:: Echo out that we are done
echo.
echo ==============================
echo = Done running deploy script =
echo ==============================
:: Wait for user input to quit (debug)
::pause >nul