Dependency not pulling in transitives


(Ben Manes) #1

I am setting up Apache Kafka and oddly transitive dependencies are not being brought in. The pom.xml looks correct and I verified with Gradle v1.7 and v1.8-rc-2. I wrote a sample project and oddly ‘gradle dependencies’ lists it as a failure, but any other dependency that I add resolves. Below is a sample,

apply plugin: 'java'
  repositories {
  mavenCentral()
}
  dependencies {
  compile 'org.apache.kafka:kafka_2.9.2:0.8.0-beta1'
}
$ ./gradlew dependencies
 :dependencies
  ------------------------------------------------------------
Root project
------------------------------------------------------------
  archives - Configuration for archive artifacts.
No dependencies
  compile - Compile classpath for source set 'main'.
\--- org.apache.kafka:kafka_2.9.2:0.8.0-beta1 FAILED
  default - Configuration for default artifacts.
\--- org.apache.kafka:kafka_2.9.2:0.8.0-beta1 FAILED
  runtime - Runtime classpath for source set 'main'.
\--- org.apache.kafka:kafka_2.9.2:0.8.0-beta1 FAILED
  testCompile - Compile classpath for source set 'test'.
\--- org.apache.kafka:kafka_2.9.2:0.8.0-beta1 FAILED
  testRuntime - Runtime classpath for source set 'test'.
\--- org.apache.kafka:kafka_2.9.2:0.8.0-beta1 FAILED
  BUILD SUCCESSFUL
  Total time: 4.839 secs

(Peter Niederwieser) #2

That POM has two ‘dependencies’ sections, and the first one is completely broken. Looks like a leftover from an ‘ivy.xml’.


(Ben Manes) #3

oh, of course! Thanks =)