0

我正在尝试使用 IntelliJ IDEA 启动一个苍鹭项目(或移植现有的风暴项目),但不幸的是我无法让它工作。

我已经测试了Heron Docs中所有建议的指令以从风暴升级,但是在POM.xml根据文档更改文件后,我cannot find symbol从基本的苍鹭类和方法中得到了一堆,同时使用 maven 编译并添加库 Jars 无济于事(就像以前一样风暴)。

我还尝试使用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 添加风暴库和苍鹭库?如何附加所需的库以便正确编译?

任何建议将不胜感激。

4

2 回答 2

1

使用backtype.storm.*而不是com.twitter.heron.api.*导入类。这些包都存在于苍鹭库中。只需添加以下依赖项:

    <dependency>
        <groupId>com.twitter.heron</groupId>
        <artifactId>heron-storm</artifactId>
        <version>0.14.0</version>
    </dependency>
于 2016-06-30T05:10:04.940 回答
1

在 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>
于 2018-02-19T03:09:25.987 回答