Confluent Maven repo via SBT?

1,151 views
Skip to first unread message

Devin Watson

unread,
Feb 8, 2016, 1:37:42 PM2/8/16
to Confluent Platform
Hi,

I'm attempting to add Confluent dependencies to my project using the Maven repo.

Normally I can just take:

<repositories>
  ...
  <repository>
    <id>confluent</id>
    <url>http://packages.confluent.io/maven/</url>
  </repository>
  ...
</repositories>
<dependencies>
  ...
  <dependency>
    <groupId>io.confluent</groupId>
    <artifactId>kafka-avro-serializer</artifactId>
    <version>2.0.0</version>
  </dependency>
  ...
</dependencies>
and add this to my SBT build file:
resolvers ++= Seq (
  Opts.resolver.mavenLocalFile,
  "Confluent" at "http://packages.confluent.io/maven"
)
val kafkaAvroSeralizer  = "io.confluent" % "kafka-avro-serializer" % "2.0.0"
val kafkaDependencies: Seq[ModuleID] = Seq (
  kafkaAvroSeralizer
)
libraryDependencies ++= kafkaDependencies
It fails to resolve any of the dependencies. For example:
http://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/2.0.0/kafka-avro-serializer-2.0.0-sources.jar 
Has anyone used Confluent's repo with SBT? I'd rather not have to host them on my own repo.
Thanks!

Ewen Cheslack-Postava

unread,
Feb 8, 2016, 5:35:57 PM2/8/16
to Confluent Platform
Devin,

I'm not very familiar with sbt, but the code you've shown looks reasonable. The jar that isn't resolving is a source jar -- is it possible to disable it from trying to load those? We don't currently publish source jars in our Maven repository.

-Ewen

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/8237c7f9-97fa-4f5b-942a-5ebb6ccb01fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Ewen

Ismael Juma

unread,
Feb 8, 2016, 7:42:02 PM2/8/16
to confluent...@googlegroups.com
Hi Devin,

It may be helpful to see the actual error messages and to see if any non-source JARs fail as well.

Thanks,
Ismael

Sumit Nekar

unread,
Nov 23, 2017, 6:09:55 AM11/23/17
to Confluent Platform
This should work. I was facing the same issue. 



resolvers ++= Seq(
"confluent" at "https://packages.confluent.io",
Resolver.mavenLocal
)

libraryDependencies ++= Seq(
"io.confluent" % "kafka-avro-serializer" % "3.3.1"
)

'https' is the only change I made.


Reply all
Reply to author
Forward
0 new messages