I followed Storm Starter instructions and imported Twitter Storm in IntelliJ. For sake of testing I edited ExclaimationToplogy a bit and used following Maven command to build and run it:
mvn -f m2-pom.xml compile exec:java -Dstorm.topology=storm.starter.ExclamationTopology
But I am more interested to build and run within IDE rather than from command line. What actions do I need to perform?
Thanks
- Follow the steps in storm-starter's: Using storm-starter with IntelliJ IDEA
- Open Maven's
pom.xml
file and remove<scope>provided</scope>
line from storm dependency. This enables IntelliJ to compile storm dependency on build. - Go to
/src/jvm/storm/starter/
, right click on ExclamationTopology file andRun 'ExclamationTop....main()'
From within IntelliJ, if you get Clojure related compiler errors involving LocalCluster
then .... do a mvn clean install -DskipTests from the command line on the same project first. Then do a 'Rebuild Project' from within IntelliJ. Life is full of mysteries :-).
You need to also ensure that the storm-core is not in provided
scope for storm-starter.
来源:https://stackoverflow.com/questions/21205193/how-to-build-and-run-storm-topology-within-intellij-idea