user2895478
user2895478

Reputation: 383

Use Maven to build storm-starter

I followed the steps in the storm-starter and tried to build a project from storm-starter with command "mvn compile exec:java -Dstorm.topology=storm.starter.WordCountTopology". But the following error was given. Can any body tell me why it happened and what I will need to do to fix this?

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.017 s
[INFO] Finished at: 2014-05-26T11:23:54-06:00
[INFO] Final Memory: 20M/159M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3:java (default-cli) on project storm: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.3:java are missing or invalid -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException

Upvotes: 0

Views: 1543

Answers (3)

Ostap Maliuvanchuk
Ostap Maliuvanchuk

Reputation: 1175

You need to run it like this:

mvn exec:java -Dexec.mainClass="com.example.Main" [-Dexec.args="argument1"] ...

Read more in the usage page

Upvotes: 1

Tyoras
Tyoras

Reputation: 26

I had the same problem, it is simple to solve it: You must go to the storm-starter directory before executing the mvn command as given in the storm starter tutorial.

cd examples/storm-starter/
mvn compile exec:java -Dstorm.topology=storm.starter.WordCountTopology

Upvotes: 1

lrossy
lrossy

Reputation: 533

I had the same problem. After some trial and error, this worked:

mvn -X compile exec:java -Dstorm.topology=storm.starter.WordCountTopology -Dexec.mainClass="WordCountTopology"

Upvotes: 1

Related Questions