Index: sbt
===================================================================
--- sbt	(revision 1209300)
+++ sbt	(working copy)
@@ -1 +1,2 @@
 java -Xmx1024M -XX:MaxPermSize=512m -jar `dirname $0`/lib/sbt-launch.jar "$@"
+
Index: project/build/KafkaProject.scala
===================================================================
--- project/build/KafkaProject.scala	(revision 1209300)
+++ project/build/KafkaProject.scala	(working copy)
@@ -1,254 +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._
-import scala.xml.{Node, Elem, NodeSeq}
-import scala.xml.transform.{RewriteRule, RuleTransformer}
-
-class KafkaProject(info: ProjectInfo) extends ParentProject(info) with IdeaProject {
-  lazy val core = project("core", "core-kafka", new CoreKafkaProject(_))
-  lazy val examples = project("examples", "java-examples", new KafkaExamplesProject(_), core)
-  lazy val contrib = project("contrib", "contrib", new ContribProject(_))
-  lazy val perf = project("perf", "perf", new KafkaPerfProject(_))
-
-  lazy val releaseZipTask = core.packageDistTask
-
-  val releaseZipDescription = "Compiles every sub project, runs unit tests, creates a deployable release zip file with dependencies, config, and scripts."
-  lazy val releaseZip = releaseZipTask dependsOn(core.corePackageAction, core.test, examples.examplesPackageAction,
-    contrib.producerPackageAction, contrib.consumerPackageAction) describedAs releaseZipDescription
-
-  // Not sure why rat does not get pulled from a Maven repo automatically.
-  val rat = "org.apache.rat" % "apache-rat-project" % "0.7"
-
-  val runRatDescription = "Runs Apache rat on Kafka"
-  lazy val runRatTask = task {
-    val rat = "org.apache.rat" % "apache-rat-project" % "0.7"
-    Runtime.getRuntime().exec("bin/run-rat.sh")
-    None
-  } describedAs runRatDescription
-
-
-  class CoreKafkaProject(info: ProjectInfo) extends DefaultProject(info)
-     with IdeaProject with CoreDependencies with TestDependencies with CompressionDependencies {
-   val corePackageAction = packageAllAction
-
-  //The issue is going from log4j 1.2.14 to 1.2.15, the developers added some features which required
-  // some dependencies on various sun and javax packages.
-   override def ivyXML =
-    <dependencies>
-      <exclude module="javax"/>
-      <exclude module="jmxri"/>
-      <exclude module="jmxtools"/>
-      <exclude module="mail"/>
-      <exclude module="jms"/>
-      <dependency org="org.apache.zookeeper" name="zookeeper" rev="3.3.3">
-        <exclude module="log4j"/>
-        <exclude module="jline"/>
-      </dependency>
-    </dependencies>
-
-    def zkClientDep =
-      <dependency>
-       <groupId>zkclient</groupId>
-       <artifactId>zkclient</artifactId>
-       <version>20110412</version>
-       <scope>compile</scope>
-       </dependency>
-
-  object ZkClientDepAdder extends RuleTransformer(new RewriteRule() {
-      override def transform(node: Node): Seq[Node] = node match {
-        case Elem(prefix, "dependencies", attribs, scope, deps @ _*) => {
-          Elem(prefix, "dependencies", attribs, scope, deps ++ zkClientDep :_*)
-        }
-        case other => other
-      }
-    })
-
-    override def pomPostProcess(pom: Node): Node = {
-      ZkClientDepAdder(pom)
-    }
-
-    override def artifactID = "kafka"
-    override def filterScalaJars = false
-
-    // build the executable jar's classpath.
-    // (why is it necessary to explicitly remove the target/{classes,resources} paths? hm.)
-    def dependentJars = {
-      val jars =
-      publicClasspath +++ mainDependencies.scalaJars --- mainCompilePath --- mainResourcesOutputPath
-      if (jars.get.find { jar => jar.name.startsWith("scala-library-") }.isDefined) {
-        // workaround bug in sbt: if the compiler is explicitly included, don't include 2 versions
-        // of the library.
-        jars --- jars.filter { jar =>
-          jar.absolutePath.contains("/boot/") && jar.name == "scala-library.jar"
-        }
-      } else {
-        jars
-      }
-    }
-
-    def dependentJarNames = dependentJars.getFiles.map(_.getName).filter(_.endsWith(".jar"))
-    override def manifestClassPath = Some(dependentJarNames.map { "libs/" + _ }.mkString(" "))
-
-    def distName = (artifactID + "-" + projectVersion.value)
-    def distPath = "dist" / distName ##
-
-    def configPath = "config" ##
-    def configOutputPath = distPath / "config"
-
-    def binPath = "bin" ##
-    def binOutputPath = distPath / "bin"
-
-    def distZipName = {
-      "%s-%s.zip".format(artifactID, projectVersion.value)
-    }
-
-    lazy val packageDistTask = task {
-      distPath.asFile.mkdirs()
-      (distPath / "libs").asFile.mkdirs()
-      binOutputPath.asFile.mkdirs()
-      configOutputPath.asFile.mkdirs()
-
-      FileUtilities.copyFlat(List(jarPath), distPath, log).left.toOption orElse
-              FileUtilities.copyFlat(dependentJars.get, distPath / "libs", log).left.toOption orElse
-              FileUtilities.copy((configPath ***).get, configOutputPath, log).left.toOption orElse
-              FileUtilities.copy((binPath ***).get, binOutputPath, log).left.toOption orElse
-              FileUtilities.zip((("dist" / distName) ##).get, "dist" / distZipName, true, log)
-      None
-    }
-
-    val PackageDistDescription = "Creates a deployable zip file with dependencies, config, and scripts."
-    lazy val packageDist = packageDistTask dependsOn(`package`, `test`) describedAs PackageDistDescription
-
-    val cleanDist = cleanTask("dist" ##) describedAs("Erase any packaged distributions.")
-    override def cleanAction = super.cleanAction dependsOn(cleanDist)
-
-    override def javaCompileOptions = super.javaCompileOptions ++
-      List(JavaCompileOption("-source"), JavaCompileOption("1.5"))
-
-    override def packageAction = super.packageAction dependsOn (testCompileAction)
-
-  }
-
-  class KafkaPerfProject(info: ProjectInfo) extends DefaultProject(info)
-     with IdeaProject
-     with CoreDependencies {
-    val perfPackageAction = packageAllAction
-    val dependsOnCore = core
-
-  //The issue is going from log4j 1.2.14 to 1.2.15, the developers added some features which required
-  // some dependencies on various sun and javax packages.
-   override def ivyXML =
-    <dependencies>
-      <exclude module="javax"/>
-      <exclude module="jmxri"/>
-      <exclude module="jmxtools"/>
-      <exclude module="mail"/>
-      <exclude module="jms"/>
-    </dependencies>
-
-    override def artifactID = "kafka-perf"
-    override def filterScalaJars = false
-    override def javaCompileOptions = super.javaCompileOptions ++
-      List(JavaCompileOption("-Xlint:unchecked"))
-  }
-
-  class KafkaExamplesProject(info: ProjectInfo) extends DefaultProject(info)
-     with IdeaProject
-     with CoreDependencies {
-    val examplesPackageAction = packageAllAction
-    val dependsOnCore = core
-  //The issue is going from log4j 1.2.14 to 1.2.15, the developers added some features which required
-  // some dependencies on various sun and javax packages.
-   override def ivyXML =
-    <dependencies>
-      <exclude module="javax"/>
-      <exclude module="jmxri"/>
-      <exclude module="jmxtools"/>
-      <exclude module="mail"/>
-      <exclude module="jms"/>
-    </dependencies>
-
-    override def artifactID = "kafka-java-examples"
-    override def filterScalaJars = false
-    override def javaCompileOptions = super.javaCompileOptions ++
-      List(JavaCompileOption("-Xlint:unchecked"))
-  }
-
-  class ContribProject(info: ProjectInfo) extends ParentProject(info) with IdeaProject {
-    lazy val hadoopProducer = project("hadoop-producer", "hadoop producer",
-                                      new HadoopProducerProject(_), core)
-    lazy val hadoopConsumer = project("hadoop-consumer", "hadoop consumer",
-                                      new HadoopConsumerProject(_), core)
-
-    val producerPackageAction = hadoopProducer.producerPackageAction
-    val consumerPackageAction = hadoopConsumer.consumerPackageAction
-
-    class HadoopProducerProject(info: ProjectInfo) extends DefaultProject(info)
-      with IdeaProject
-      with CoreDependencies {
-      val producerPackageAction = packageAllAction
-      override def ivyXML =
-       <dependencies>
-         <exclude module="netty"/>
-           <exclude module="javax"/>
-           <exclude module="jmxri"/>
-           <exclude module="jmxtools"/>
-           <exclude module="mail"/>
-           <exclude module="jms"/>
-       </dependencies>
-
-      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"
-    }
-
-    class HadoopConsumerProject(info: ProjectInfo) extends DefaultProject(info)
-      with IdeaProject
-      with CoreDependencies {
-      val consumerPackageAction = packageAllAction
-      override def ivyXML =
-       <dependencies>
-         <exclude module="netty"/>
-           <exclude module="javax"/>
-           <exclude module="jmxri"/>
-           <exclude module="jmxtools"/>
-           <exclude module="mail"/>
-           <exclude module="jms"/>
-       </dependencies>
-
-      val jodaTime = "joda-time" % "joda-time" % "1.6"
-      val httpclient = "commons-httpclient" % "commons-httpclient" % "3.1"
-    }
-  }
-
-  trait TestDependencies {
-    val easymock = "org.easymock" % "easymock" % "3.0" % "test"
-    val junit = "junit" % "junit" % "4.1" % "test"
-    val scalaTest = "org.scalatest" % "scalatest" % "1.2" % "test"
-  }
-
-  trait CoreDependencies {
-    val log4j = "log4j" % "log4j" % "1.2.15"
-    val jopt = "net.sf.jopt-simple" % "jopt-simple" % "3.2"
-  }
-  
-  trait CompressionDependencies {
-    val snappy = "org.xerial.snappy" % "snappy-java" % "1.0.4.1"	
-  }
-
-}
Index: project/plugins/Plugins.scala
===================================================================
--- project/plugins/Plugins.scala	(revision 1209300)
+++ 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,147 @@
+import sbt._
+import Keys._
+import xml.NodeSeq
+
+object BuildSettings {
+  val exclusions = Seq("javax", "jmxri", "jmxtools", "mail", "jms")
+  val ivyExclude = <dependencies>{exclusions.map ( e => <exclude module={e}/>)}</dependencies>
+
+  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>
+        {name}
+      </name>,
+      <description>
+        {desc}
+      </description>,
+      <url>http://incubator.apache.org/kafka</url>,
+      <licenses>
+        <license>
+          <name>Apache</name>
+          <url>http://svn.apache.org/repos/asf/incubator/kafka/trunk/LICENSE</url>
+          <distribution>repo</distribution>
+        </license>
+      </licenses>,
+      <scm>
+        <url>http://svn.apache.org/repos/asf/incubator/kafka/trunk/</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/kafka/trunk</connection>
+        <developerConnection>scm:svn:https://foo.googlecode.com/svn/trunk/</developerConnection>
+        <connection>scm:git:git://github.com/linkedin-sna/norbert.git</connection>
+      </scm>,
+      <developers>
+        <developer>
+          <id>jkreps</id>
+          <name>Jay Kreps</name>
+          <url>http://www.linkedin.com/in/jaykreps</url>
+        </developer>
+        <developer>
+          <id>junrao</id>
+          <name>Jun Rao</name>
+          <url>http://www.linkedin.com/in/junrao</url>
+        </developer>
+        <developer>
+          <id>nehanarkhede</id>
+          <name>Joshua Hartman</name>
+          <url>http://www.linkedin.com/in/nehanarkhede</url>
+        </developer>
+      </developers>
+    )
+  }
+}
+
+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 log4j = ("log4j" % "log4j" % "1.2.15")
+  val jopt = "net.sf.jopt-simple" % "jopt-simple" % "3.2"
+  val deps = Seq(log4j, jopt)
+}
+
+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 KafkaBuild extends Build {
+  import BuildSettings._
+
+  lazy val core = Project("core", file("core"),
+    settings = buildSettings ++ Seq(
+      libraryDependencies ++= CoreDependencies.deps ++ TestDependencies.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 ++ 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 }
+    )
+  )
+}
Index: project/build.properties
===================================================================
--- project/build.properties	(revision 1209300)
+++ 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.10.0
 project.version=0.7.0
 build.scala.versions=2.8.0
 contrib.root.dir=contrib
Index: lib/sbt-launch.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
