在Maven运行时应用补丁

时间:2018-02-06 21:00:44

标签: maven patch giraph

我正在尝试安装Giraph 1.1但遇到了一个问题。根据{{​​3}},我应该在我的安装中应用this thread。不幸的是,我的问题源于此。我下载并将其中链接的.patch文件复制到源文件夹,并将以下内容添加到pom.xml

<plugins>

   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-patch-plugin</artifactId>
    <version>1.2</version>
    <configuration>
      <patches>
        <patch>GIRAPH-1110.02.patch</patch>
      </patches>
...
</plugins>

不幸的是,当我用:

运行Maven时
sudo mvn -Phadoop_yarn -Dhadoop.version=2.8.1 clean package -DskipTests

它仍然失败并出现与之前相同的错误:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /usr/local/giraph/giraph-core/target/munged/main/org/apache/giraph/job/GiraphJob.java:[213,11] setPingInterval(org.apache.hadoop.conf.Configuration,int) is not public in org.apache.hadoop.ipc.Client; cannot be accessed from outside package
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Giraph Parent ............................... SUCCESS [  6.298 s]
[INFO] Apache Giraph Core ................................. FAILURE [  9.359 s]
[INFO] Apache Giraph Examples ............................. SKIPPED
[INFO] Apache Giraph Distribution ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.062 s
[INFO] Finished at: 2018-02-06T22:53:00+02:00
[INFO] Final Memory: 51M/640M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project giraph-core: Compilation failure
[ERROR] /usr/local/giraph/giraph-core/target/munged/main/org/apache/giraph/job/GiraphJob.java:[213,11] setPingInterval(org.apache.hadoop.conf.Configuration,int) is not public in org.apache.hadoop.ipc.Client; cannot be accessed from outside package
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

这清楚地表明该问题尚未修补。当我手动检查文件时,我可以确认没有变化。如果我在编译之前手动更改文件,则更改将被丢弃(我猜测文件被重载)。也无法使用脱机标志运行安装,因为它取决于下载某些依赖项。我在这里结束了我的智慧。

My Maven版本是3.3.9。

0 个答案:

没有答案