-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcc_maven.sh
executable file
·43 lines (29 loc) · 1.11 KB
/
cc_maven.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
___get_maven_command() {
local -r MAVEN_WRAPPER="./mvnw"
if ___do_executables_exist_without_output "$MAVEN_WRAPPER"; then
___stdout "$MAVEN_WRAPPER"
else
___stdout "mvn"
fi
}
c_maven_clean_install() {
local -r MAVEN_EXECUTABLE="$(___get_maven_command)"
local -r CURRENT_DIR_PATH="$(pwd)"
local -r CURRENT_DIR_NAME="$(basename $CURRENT_DIR_PATH)"
___execute "$MAVEN_EXECUTABLE" clean install $@
c_notify_user "0.1" "maven finish for $CURRENT_DIR_NAME"
}
c_maven_clean_install_update_snapshots() {
local -r MAVEN_EXECUTABLE="$(___get_maven_command)"
local -r CURRENT_DIR_PATH="$(pwd)"
local -r CURRENT_DIR_NAME="$(basename $CURRENT_DIR_PATH)"
___execute "$MAVEN_EXECUTABLE" clean install -U $@
c_notify_user '0.1' "maven finish for $CURRENT_DIR_NAME"
}
c_maven_clean_install_skip_tests() {
local -r MAVEN_EXECUTABLE="$(___get_maven_command)"
local -r CURRENT_DIR_PATH="$(pwd)"
local -r CURRENT_DIR_NAME="$(basename $CURRENT_DIR_PATH)"
___execute "$MAVEN_EXECUTABLE" clean install -DskipTests $@
c_notify_user '0.1' "maven finish for $CURRENT_DIR_NAME"
}