kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenz Knies ...@l1024.org>
Subject Re: use kafka as dependency in sbt from central maven repository
Date Tue, 20 Aug 2013 21:21:22 GMT
hi joe,

thanks for the hint with the apache repo.
the from directive did not work for me. while it stopped sbt from complaining during the update,
it did not include the jar in the classpath either.
this may be correct behaviour since the sbt documentation states that you may specify a direct
URL to the *jar file* via the from directive.

but adding the apache repo as a resolver was the solution that fixed my setup:

name := "kafka-dependency-test"

scalaVersion := "2.9.2"

resolvers += "Apache repo" at "https://repository.apache.org/content/repositories/releases"

libraryDependencies += "org.apache.kafka" % "kafka_2.9.2" % "0.8.0-beta1" exclude("com.sun.jmx","jmxri")
exclude("com.sun.jdmk","jmxtools")


thanks,

lorenz

On Aug 20, 2013, at 4:03 PM, Joe Stein <cryptcom@gmail.com> wrote:

> Lorenz,
> 
> The Maven central repo got bonked (
> https://issues.apache.org/jira/browse/KAFKA-974 ) and it looks like it is
> affecting you too
> 
> Try this
> 
> "org.apache.kafka" % "kafka_2.8.2" % "0.8.0-beta1" intransitive() from "
> https://repository.apache.org/content/repositories/releases"
> 
> I just tried it and it works for me and others have used the main apache
> repo to work around this same problem
> 
> this will get fixed in Maven central for beta2 or if we go straight to GA
> 
> thanks, let me know
> 
> 
> /*******************************************
> Joe Stein
> Founder, Principal Consultant
> Big Data Open Source Security LLC
> http://www.stealth.ly
> Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
> ********************************************/
> 
> 
> On Tue, Aug 20, 2013 at 9:46 AM, Lorenz Knies <me@l1024.org> wrote:
> 
>> thanks for the reply, but that unfortunately does not help.
>> 
>> to make my problem easily reproducible:
>> 
>> creating an empty directory, put just a build.sbt file with the following
>> content into it:
>> 
>> name := "kafka-dependency-test"
>> 
>> scalaVersion := "2.8.2"
>> 
>> libraryDependencies += "org.apache.kafka" % "kafka_2.8.2" % "0.8.0-beta1"
>> intransitive()
>> 
>> and run
>> 
>> sbt update
>> 
>> gives me the following error:
>> 
>> sbt.ResolveException: unresolved dependency:
>> org.apache.kafka#kafka_2.8.2;0.8.0-beta1: null name not allowed
>> 
>> 
>> sbt sbt-version gives me the following:
>> 
>> [info] Loading global plugins from /Users/lorenz/.sbt/plugins
>> [info] Set current project to kafka-dependency-test (in build
>> file:/Users/lorenz/software/kafka_dependency_test/)
>> [info] 0.12.4
>> 
>> 
>> 
>> nobody else having these problems?
>> regards
>> 
>> lorenz
>> 
>> 
>> 
>> 
>> On Aug 20, 2013, at 3:15 PM, Joe Stein <cryptcom@gmail.com> wrote:
>> 
>>> you need to put intransitive() at the end so it ignores dependencies that
>>> are defined to be ignored in maven
>>> 
>>> so your line would be
>>> 
>>> libraryDependencies += "org.apache.kafka" % "kafka_2.9.2" % "0.8.0-beta1"
>>> intransitive()
>>> 
>>> /*******************************************
>>> Joe Stein
>>> Founder, Principal Consultant
>>> Big Data Open Source Security LLC
>>> http://www.stealth.ly
>>> Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
>>> ********************************************/
>>> 
>>> 
>>> On Tue, Aug 20, 2013 at 2:48 AM, Lorenz Knies <me@l1024.org> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> i am having problems using kafka as a dependency in sbt.
>>>> 
>>>> with this simple build.sbt:
>>>> 
>>>> name := "kafka-dependency-test"
>>>> 
>>>> scalaVersion := "2.9.2"
>>>> 
>>>> libraryDependencies += "org.apache.kafka" % "kafka_2.9.2" %
>> "0.8.0-beta1"
>>>> 
>>>> 
>>>> when i do
>>>> 
>>>> sbt update
>>>> 
>>>> i get the following error:
>>>> 
>>>> sbt.ResolveException: unresolved dependency:
>>>> org.apache.kafka#kafka_2.9.2;0.8.0-beta1: null name not allowed
>>>> 
>>>> i am using sbt 0.12.4 but also tried other versions with no luck
>>>> 
>>>> looks like the ivy implementation ignores the org and name attributes
>> for
>>>> the zookeeper dependency in the custom inline xml included in kafkas
>>>> Build.scala
>>>> 
>>>> anybody else having these problems and maybe some advice for a
>>>> solution/workaround?
>>>> 
>>>> 
>>>> regards
>>>> 
>>>> lorenz
>>>> 
>>>> 
>> 
>> 


Mime
View raw message