Search code examples
gradlehbase

HBase 2.1.0 - CDH6.3.3 - Gradle Import fails


I tried import hbase 2.1.0 of cloudera 6.3.3 at my gradle file like this:

compile ("org.apache.hbase:hbase-client:2.1.0-cdh6.3.3"){
        exclude group: 'org.slf4j'
        exclude group: 'org.jruby'
        exclude group: 'jruby-complete'
        exclude group: 'org.codehaus.jackson'
        exclude group: 'org.codehaus.jettison'
    }

When I refresh the gradle , it shows below error:

Could not resolve org.apache.hbase:hbase-client:2.1.0-cdh6.3.3.

I tried refreshing gradle dependencies , but no luck

Any help appreciated! Thanks in Advance!


Solution

  • When you are in doubt about dependencies like this, use a repository aggregator like mvnrepository and search for the module. You can find version 2.1.0-cdh6.3.3 of HBase Client here:

    enter image description here

    As you can see from the description, the artifact is located in the Cloudera Maven repository, so you will need to configure that in Gradle:

    repositories {
        maven {
            url "https://repository.cloudera.com/artifactory/cloudera-repos/"
        }
    }
    

    Also, don't use the compile configuration as it is deprecated. Use implementation or similar instead.