【问题标题】:pull apache beam from github compile error从 github 拉出 apache 梁编译错误
【发布时间】:2017-09-25 01:17:18
【问题描述】:

我是 Apache Beam 的新手,我从 github 下载最新的源代码并在 path 下编译 runner 模块: ../beam/runners 使用命令: mvn package 并打印如下异常: enter image description here

Apache Beam :: Runners :: Core Construction Java ... FAILURE

有人对此有什么想法吗?谢谢!

【问题讨论】:

    标签: maven apache-beam


    【解决方案1】:

    @Balajee Venkatesh 这是我的编译步骤:

    1. cd 光束大师
    2. mvn 编译
    3. 等待编译完成

    我第一次执行 mvn compile 命令并遇到上面显示的异常是在路径 beam-master/runners 下。在我将编译路径更改为 beam-master 之后,一切顺利。

    请问您是否尝试编译整个项目以将其加载到您的 IDE 中? 如果是这样,我建议使用带有“文件”->“从现有源导入”的 IDEA,而不是执行“mvn compile”命令。

    如果你尝试使用 IDEA import beam ,你可以删除/注释 ${project_loc:beam-parent/pom.xml} 中的错误信息,比如:

      <!-- <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.3</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependency-updates-report</report>
              <report>plugin-updates-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>-->
    

    并且,将此 maven 插件版本替换为与您的 mvn -version 相同的版本。

      <!-- Rename the artifact produced by the Apache parent's
             source release. -->
         <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>**3.3.3**</version>  
          <executions>
            <execution>
              <id>source-release-assembly</id>
              <configuration>
                <finalName>apache-beam-${project.version}</finalName>
              </configuration>
            </execution>
          </executions>
        </plugin>
    

    顺便说一下,我的 maven 版本是 3.3.3。您还可以检查 pom.xml 的 maven 版本是否与您的本地 mvn -version 不兼容。

    这是我的 mvn 编译路径:

    enter image description here

    【讨论】:

      【解决方案2】:

      在我将编译路径更改为主路径后,每个模块都编译成功。

      【讨论】:

      • 如何更改编译路径?你能让我准确理解吗?从 GitHub 安装最新的 Apache Beam 项目时,我遇到了类似的问题。 @麒麟
      • 你好,我第一次编译路径是在./runners/下,我把编译路径改成./runners父路径后每个模块都编译成功了。
      • 你是如何改变编译路径的?如果您分享任何支持性的步骤或快照,我会感到荣幸。
      • 你说的是${project_loc:beam-parent/runners}吗?我在设置运行配置时使用与基本目录相同的目录。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-12
      • 2014-07-23
      • 1970-01-01
      • 2012-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多