Skip to content
Nathan Marz edited this page Sep 28, 2011 · 13 revisions

To develop topologies, you'll need the Storm jars on your classpath. You should either include the unpacked jars in the classpath for your project or use Maven to include Storm as a development dependency. Storm is hosted on Clojars (a Maven repository). To include Storm in your project as a development dependency, add the following to your pom.xml:

<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>
<dependency>
  <groupId>storm</groupId>
  <artifactId>storm</artifactId>
  <version>0.5.3</version>
  <scope>test</scope>
</dependency>

If Maven isn't your thing, check out leiningen. Leiningen is a build tool for Clojure, but it can be used for pure Java projects as well. Leiningen makes builds and dependency management using Maven dead-simple. Here's an example project.clj for a pure-Java Storm project:

(defproject storm-starter "0.0.1-SNAPSHOT"
  :java-source-path "src/jvm"
  :javac-options {:debug "true" :fork "true"}
  :jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]
  :dependencies []
  :dev-dependencies [
                     [storm "0.5.3"]
                     ])

You can fetch dependencies using lein deps, build the project with lein compile, and make a jar suitable for submitting to a cluster with lein uberjar.