Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> use kafka as dependency in sbt from central maven repository


Copy link to this message
-
Re: use kafka as dependency in sbt from central maven repository
My way is build kafka and install pom in local.
Then set: "Local Maven Repository" at
"file:///Users/jameswu/.m2/repository" in resolvers.

On Wed, Aug 21, 2013 at 5:21 AM, Lorenz Knies <[EMAIL PROTECTED]> wrote:

> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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"
Friendly regards,

*James Wu <http://www.facebook.com/jameswu629>
*+886.922.199.680