This page is OBSOLETE. See the Developer section in the HBase book (http://hbase.apache.org/book.html#developer)
Working with HBase under Eclipse
Here are the instructions for setting up the HBase development environment in Eclipse (Ganymede) . This is similar to the EclipseEnvironment guide but with some changes that are specific to HBase.
Download and install Eclipse Ganymede
- Create a folder for your new Eclipse Workspace, name it Hbasewrk.
Download archive with empty workspace from HBaseEmptyWorkspace.tar.gz
- Extract .metadata folder to Hbasewrk (.metadata can be hidden in graphical file manager)
- Open Eclipse using Hbasewrk
Check if Eclipse is using the correct JRE at Windows > Preferences > Java > Installed JREs
- This should be Java 1.6.x, preferably from Sun.
Now Eclipse is configured.
Download and install the Subversive plug-in
Follow the steps for this that are outlined in the same step in EclipseEnvironment
Associate the HBase Trunk Repository
Select File > New > Other...
Then SVN > Repository Location wizard
Use http://svn.apache.org/repos/asf/hbase/ as the Root URL.
- The repository will show up under "SVN Repositories" Perspective (select "Open Perspective.")
Create a Project
From the SVN Repositories perspective:
- Right-click on "trunk" and select "Find/Check Out As..."
- Check out as a project configured using the New Project Wizard
- Java Project
- Project Name: "HBase"
Configuring Eclipse to build HBase
As indicated in the http://maven.apache.org/guides/mini/guide-ide-eclipse.html, you should navigate to the "Hbasewrk" directory in your workspace and run "mvn eclipse:eclipse" to generate the .project file to use with HBase. You'll have to manually set the M2_REPO classpath variable by switching back to Eclipse, right-clicking on the project, selecting "Preferences", navigating to "Java > Build Path > Classpath Variables", clicking "Add Folder", and then selecting your local Maven repository (usually ~/.m2/repository").