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

查看:32
本文介绍了为什么我不能使用这个命令从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 可能将 Storm 依赖的范围设置为provided",这意味着它将在运行时类路径中,而不是在 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天全站免登陆