kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject svn commit: r1195256 - /incubator/kafka/0.7/project/build/KafkaProject.scala
Date Sun, 30 Oct 2011 21:42:34 GMT
Author: nehanarkhede
Date: Sun Oct 30 21:42:33 2011
New Revision: 1195256

URL: http://svn.apache.org/viewvc?rev=1195256&view=rev
Log:
KAFKA-91 zkclient does not show up in pom; patched by cburroughs; reviewed by nehanarkhede

Modified:
    incubator/kafka/0.7/project/build/KafkaProject.scala

Modified: incubator/kafka/0.7/project/build/KafkaProject.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/0.7/project/build/KafkaProject.scala?rev=1195256&r1=1195255&r2=1195256&view=diff
==============================================================================
--- incubator/kafka/0.7/project/build/KafkaProject.scala (original)
+++ incubator/kafka/0.7/project/build/KafkaProject.scala Sun Oct 30 21:42:33 2011
@@ -16,6 +16,8 @@
  */
 
 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(_))
@@ -58,6 +60,27 @@ class KafkaProject(info: ProjectInfo) ex
       </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 repositories = Set(ScalaToolsSnapshots, "JBoss Maven 2 Repository" at "http://repository.jboss.com/maven2",
       "Oracle Maven 2 Repository" at "http://download.oracle.com/maven", "maven.org" at "http://repo2.maven.org/maven2/")
 



Mime
View raw message