From feaf2e6a7277d2ebe10130d567d1cad68df82887 Mon Sep 17 00:00:00 2001 From: Elliott Clark Date: Mon, 26 Nov 2012 14:07:31 -0800 Subject: [PATCH] Force modules to be explicitly ordered. --- bin/hbase | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git bin/hbase bin/hbase index 336d5f4..aca258c 100755 --- bin/hbase +++ bin/hbase @@ -156,13 +156,16 @@ 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}" $MAVEN_OPTS &> /dev/null + #we need hbase-it to always be the last module run. since it has the largest classpath + modules=`find hbase-* -type f -name 'pom.xml' |sed 's#\(.*\)/.*#\1#' | sed '/hbase-it/d' |sort -u | paste -s -d , -` + modules="${modules},hbase-it" + ${MVN} -f "${HBASE_HOME}/pom.xml" package dependency:build-classpath -DskipTests -Dmdep.outputFile="${f}" -pl "${modules}" &> /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" + echo "Maven command was: ${MVN} -f '${HBASE_HOME}/pom.xml' package dependency:build-classpath -DskipTests -Dmdep.outputFile='${f}' -pl '${modules}'" exit 1 fi fi -- 1.7.10.2 (Apple Git-33)