You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2014/06/12 18:02:04 UTC

[3/8] git commit: update storm-kafka README to reflect scala dependency handling.

update storm-kafka README to reflect scala dependency handling.


Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/8cc69ec3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/8cc69ec3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/8cc69ec3

Branch: refs/heads/security
Commit: 8cc69ec348ea399de9e711fbdc8b9202f422c8c2
Parents: ab99b91
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Wed Jun 11 16:44:15 2014 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Wed Jun 11 16:44:15 2014 -0400

----------------------------------------------------------------------
 external/storm-kafka/README.md | 33 +++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/8cc69ec3/external/storm-kafka/README.md
----------------------------------------------------------------------
diff --git a/external/storm-kafka/README.md b/external/storm-kafka/README.md
index 5714cd5..db0ccce 100644
--- a/external/storm-kafka/README.md
+++ b/external/storm-kafka/README.md
@@ -15,13 +15,34 @@ OpaqueTridentKafkaSpout spout = new OpaqueTridentKafkaSpout(spoutConf);
 ```
 
 
-## Building storm-kafka for Scala 2.10
-
-By default storm-kafka is built against Scala 2.9.2 (see [pom.xml](pom.xml)).  You can build storm-kafka for Scala 2.10
-by activating the `Scala-2.10` maven profile:
-
-    $ mvn install -P Scala-2.10
+## Using storm-kafka with different versions of Scala
+
+Storm-kafka's Kafka dependency is defined as `provided` scope in maven, meaning it will not be pulled in
+as a transitive dependency. This allows you to use a version of Kafka built against a specific Scala version.
+
+When building a project with storm-kafka, you must explicitly add the Kafka dependency. For example, to
+use Kafka 0.8.1.1 built against Scala 2.10, you would use the following dependency in your `pom.xml`:
+
+```xml
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka_2.10</artifactId>
+            <version>0.8.1.1</version>
+            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.zookeeper</groupId>
+                    <artifactId>zookeeper</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+```
 
+Note that the ZooKeeper and log4j dependencies are excluded to prevent version conflicts with Storm's dependencies.
 
 ## Committer Sponsors