@@ -24,9 +24,12 @@ print_usage () {
24
24
echo " $0 server-type path/to/project [-- maven arguments]" >&2
25
25
echo >&2
26
26
echo " server-type can be any of the following:" >&2
27
- echo " appengine" >&2
28
- echo " jetty" >&2
29
- echo " spring-boot" >&2
27
+ echo " appengine - GAE Standard - Local - GA Plugin" >&2
28
+ echo " jetty - Flex - Local" >&2
29
+ echo " spring-boot - local" >&2
30
+ echo " new_mvn - local - Standard / FlexCompat" >&2
31
+ echo " gradle - local - Standard / FlexCompat" >&2
32
+ echo " gradle_jetty - local - Flex" & 2
30
33
}
31
34
32
35
if [[ -z " $1 " ]]; then
@@ -36,16 +39,28 @@ if [[ -z "$1" ]]; then
36
39
fi
37
40
case $1 in
38
41
appengine)
39
- mvn_plugin=" appengine:devserver"
40
42
server_started_message=" localhost:8080"
43
+ command=" mvn --batch-mode clean appengine:devserver -DskipTests"
41
44
;;
42
45
jetty)
43
- mvn_plugin=" jetty:run-exploded"
44
46
server_started_message=" Started Jetty Server"
47
+ command=" mvn --batch-mode clean jetty:run-exploded -DskipTests"
45
48
;;
46
49
spring-boot)
47
- mvn_plugin=" spring-boot:run"
48
50
server_started_message=" Tomcat started on port(s): 8080 (http)"
51
+ command=" mvn --batch-mode clean spring-boot:run -DskipTests"
52
+ ;;
53
+ new_mvn)
54
+ server_started_message=" localhost:8080"
55
+ command=" mvn --batch-mode clean appengine:run -DskipTests"
56
+ ;;
57
+ gradle)
58
+ server_started_message=" localhost:8080"
59
+ command=" gradle appengineRun"
60
+ ;;
61
+ gradle_jetty)
62
+ server_started_message=" localhost:8080"
63
+ command=" gradle jettyRun"
49
64
;;
50
65
* )
51
66
print_usage
@@ -60,11 +75,10 @@ if [[ -z "$2" ]]; then
60
75
fi
61
76
code_path=$2
62
77
63
- mvn_command=" mvn --batch-mode clean ${mvn_plugin} -DskipTests"
64
78
if [[ " $3 " == " --" ]]; then
65
79
shift 3
66
80
for mvn_arg in " ${@ } " ; do
67
- mvn_command =" ${mvn_command } ${mvn_arg} "
81
+ command =" ${command } ${mvn_arg} "
68
82
done
69
83
elif [[ -n " $3 " ]]; then
70
84
echo " Got unexpected third argument" >&2
78
92
(
79
93
cd " $code_path "
80
94
expect -c "
81
- spawn ${mvn_command }
95
+ spawn ${command }
82
96
set timeout 600
83
97
expect \" ${server_started_message} \"
84
98
" ' sleep 10
0 commit comments