@@ -30,16 +30,16 @@ _mvn_cmd_opts() {
30
30
31
31
_mvn_settings_opt () {
32
32
local home=" ${1} "
33
- local mavenInstallDir =" ${2} "
33
+ local maven_install_dir =" ${2} "
34
34
35
35
if [ -n " $MAVEN_SETTINGS_PATH " ]; then
36
36
echo -n " -s $MAVEN_SETTINGS_PATH "
37
37
elif [ -n " $MAVEN_SETTINGS_URL " ]; then
38
- local settingsXml =" ${mavenInstallDir } /.m2/settings.xml"
39
- mkdir -p " $( dirname " ${settingsXml } " ) "
40
- curl --retry 3 --retry-connrefused --connect-timeout 5 --silent --max-time 10 --location " ${MAVEN_SETTINGS_URL} " --output " ${settingsXml } "
41
- if [ -f " ${settingsXml } " ]; then
42
- echo -n " -s ${settingsXml } "
38
+ local settings_xml =" ${maven_install_dir } /.m2/settings.xml"
39
+ mkdir -p " $( dirname " ${settings_xml } " ) "
40
+ curl --retry 3 --retry-connrefused --connect-timeout 5 --silent --max-time 10 --location " ${MAVEN_SETTINGS_URL} " --output " ${settings_xml } "
41
+ if [ -f " ${settings_xml } " ]; then
42
+ echo -n " -s ${settings_xml } "
43
43
else
44
44
error " Could not download settings.xml from the URL defined in MAVEN_SETTINGS_URL!"
45
45
return 1
@@ -63,8 +63,8 @@ has_maven_wrapper() {
63
63
}
64
64
65
65
get_cache_status () {
66
- local cacheDir =${1}
67
- if [ ! -d " ${cacheDir } /.m2" ]; then
66
+ local cache_dir =${1}
67
+ if [ ! -d " ${cache_dir } /.m2" ]; then
68
68
echo " not-found"
69
69
else
70
70
echo " valid"
@@ -74,41 +74,41 @@ get_cache_status() {
74
74
run_mvn () {
75
75
local scope=${1}
76
76
local home=${2}
77
- local mavenInstallDir =${3}
77
+ local maven_install_dir =${3}
78
78
79
- mkdir -p " ${mavenInstallDir } "
79
+ mkdir -p " ${maven_install_dir } "
80
80
if has_maven_wrapper " ${home} " ; then
81
- cache_copy " .m2/wrapper" " ${mavenInstallDir } " " ${home} "
81
+ cache_copy " .m2/wrapper" " ${maven_install_dir } " " ${home} "
82
82
chmod +x " ${home} /mvnw"
83
- local mavenExe =" ./mvnw"
83
+ local maven_exe =" ./mvnw"
84
84
else
85
85
# shellcheck disable=SC2164
86
- cd " ${mavenInstallDir } "
86
+ cd " ${maven_install_dir } "
87
87
88
- install_maven " ${mavenInstallDir } " " ${home} "
89
- PATH=" ${mavenInstallDir } /.maven/bin:$PATH "
90
- local mavenExe =" mvn"
88
+ install_maven " ${maven_install_dir } " " ${home} "
89
+ PATH=" ${maven_install_dir } /.maven/bin:$PATH "
90
+ local maven_exe =" mvn"
91
91
# shellcheck disable=SC2164
92
92
cd " ${home} "
93
93
fi
94
94
95
95
local mvn_settings_opt
96
- mvn_settings_opt=" $( _mvn_settings_opt " ${home} " " ${mavenInstallDir } " ) "
96
+ mvn_settings_opt=" $( _mvn_settings_opt " ${home} " " ${maven_install_dir } " ) "
97
97
98
- MAVEN_OPTS=" $( _mvn_java_opts " ${scope} " " ${home} " " ${mavenInstallDir } " ) "
98
+ MAVEN_OPTS=" $( _mvn_java_opts " ${scope} " " ${home} " " ${maven_install_dir } " ) "
99
99
export MAVEN_OPTS
100
100
101
101
# shellcheck disable=SC2164
102
102
cd " ${home} "
103
- local mvnOpts
104
- mvnOpts =" $( _mvn_cmd_opts " ${scope} " ) "
103
+ local mvn_opts
104
+ mvn_opts =" $( _mvn_cmd_opts " ${scope} " ) "
105
105
106
106
status " Executing Maven"
107
- echo " $ ${mavenExe } ${mvnOpts } " | indent
107
+ echo " $ ${maven_exe } ${mvn_opts } " | indent
108
108
109
- # We rely on word splitting for mvn_settings_opt and mvnOpts :
109
+ # We rely on word splitting for mvn_settings_opt and mvn_opts :
110
110
# shellcheck disable=SC2086
111
- if ! ${mavenExe } -DoutputFile=target/mvn-dependency-list.log -B ${mvn_settings_opt} ${mvnOpts } | indent; then
111
+ if ! ${maven_exe } -DoutputFile=target/mvn-dependency-list.log -B ${mvn_settings_opt} ${mvn_opts } | indent; then
112
112
error " Failed to build app with Maven
113
113
We're sorry this build is failing! If you can't find the issue in application code,
114
114
please submit a ticket so we can help: https://help.heroku.com/"
@@ -129,9 +129,9 @@ write_mvn_profile() {
129
129
130
130
remove_mvn () {
131
131
local home=${1}
132
- local mavenInstallDir =${2}
132
+ local maven_install_dir =${2}
133
133
if has_maven_wrapper " ${home} " ; then
134
- cache_copy " .m2/wrapper" " $home " " $mavenInstallDir "
134
+ cache_copy " .m2/wrapper" " $home " " $maven_install_dir "
135
135
rm -rf " $home /.m2"
136
136
fi
137
137
}
0 commit comments