maven - Executing storm program but cannot find a class -
i cloned project https://github.com/storm-book/examples-ch02-getting_started, when execute command
mvn exec:java -dexec.mainclass="topologymain" -dexec.args="src/main/resources/words.txt"
i got following error message.
[info] scanning projects... [info] [info] using builder org.apache.maven.lifecycle.internal.builder.singlethreaded.singlethreadedbuilder thread count of 1 [info] [info] ------------------------------------------------------------------------ [info] building getting-started 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info] [info] --- exec-maven-plugin:1.3:java (default-cli) @ getting-started --- [warning] warning: killafter deprecated. need ? please comment on mexec-6. [warning] java.lang.classnotfoundexception: topologymain @ java.net.urlclassloader$1.run(urlclassloader.java:217) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:205) @ java.lang.classloader.loadclass(classloader.java:323) @ java.lang.classloader.loadclass(classloader.java:268) @ org.codehaus.mojo.exec.execjavamojo$1.run(execjavamojo.java:281) @ java.lang.thread.run(thread.java:701) [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 1.771 s [info] finished at: 2014-06-01t11:29:45-06:00 [info] final memory: 11m/160m [info] ------------------------------------------------------------------------ [error] failed execute goal org.codehaus.mojo:exec-maven-plugin:1.3:java (default-cli) on project getting-started: exception occured while executing java class. topologymain -> [help 1] [error] [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error] [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception
you should run mvn compile
, produce topologymain.class
, before can execute mvn exec:java ...
.
this can specified in single mvn command chaining targets
mvn compile exec:java -dexec.mainclass="topologymain" -dexec.args="src/main/resources/words.txt"
Comments
Post a Comment