Skip to content

Commit

Permalink
SPARK-1658: Correctly identify if maven is installed and working
Browse files Browse the repository at this point in the history
The current test is checking the exit code of "tail" rather than "mvn".
This new check will make sure that mvn is installed and was able to
execute the "version command".

Author: Rahul Singhal <[email protected]>

Closes apache#580 from rahulsinghaliitd/SPARK-1658 and squashes the following commits:

83c0313 [Rahul Singhal] SPARK-1658: Correctly identify if maven is installed and working
bf821b9 [Rahul Singhal] SPARK-1658: Correctly identify if maven is installed and working
  • Loading branch information
Rahul Singhal authored and pwendell committed May 4, 2014
1 parent fb05432 commit e97a2e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions make-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
FWDIR="$(cd `dirname $0`; pwd)"
DISTDIR="$FWDIR/dist"

VERSION=$(mvn help:evaluate -Dexpression=project.version | grep -v "INFO" | tail -n 1)
if [ $? == -1 ] ;then
set -o pipefail
VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1)
if [ $? != 0 ]; then
echo -e "You need Maven installed to build Spark."
echo -e "Download Maven from https://maven.apache.org."
exit -1;
Expand Down

0 comments on commit e97a2e6

Please sign in to comment.