hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkey...@apache.org
Subject svn commit: r1412565 - /hbase/trunk/bin/hbase
Date Thu, 22 Nov 2012 14:44:40 GMT
Author: nkeywal
Date: Thu Nov 22 14:44:38 2012
New Revision: 1412565

URL: http://svn.apache.org/viewvc?rev=1412565&view=rev
Log:
HBASE-7168 In the script called 'hbase', we don't check the errors when generating the classpath
with mvn

Modified:
    hbase/trunk/bin/hbase

Modified: hbase/trunk/bin/hbase
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/hbase?rev=1412565&r1=1412564&r2=1412565&view=diff
==============================================================================
--- hbase/trunk/bin/hbase (original)
+++ hbase/trunk/bin/hbase Thu Nov 22 14:44:38 2012
@@ -45,6 +45,9 @@
 #
 #   MAVEN_HOME       Where mvn is installed.
 #
+#   MAVEN_OPTS       Extra options (eg '-Dhadoop.profile=2.0') passed to maven.
+#                    Empty by default.
+#
 #   JRUBY_HOME       JRuby path: $JRUBY_HOME/lib/jruby.jar should exist.
 #                    Defaults to the jar packaged with HBase.
 #
@@ -153,7 +156,15 @@ add_maven_deps_to_classpath() {
   f="${HBASE_HOME}/target/cached_classpath.txt"
   if [ ! -f "${f}" ]
   then
-    ${MVN} -f "${HBASE_HOME}/pom.xml" package dependency:build-classpath -DskipTests -Dmdep.outputFile="${f}"
&> /dev/null
+    ${MVN} -f "${HBASE_HOME}/pom.xml" package dependency:build-classpath -DskipTests -Dmdep.outputFile="${f}"
$MAVEN_OPTS &> /dev/null
+    if [ $? -ne 0 ]
+    then
+      #delete the file, maven writes it even on failure. Keeping it would breaks the caching
mechanism the next time we call the script
+      rm -rf "${f}"
+      echo "The maven command used to generate the classpath failed, please check your environment."
+      echo "Maven command was: ${MVN} -f '${HBASE_HOME}/pom.xml' package dependency:build-classpath
-DskipTests -Dmdep.outputFile='${f}' $MAVEN_OPTS"
+      exit 1
+    fi
   fi
   CLASSPATH=${CLASSPATH}:`cat "${f}"`
 }



Mime
View raw message