Kafka #18070

wants to merge 1 commit into


None yet

5 participants


Took heed of comments on #7878. I'm only just starting to play around with Kafka, however, so very much open to further suggestions.

@jacknagel jacknagel commented on the diff Mar 10, 2013
@@ -0,0 +1,60 @@
+require 'formula'
+class Kafka < Formula
+ homepage 'http://kafka.apache.org/'
+ url 'http://mirror.nexcess.net/apache/incubator/kafka/kafka-0.7.2-incubating/kafka-0.7.2-incubating-src.tgz'
+ sha1 '9a0569bfaad280d2814c0437809a30ab002598ab'
+ def install
+ system "sh sbt update"
+ system "sh sbt package"
jacknagel Mar 10, 2013

Does this need a dependency on sbt?

oggy Mar 10, 2013

No, this runs a packaged executable.

==> sh sbt update
sh sbt update
Getting Scala 2.7.7 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar ...



@adamv Agreed with this sentiment.

Not sure if there's a reliable way to build it using an installed scala - that would be ideal. Didn't see anything documented along these lines, and I don't know scala/sbt well enough yet to discover a solution on my own.


It gets worse lower down – it install a second Scala compiler.

Getting Scala 2.7.7 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.7.7/scala-compiler-2.7.7.jar ...
        [SUCCESSFUL ] org.scala-lang#scala-compiler;2.7.7!scala-compiler.jar (37168ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar ...
    [SUCCESSFUL ] org.scala-lang#scala-library;2.7.7!scala-library.jar (10714ms)


Getting Scala 2.8.0 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.8.0/scala-compiler-2.8.0.jar ...
    [SUCCESSFUL ] org.scala-lang#scala-compiler;2.8.0!scala-compiler.jar (23065ms)
downloading file:/Users/marc/.m2/repository/org/scala-lang/scala-library/2.8.0/scala-library-2.8.0.jar ...
    [SUCCESSFUL ] org.scala-lang#scala-library;2.8.0!scala-library.jar (234ms)


Any news on 0.8?


Passing on this as it "installs a bunch of stuff"; would review an update for version 0.8 if it plays nicer with packaging systems.

@adamv adamv closed this Jun 3, 2013

The way sbt works is to look for dependencies in a project and download them to the sbt cache, usually $HOME/.sbt. If you have built/run other sbt projects that uses the same dependencies, then sbt will not "install a bunch of stuff".

Note that even if you already have, say, Scala 2.8.0 installed, if the scala 2.8.0 compiler and library do not exist in the SBT cache, it will be downloaded. Resolving dependencies in SBT is different from installing Scala or other libraries using a package manager.

Pull Request #25109 is the formula for kafka 0.8.0 and sbt will build for scala 2.8.0 by default, and can build for these Scala versions: "2.8.0","2.8.2", "2.9.1", "2.9.2", "2.10.1")

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.