Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "Hbase/MavenPrimer" page has been changed by jgray. The comment on this change is: Changes from the two dropped revisions from stack/jgray. http://wiki.apache.org/hadoop/Hbase/MavenPrimer?action=diff&rev1=8&rev2=9 -------------------------------------------------- 1. [[#oneunittest|How do I run one unit test only?]] 1. [[#starthbase|How do I do an in-situ bin/start-hbase.sh?]] 1. [[#equiv|How do I do the equivalent of an "ant clean", or "ant jar", etc., using maven?]] + 1. [[#otherjar|How do I try out a jar that is not installed in a maven repository (e.g. a new zookeeper jar)?]] <<Anchor(whatdoineed)>> @@ -34, +35 @@ IntelliJ: Built-in awesomeness. It just works. - Eclipse: Definitely recommend the M2Eclipse plugin here: http://m2eclipse.sonatype.org/. Or, you can have eclipse generate the {{{.classpath}}} and {{{.project}}} for you. This works pretty well. First do {{{$ mvn install}}}. Then do {{{$mvn eclipse:eclipse}}}. This writes the eclipse files for core and each of the contribs. In eclipse, you'd open new project based off existing sources. You will have to symlink hbase/core under your eclipse workspace to get around eclipse complaint that projects need to be just inside the elipse workspace. + Eclipse: Definitely recommend the M2Eclipse plugin here: http://m2eclipse.sonatype.org/. Or, you can have eclipse generate the {{{.classpath}}} and {{{.project}}} for you. This works pretty well. First do {{{$ mvn install}}} or {{{$ mvn -DskipTests install}}}. Then do {{{$mvn eclipse:eclipse}}}. This writes the eclipse files for core and each of the contribs. In eclipse, you'd open new project based off existing sources. You will have to symlink hbase/core under your eclipse workspace to get around eclipse complaint that projects need to be just inside the elipse workspace. <<Anchor(jar)>> == How do I just build the jars without going through a full unit test cycle? == @@ -99, +100 @@ For more on the [[http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html|mvn lifecycles...]] + + <<Anchor(otherjar)>> + == How do I try out a jar that is not installed in a maven repository (e.g. a new zookeeper jar)? == + Here is how you'd have it use a zookeeper jar that was added to the {{{${HBASE_HOME}/lib}}} directory. + + Edit the core/pom.xml since its hbase core that depends on zk: + + {{{ + Index: core/pom.xml + =================================================================== + --- core/pom.xml (revision 943580) + +++ core/pom.xml (working copy) + @@ -223,6 +223,9 @@ + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>zookeeper</artifactId> + + <scope>system</scope> + + <!--Go up to the lib dir at ${HBASE_HOME} to find zk jar--> + + <systemPath>${basedir}/../lib/zookeeper-3.3.1.jar</systemPath> + </dependency> + + <dependency> + @@ -277,4 +280,4 @@ + <artifactId>hadoop-test</artifactId> + </dependency> + </dependencies> + -</project> + \ No newline at end of file + +</project> + }}} +
