-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployScript_onlyAnnotator.bat
90 lines (76 loc) · 2.61 KB
/
deployScript_onlyAnnotator.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@ECHO off
:: Change these variables to reflect your file system
set semantecoannotator=C:\Users\student\Documents\GitHub\SemantEco\annotator-webapp
set semantecoannotatorfacet=C:\Users\student\Documents\GitHub\SemantEco\facets\annotator
set tomcat=C:\Users\student\Documents\apache-tomcat-7.0.37\
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: You should not need to change anything below this point ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
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 (js, css, etc)
cd /d %semantecoannotator%
call mvn clean install -fail-fast -DskipTests
if not "%ERRORLEVEL%" == "0" (
cd /d %~dp0
echo .
echo =====================================
echo = !!!!!!!! COMPILE FAILURE !!!!!!!! =
echo =====================================
pause > nul
exit /b
)
:: Build using maven (index.jsp)
cd /d %semantecoannotatorfacet%
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
rmdir annotator /s /q
del semanteco.war /F
del annotator.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 %semantecoannotator%\
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/resources/annotator/SemantEcoAnnotator.html
start http://localhost:8080/annotator/
:: Echo out that we are done
echo.
echo ==============================
echo = Done running deploy script =
echo ==============================
:: Wait for user input to quit (debug)
::pause >nul