Could not resolve org.apache.hbase:hbase-client:0.95.1-hadoop1

build.gradle gradleVersion = “1.7-rc-2” compile(“org.apache.hbase:hbase-client:0.95.1-hadoop1”)

Error

FAILURE: Build failed with an exception.

  • What went wrong:

Could not resolve all dependencies for configuration ‘:compile’.

Could not resolve org.apache.hbase:hbase-client:0.95.1-hadoop1.

Required by:

:WAP:1.0

java.text.ParseException: [[Fatal Error] ivy.xml:105:47: 元素类型 “m:dependency.management__org.apache.hbase__” 必须后跟属性规范 “>” 或 “/>”。 in file:/F:/.gradle/caches/artifacts-26/module-metadata/org.apache.hbase/hbase-client/0.95.1-hadoop1/e9d03b7c6586155fbee8fb2de8b5b149/ivy.xml

]

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Are you using an Ivy repository? Seems like something might be wrong with the ‘ivy.xml’ for ‘hbase-client’.

repository:

repositories {

mavenCentral()

}

The problem is that the hbase parent POM (http://search.maven.org/remotecontent?filepath=org/apache/hbase/hbase/0.95.1-hadoop1/hbase-0.95.1-hadoop1.pom) uses properties declared in a profile. Gradle doesn’t support profiles in published POMs. Maven itself heavily discourages it.

For now, the only solution I’m aware of is to fix the POM in your binary repository (Artifactory, Nexus). I’ve raised GRADLE-2861 for this because I think that Gradle should at least allow to fetch the artifact ignoring the POM (e.g. with ‘@jar’), which currently causes the same error.