Index: bin/hbase =================================================================== --- bin/hbase (revision 1052081) +++ bin/hbase (working copy) @@ -54,9 +54,9 @@ esac # Detect if we are in hbase sources dir -in_sources_dir=false -if [ -f $HBASE_HOME/pom.xml ]; then - in_sources_dir=true +in_dev_env=false +if [ -d "${HBASE_HOME}/target" ]; then + in_dev_env=true fi # if no args specified, show usage @@ -64,9 +64,6 @@ echo "Usage: hbase " echo "where is one of:" echo " shell run the HBase shell" - if $in_sources_dir; then - echo " shell-tests run the HBase shell tests" - fi echo " zkcli run the ZooKeeper shell" echo " master run an HBase HMaster node" echo " regionserver run an HBase HRegionServer node" @@ -110,16 +107,10 @@ CLASSPATH=${CLASSPATH}:$JAVA_HOME/lib/tools.jar add_maven_deps_to_classpath() { - # The maven build dir is called 'target' - target="${HBASE_HOME}/target" - if [ ! -d "${HBASE_HOME}/target" ] - then - mkdir "${target}" - fi # Need to generate classpath from maven pom. This is costly so generate it # and cache it. Save the file into our target dir so a mvn clean will get # clean it up and force us create a new one. - f="${target}/cached_classpath.txt" + f="${HBASE_HOME}/target/cached_classpath.txt" if [ ! -f "${f}" ] then ${MVN} -f "${HBASE_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null @@ -142,7 +133,7 @@ } # Add maven target directory -if $in_sources_dir; then +if $in_dev_env; then add_maven_deps_to_classpath add_maven_main_classes_to_classpath add_maven_test_classes_to_classpath @@ -219,14 +210,6 @@ # figure out which class to run if [ "$COMMAND" = "shell" ] ; then CLASS="org.jruby.Main ${HBASE_HOME}/bin/hirb.rb" -elif $in_sources_dir && [ "$COMMAND" = "shell-tests" ] ; then - # Finx maven build classpath - add_maven_deps_to_classpath - add_maven_main_classes_to_classpath - add_maven_test_classes_to_classpath - # Start the tests - CORESRC="${HBASE_HOME}/src" - CLASS="org.jruby.Main -I${CORESRC}/main/ruby -I${CORESRC}/test/ruby ${CORESRC}/test/ruby/tests_runner.rb" elif [ "$COMMAND" = "master" ] ; then CLASS='org.apache.hadoop.hbase.master.HMaster' if [ "$1" != "stop" ] ; then