-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployScript_NoRebuild.bat
56 lines (45 loc) · 1.57 KB
/
deployScript_NoRebuild.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
@ECHO off
:: Change these variables to reflect your system
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 - No ReBuild =
echo =======================================================
:: Kill tomcat server if it is running
cd /d %tomcat%bin\
call shutdown.bat
:: 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
:: 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
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