Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 构建Xgboost4j引发错误异常,有人能帮忙吗?异常如下:_Maven_Xgboost - Fatal编程技术网

Maven 构建Xgboost4j引发错误异常,有人能帮忙吗?异常如下:

Maven 构建Xgboost4j引发错误异常,有人能帮忙吗?异常如下:,maven,xgboost,Maven,Xgboost,当我尝试使用命令mvn clean install-DskipTests=true构建xgboost4j时,会出现错误异常!以前是否有人见过此错误异常 我的操作系统是OS X JDK版本是JDK1.8 python版本是2.7 xgboost代码是git克隆--递归的 错误消息如下所示: [INFO] argLine set to -javaagent:/Users/zhangkuantian/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/or

当我尝试使用命令
mvn clean install-DskipTests=true
构建xgboost4j时,会出现错误异常!以前是否有人见过此错误异常
我的操作系统是OS X
JDK版本是JDK1.8
python版本是2.7
xgboost代码是git克隆--递归的
错误消息如下所示:

[INFO] argLine set to -javaagent:/Users/zhangkuantian/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/Users/zhangkuantian/code/xgboost/jvm-packages/xgboost4j/target/jacoco.exec
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:exec (native) @ xgboost4j ---
/bin/sh: cmake: command not found
building Java wrapper
cd ..
mkdir -p build
cd build
cmake .. -DUSE_S3:BOOL=OFF -DUSE_OPENMP:BOOL=OFF -DPLUGIN_UPDATER_GPU:BOOL=OFF -DUSE_AZURE:BOOL=OFF -DUSE_HDFS:BOOL=OFF -DJVM_BINDINGS:BOOL=ON
Traceback (most recent call last):
  File "create_jni.py", line 88, in <module>
    run("cmake .. " + " ".join(args) + maybe_generator)
  File "create_jni.py", line 51, in run
    subprocess.check_call(command, shell=True, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake .. -DUSE_S3:BOOL=OFF -DUSE_OPENMP:BOOL=OFF -DPLUGIN_UPDATER_GPU:BOOL=OFF -DUSE_AZURE:BOOL=OFF -DUSE_HDFS:BOOL=OFF -DJVM_BINDINGS:BOOL=ON' returned non-zero exit status 127
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] xgboost-jvm ........................................ SUCCESS [  3.219 s]
[INFO] xgboost4j .......................................... FAILURE [  1.359 s]
[INFO] xgboost4j-spark .................................... SKIPPED
[INFO] xgboost4j-flink .................................... SKIPPED
[INFO] xgboost4j-example .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.683 s
[INFO] Finished at: 2017-09-14T17:28:17+08:00
[INFO] Final Memory: 27M/469M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (native) on project xgboost4j: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[INFO]argLine设置为-javaagent:/Users/zhangkuantian/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/Users/zhangkuantian/code/xgboost/jvm packages/xgboost4j/target/jacoco.exec
[信息]
[信息]---execmaven插件:1.6.0:exec(本机)@xgboost4j---
/bin/sh:cmake:未找到命令
构建Java包装器
光盘
mkdir-p构建
光盘制作
克马克-DUSE\u S3:BOOL=OFF-DUSE\u OPENMP:BOOL=OFF-DPLUGIN\u更新程序\u GPU:BOOL=OFF-DUSE\u AZURE:BOOL=OFF-DUSE\u HDFS:BOOL=OFF-DJVM\u绑定:BOOL=ON
回溯(最近一次呼叫最后一次):
文件“create_jni.py”,第88行,在
运行(“cmake..”+“”。加入(args)+maybe\u生成器)
文件“create_jni.py”,第51行,运行中
子进程.check_调用(命令,shell=True,**kwargs)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py”,第540行,在check_调用中
引发被调用的进程错误(retcode,cmd)
subprocess.CalledProcessError:命令'cmake-DUSE\u S3:BOOL=OFF-DUSE\u OPENMP:BOOL=OFF-DPLUGIN\u UPDATER\u GPU:BOOL=OFF-DUSE\u AZURE:BOOL=OFF-DUSE\u HDFS:BOOL=OFF-DJVM\u绑定:BOOL=ON'返回非零退出状态127
[错误]命令执行失败。
org.apache.commons.exec.ExecuteException:进程退出时出现错误:1(退出值:1)
位于org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
位于org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
位于org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
位于org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
位于org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
位于org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
位于org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
位于org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
位于org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
位于org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
位于org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
位于org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
位于org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
位于org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
位于org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
位于org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
位于org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
位于sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)中
位于java.lang.reflect.Method.invoke(Method.java:498)
位于org.codehaus.plexus.classworlds.launcher.launcher.launchEnhanced(launcher.java:289)
位于org.codehaus.plexus.classworlds.launcher.launcher.launch(launcher.java:229)
位于org.codehaus.plexus.classworlds.launcher.launcher.mainWithExitCode(launcher.java:415)
位于org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:356)
[信息]------------------------------------------------------------------------
[信息]反应堆概要:
[信息]
[信息]xgboost jvm。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。成功[3.219秒]
[信息]xgboost4j。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。故障[1.359秒]
[信息]xgboost4j火花。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。跳过
[信息]xgboost4j flink。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。跳过
[信息]xgboost4j示例。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。跳过
[信息]------------------------------------------------------------------------
[信息]生成失败
[信息]------------------------------------------------------------------------
[信息]总时间:4.683秒
[信息]完成时间:2017-09-14T17:28:17+08:00
[信息]最终内存:27M/469M
[信息]------------------------------------------------------------------------
[错误]无法在xgboost4j项目上执行目标org.codehaus.mojo:exec maven插件:1.6.0:exec(本机):命令执行失败。进程已退出,但出现错误:1(退出值:1)->[帮助1]

我解决了这个问题,尽管我不知道项目“xgboost4j”、“xgboost4j-example”、“xgboost-spark”、“xgboost-flink”的pom.xml文件中的块代码是什么


execmaven插件
org.codehaus.mojo
用于,我注释了它,然后问题解决了

[INFO]——exec maven插件:1.6.0:exec(本机)@xgboost4j--- /bin/sh:cmake:未找到命令

!!!!! 安装cmake、mvn软件包并解决

     <plugin>
          <artifactId>exec-maven-plugin</artifactId>
          <groupId>org.codehaus.mojo</groupId>
          <!-- executions>
              <execution>
                  <id>native</id>
                  <phase>generate-sources</phase>
                  <goals>
                      <goal>exec</goal>
                  </goals>
                  <configuration>
                      <executable>python</executable>
                      <arguments>
                        <argument>create_jni.py</argument>
                      </arguments>
                      <workingDirectory>${user.dir}</workingDirectory>
                  </configuration>
              </execution>
          </executions-->
      </plugin>