Index: lib/sbt-launch.jar =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: project/plugins/Plugins.scala =================================================================== --- project/plugins/Plugins.scala (revision 1338516) +++ project/plugins/Plugins.scala (working copy) @@ -1,23 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import sbt._ - -class Plugins(info: ProjectInfo) extends PluginDefinition(info) { - val repo = "GH-pages repo" at "http://mpeltonen.github.com/maven/" - val idea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.1-SNAPSHOT" -} Index: project/Build.scala =================================================================== --- project/Build.scala (revision 0) +++ project/Build.scala (revision 0) @@ -0,0 +1,153 @@ +import sbt._ +import Keys._ +import xml.NodeSeq + +object BuildSettings { + val exclusions = Seq("javax", "jmxri", "jmxtools", "mail", "jms") + val ivyExclude = {exclusions.map ( e => )} + + val buildSettings = Defaults.defaultSettings ++ Seq ( + organization := "kafka", + version := "0.7", + crossScalaVersions := Seq("2.8.1", "2.9.1"), + ivyXML := ivyExclude + ) + + def buildPomExtra(pom: NodeSeq, name: String, desc: String) = { + pom ++ Seq( + + {name} + , + + {desc} + , + http://incubator.apache.org/kafka, + + + Apache + http://svn.apache.org/repos/asf/incubator/kafka/trunk/LICENSE + repo + + , + + http://svn.apache.org/repos/asf/incubator/kafka/trunk/ + scm:svn:http://svn.apache.org/repos/asf/incubator/kafka/trunk + scm:svn:https://foo.googlecode.com/svn/trunk/ + scm:git:git://github.com/linkedin-sna/norbert.git + , + + + jkreps + Jay Kreps + http://www.linkedin.com/in/jaykreps + + + junrao + Jun Rao + http://www.linkedin.com/in/junrao + + + nehanarkhede + Joshua Hartman + http://www.linkedin.com/in/nehanarkhede + + + ) + } +} + +object Resolvers { + val oracleRepo = "Oracle Maven 2 Repository" at "http://download.oracle.com/maven" + val jBossRepo = "JBoss Maven 2 Repository" at "http://repository.jboss.com/maven2" + val kafkaResolvers = Seq(oracleRepo, jBossRepo) +} + +object CoreDependencies { +// TODO jhartman: When sbt 0.11.1 is ready, we can use the following code instead of ivy xml +// val exclusions = Seq("javax", "jmxri", "jmxtools", "mail", "jms") map (n => ExclusionRule(name = n)) +// val log4j = ("log4j" % "log4j" % "1.2.15") excludeAll (exclusions :_*) + val zkClient = ("com.github.sgroschupf" % "zkclient" % "0.1") + val log4j = ("log4j" % "log4j" % "1.2.15") + val jopt = "net.sf.jopt-simple" % "jopt-simple" % "3.2" + val deps = Seq(log4j, jopt, zkClient) +} + +object HadoopProducerDependencies { + val avro = "org.apache.avro" % "avro" % "1.4.1" + val jacksonCore = "org.codehaus.jackson" % "jackson-core-asl" % "1.5.5" + val jacksonMapper = "org.codehaus.jackson" % "jackson-mapper-asl" % "1.5.5" + val deps = Seq(avro, jacksonCore, jacksonMapper) +} + +object HadoopConsumerDependencies { + val jodaTime = "joda-time" % "joda-time" % "1.6" + val httpclient = "commons-httpclient" % "commons-httpclient" % "3.1" + val deps = Seq(jodaTime, httpclient) +} + +object TestDependencies { + val easymock = "org.easymock" % "easymock" % "3.0" % "test" + val junit = "junit" % "junit" % "4.1" % "test" + val scalaTest = "org.scalatest" % "scalatest" % "1.2" % "test" + val deps = Seq(easymock, junit, scalaTest) +} + +object CompressionDependencies { + val snappy = ("org.xerial.snappy" % "snappy-java" % "1.0.4.1" ) + val deps = Seq(snappy) +} + + +object KafkaBuild extends Build { + import BuildSettings._ + + lazy val core = Project("core", file("core"), + settings = buildSettings ++ Seq( + libraryDependencies ++= CoreDependencies.deps ++ TestDependencies.deps ++ CompressionDependencies.deps, + resolvers := Resolvers.kafkaResolvers + ) + ) + + lazy val examples = Project("examples", file("examples"), + settings = buildSettings + ) dependsOn (core) + + + lazy val perf = Project("perf", file("perf"), + settings = buildSettings + ) dependsOn (core) + + lazy val hadoopProducer = Project("hadoop-producer", file("hadoop-producer"), + settings = buildSettings ++ Seq( + libraryDependencies ++= HadoopProducerDependencies.deps + ) + ) dependsOn (core) + + lazy val hadoopConsumer = Project("hadoop-consumer", file("hadoop-consumer"), + settings = buildSettings ++ Seq( + libraryDependencies ++= HadoopConsumerDependencies.deps + ) + ) dependsOn (core) + + lazy val contrib = Project("contrib", file("contrib"), settings = buildSettings) aggregate(hadoopConsumer, hadoopProducer) + + lazy val root = Project("root", file("."), + settings = buildSettings ++ Seq( + pomExtra <<= (pomExtra, name, description) { buildPomExtra } + )) aggregate(core, examples, perf, contrib) + + lazy val full = Project( + id = "kafka", + base = file("full"), + settings = buildSettings ++ Seq( + description := "Includes all of kafka project in one", + libraryDependencies ++= CoreDependencies.deps ++ TestDependencies.deps ++ CompressionDependencies.deps ++ HadoopProducerDependencies.deps ++ HadoopConsumerDependencies.deps, + + (unmanagedJars in Compile) <<= (projects.map(unmanagedJars in Compile in _).join).map(_.flatten), + (unmanagedSourceDirectories in Compile) <<= projects.map(unmanagedSourceDirectories in Compile in _).join.apply(_.flatten), + (managedSourceDirectories in Compile) <<= projects.map(managedSourceDirectories in Compile in _).join.apply(_.flatten), + + pomExtra <<= (pomExtra, name, description) { buildPomExtra } + ) + ) +} \ No newline at end of file Index: project/build.properties =================================================================== --- project/build.properties (revision 1338516) +++ project/build.properties (working copy) @@ -15,7 +15,7 @@ #Project properties #Mon Feb 28 11:55:49 PST 2011 project.name=Kafka -sbt.version=0.7.5 +sbt.version=0.11.3 project.version=0.7.0 build.scala.versions=2.8.0 contrib.root.dir=contrib