From 8525330d53a20943b03948b6f3e5bcf8b91dd031 Mon Sep 17 00:00:00 2001 From: Michaelangel007 Date: Tue, 22 May 2018 22:24:48 -0600 Subject: [PATCH] Test and Display if maven isn't installed --- build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build.sh b/build.sh index dd3bb1b..d348893 100755 --- a/build.sh +++ b/build.sh @@ -29,6 +29,15 @@ # # mvn -version # +# NOTE: If this command returns: +# +# -bash: mvn: command not found +# +# You either didn't install maven or it isn't in your path +# i.e. +# which mvn +# /usr/local/bin/mvn +# # 2. Check which version of the Java JRE is installed: # # java -version @@ -88,6 +97,13 @@ # # As the source code is using Java 1.8 langauge features. +if [[ -z "$(which mvn)" ]]; then + echo "ERROR: Maven isn't installed" + echo "Install via:" + echo " brew install maven" + exit +fi + if [[ -z "$JAVA_HOME" ]]; then echo "WARNING: JAVA_HOME was not set" echo "... Defaulting to Java 1.8..."