hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkey...@apache.org
Subject svn commit: r1418333 - in /hbase/trunk: bin/hbase hbase-it/pom.xml
Date Fri, 07 Dec 2012 14:38:44 GMT
Author: nkeywal
Date: Fri Dec  7 14:38:42 2012
New Revision: 1418333

URL: http://svn.apache.org/viewvc?rev=1418333&view=rev
Log:
HBASE-7269 Testing in place does not work if not building with default profile

Modified:
    hbase/trunk/bin/hbase
    hbase/trunk/hbase-it/pom.xml

Modified: hbase/trunk/bin/hbase
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/hbase?rev=1418333&r1=1418332&r2=1418333&view=diff
==============================================================================
--- hbase/trunk/bin/hbase (original)
+++ hbase/trunk/bin/hbase Fri Dec  7 14:38:42 2012
@@ -43,11 +43,6 @@
 #
 #   HBASE_ROOT_LOGGER The root appender. Default is INFO,console
 #
-#   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.
 #
@@ -108,11 +103,6 @@ shift
 JAVA=$JAVA_HOME/bin/java
 JAVA_HEAP_MAX=-Xmx1000m 
 
-MVN="mvn"
-if [ "$MAVEN_HOME" != "" ]; then
-  MVN=${MAVEN_HOME}/bin/mvn
-fi
-
 # override default settings for this command, if applicable
 if [ -f "$HBASE_HOME/conf/hbase-env-$COMMAND.sh" ]; then
   . "$HBASE_HOME/conf/hbase-env-$COMMAND.sh"
@@ -156,18 +146,8 @@ add_maven_deps_to_classpath() {
   f="${HBASE_HOME}/target/cached_classpath.txt"
   if [ ! -f "${f}" ]
   then
-    #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}' -pl '${modules}'"
+      echo "As this is a development environment, we need ${f} to be generated from maven
(command: mvn compile)"
       exit 1
-    fi
   fi
   CLASSPATH=${CLASSPATH}:`cat "${f}"`
 }

Modified: hbase/trunk/hbase-it/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-it/pom.xml?rev=1418333&r1=1418332&r2=1418333&view=diff
==============================================================================
--- hbase/trunk/hbase-it/pom.xml (original)
+++ hbase/trunk/hbase-it/pom.xml Fri Dec  7 14:38:42 2012
@@ -96,6 +96,22 @@
     </pluginManagement>
 
     <plugins>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+	    <!-- generates the file that will be used by the bin/hbase script in the dev env
-->
+            <id>create-hbase-generated-classpath</id>
+            <phase>compile</phase>    
+            <goals>
+              <goal>build-classpath</goal>
+            </goals>
+            <configuration>
+              <outputFile>${project.build.directory}/../../target/cached_classpath.txt</outputFile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <!--  Run integration tests with mvn verify -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>



Mime
View raw message