From e54cd99625bc15876a794c6f23eb7671ec3b288e Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Wed, 29 Feb 2012 12:25:56 -0800 Subject: [PATCH] update maven instructions --- README.markdown | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 08a235d..6815dc3 100644 --- a/README.markdown +++ b/README.markdown @@ -18,8 +18,16 @@ java -cp `lein classpath` storm.starter.ExclamationTopology ## Maven -Maven is an alternative to Leiningen. storm-starter contains m2-pom.xml which can be used with Maven using the -f option, e.g.: +Maven is an alternative to Leiningen. storm-starter contains m2-pom.xml which can be used with Maven using the -f option. For example, to compile and run `WordCountTopology` in local mode, use this command: + +``` +mvn -f m2-pom.xml compile exec:java -Dexec.classpathScope=compile -Dexec.mainClass=storm.starter.WordCountTopology +``` + +You can package a jar suitable for submitting to a cluster with this command: ``` mvn -f m2-pom.xml package -``` \ No newline at end of file +``` + +This will package your code and all the non-Storm dependencies into a single "uberjar" at the path `target/storm-starter-{version}-jar-with-dependencies.jar`.