forked from draptik/angulardemorestful
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_java_backend.sh
executable file
·45 lines (38 loc) · 1.73 KB
/
start_java_backend.sh
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
#!/bin/bash
echo "STARTING MAVEN BUILD... ==============================================================="
# Run Maven build on backend for deploying to local Tomcat
## with tests:
# mvn -f backend/java-backend/pom.xml package
## without tests:
mvn -f backend/java-backend/pom.xml package -Dmaven.test.skip=true
echo "STARTING TOMCAT... ===================================================================="
TOMCAT=$HOME/development/servers/tomcat/apache-tomcat-7.0.42/
$TOMCAT/bin/startup.sh
echo "DONE =================================================================================="
echo ""
echo "#######################################################################################"
echo ""
echo ""
echo "NOTE: To stop Tomcat execute the following command:"
echo "./stop_java_backend.sh"
echo ""
echo "NOTE: To test if the web service is running execute the following command:"
echo "./test_java_backend.sh"
echo ""
echo "Expected output:"
echo ""
echo "---------------------------------------------------------------------------------------"
echo -e "HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With
Access-Control-Allow-Headers: GET, PUT, OPTIONS, X-XSRF-TOKEN
Content-Type: application/json
Transfer-Encoding: chunked
Date: Tue, 03 Sep 2013 19:05:14 GMT
{\"id\":0,\"firstName\":\"JonFromREST\",\"lastName\":\"DoeFromREST\"}"
echo "---------------------------------------------------------------------------------------"
echo ""
echo "#######################################################################################"
echo ""
echo "END ==================================================================================="