为什么不能使用此命令从storm-starter运行示例? [英] Why can't I run the example from storm-starter using this command?

查看:110
本文介绍了为什么不能使用此命令从storm-starter运行示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前没有使用Storm或Maven的经验,并且正在从事我的入门项目.当我使用此处给出的命令编译git网站上载的入门项目时,即:

I've have had no experience using Storm or Maven before, and I'm working on my starter project. When I compile the starter project uploaded on the git website using the command given there i.e. this:

mvn compile exec:java -Dexec.classpathScope=compile -Dexec.mainClass=storm.starter.ExclamationTopology

我可以运行Exclamation拓扑类,但是当我使用此命令时:

I can run the Exclamation topology class, but when I use this command:

java -cp ./target/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar storm.starter.ExclamationTopology

我无法运行.

顺便说一句,我从apache网站上的maven教程中获得了第二条命令 有人可以指出我在做什么错吗?

By the way, I got the second command from the maven tutorial on apache's site Could someone point out what am I doing wrong here?

PS:这是错误 http://pastebin.com/A1PQbB3r

推荐答案

您的pom可能将风暴依赖项的范围设置为提供",这意味着它将位于运行时类路径中,而不位于jar-with-中依赖关系.尝试将范围更改为编译"

Your pom probably has the scope for the storm dependency as "provided" which means that it will be in the runtime classpath, but not in the jar-with-dependencies. Try changing the scope to "compile"

这篇关于为什么不能使用此命令从storm-starter运行示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆