You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Elazar Leibovich <el...@gmail.com> on 2013/05/09 22:25:09 UTC

Canonical dependency for hbase client

When someone wants to use HBase's client library, which <dependency> should
he use?

Using:

<dependency>
                <groupId>org.apache.hbase</groupId>
                <artifactId>hbase</artifactId>
                <version>${hbase.version}</version>
</dependency>

Is not good enough, because it will grab all sort of libraries relevant to
hbase server environment, but not to a client (*cough* jruby, *cough*).

I found some contradicting recommendation on the web as to what the client
actually need.

Here is something I came up with[0], probably not perfect, but it's a start.

But is there a "best practice" how to depend on hbase client related jars
only with maven? Something similar to the hadoop-client pom?

PS, not only that the extra dependency takes time and space in vain, they
can contradict other libs in your project.

[0]:
<dependency>
                <groupId>org.apache.hbase</groupId>
                <artifactId>hbase</artifactId>
                <version>${hbase.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>tomcat</groupId>
                        <artifactId>jasper-runtime</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>tomcat</groupId>
                        <artifactId>jasper-compiler</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jetty</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jetty-util</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jsp-2.1</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jsp-api-2.1</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>servlet-api-2.5</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.jruby</groupId>
                        <artifactId>jruby-complete</artifactId>
                    </exclusion>
                </exclusions>
</dependency>