Java 使用intellij创建twitter heron项目的正确方法
我正试图使用IntelliJ IDEA启动一个heron项目(或移植现有的storm项目),但不幸的是,我无法让它工作 我已经在中测试了所有建议的指令,但是在根据文档更改了Java 使用intellij创建twitter heron项目的正确方法,java,maven,intellij-idea,apache-storm,heron,Java,Maven,Intellij Idea,Apache Storm,Heron,我正试图使用IntelliJ IDEA启动一个heron项目(或移植现有的storm项目),但不幸的是,我无法让它工作 我已经在中测试了所有建议的指令,但是在根据文档更改了POM.xml文件后,我从基本heron类和方法中得到了一堆找不到符号,而使用maven编译和添加库jar则没有任何帮助(就像使用storm时一样) 我还尝试使用setup intellij.sh脚本创建intellij项目,但不幸的是,它因错误而停止: null failed: _pex failed: error exec
POM.xml
文件后,我从基本heron类和方法中得到了一堆找不到符号,而使用maven编译和添加库jar则没有任何帮助(就像使用storm时一样)
我还尝试使用setup intellij.sh
脚本创建intellij项目,但不幸的是,它因错误而停止:
null failed: _pex failed: error executing command
bazel-out/local_linux-fastbuild/bin/3rdparty/pex/_pex --entry-point heron.shell.src.python.main bazel-out/local_linux-fastbuild/bin/heron/shell/src/python/heron-shell.pex ...
(remaining 1 argument(s) skipped)
我想知道使用intelliJ IDEA创建工作项目的最简单方法是什么
我必须向intelliJ添加storm库和heron库吗?如何附加所需的库,使其能够正确编译
任何建议都将不胜感激。使用backtype.storm.*
而不是com.twitter.heron.api.*
导入类。
这些包都存在于heron库中。
只需添加以下依赖项:
<dependency>
<groupId>com.twitter.heron</groupId>
<artifactId>heron-storm</artifactId>
<version>0.14.0</version>
</dependency>
com.twitter.heron
苍鹭风暴
0.14.0
使用backtype.storm.*
而不是com.twitter.heron.api.*
导入类。
这些包都存在于heron库中。
只需添加以下依赖项:
<dependency>
<groupId>com.twitter.heron</groupId>
<artifactId>heron-storm</artifactId>
<version>0.14.0</version>
</dependency>
com.twitter.heron
苍鹭风暴
0.14.0
有一个heron项目正在IntellJ中运行。
pom.xml内容是:
<groupId>io.streaml.heron.streamlet</groupId>
<artifactId>heron-java-streamlet-api-example</artifactId>
<version>latest</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<heron.version>0.17.2</heron.version>
</properties>
<dependencies>
<dependency>
<groupId>com.twitter.heron</groupId>
<artifactId>heron-api</artifactId>
<version>${heron.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
io.streaml.heron.streamlet
heron java streamlet api示例
最新的
1.8
1.8
0.17.2
com.twitter.heron
heron api
${heron.version}
maven汇编插件
带有依赖项的jar
组装
包裹
单一的
有一个heron项目正在IntellJ中运行。
pom.xml内容是:
<groupId>io.streaml.heron.streamlet</groupId>
<artifactId>heron-java-streamlet-api-example</artifactId>
<version>latest</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<heron.version>0.17.2</heron.version>
</properties>
<dependencies>
<dependency>
<groupId>com.twitter.heron</groupId>
<artifactId>heron-api</artifactId>
<version>${heron.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
io.streaml.heron.streamlet
heron java streamlet api示例
最新的
1.8
1.8
0.17.2
com.twitter.heron
heron api
${heron.version}
maven汇编插件
带有依赖项的jar
组装
包裹
单一的