diff --git a/CHANGES.txt b/CHANGES.txt index a18395da660..4ce7553a75b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -223,6 +223,8 @@ Release 0.21.0 - Unreleased (Kannan Muthukkaruppan via Stack) HBASE-2063 For hfileoutputformat, on timeout/failure/kill clean up half-written hfile (Ruslan Salyakhov via Stack) + HBASE-2281 Hbase shell does not work when started from the build dir + (Alexey Kovyrin via Stack) IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/bin/hbase b/bin/hbase index ebd09d8bea5..ca916d3abd9 100755 --- a/bin/hbase +++ b/bin/hbase @@ -99,6 +99,19 @@ if [ -d "$HBASE_HOME/build/webapps" ]; then CLASSPATH=${CLASSPATH}:$HBASE_HOME/build fi +# Add maven target directory +if [ -f $HBASE_HOME/pom.xml ]; then + HBASE_VER=`grep '' $HBASE_HOME/pom.xml | head -1 | sed 's/.*\(.*\)<\/version>/\1/'` + MAVEN_TARGET_DIR=$HBASE_HOME/target/hbase-$HBASE_VER-bin/hbase-$HBASE_VER + if [ -d "$MAVEN_TARGET_DIR" ]; then + for f in $MAVEN_TARGET_DIR/*.jar $MAVEN_TARGET_DIR/lib/*.jar; do + if [ -f $f ]; then + CLASSPATH=${CLASSPATH}:$f; + fi + done + fi +fi + # For releases, add hbase & webapps to CLASSPATH # Webapps must come first else it messes up Jetty if [ -d "$HBASE_HOME/webapps" ]; then