慕侠7074599
2018-06-25 16:38
java环境是yum install -y java 命令安装的,版本是1.8,jenkins部署报下面的错误 [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ order --- [INFO] Compiling 9 source files to /root/.jenkins/workspace/DeployOrder/order/target/classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.053 s [INFO] Finished at: 2018-06-25T16:03:29+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project order: Fatal error compiling: tools.jar not found: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64/jre/../lib/tools.jar -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionExceptiontomcat Id list : no tomcat pid alive cp: 无法获取"/root/.jenkins/workspace/DeployOrder/order/target/order.war" 的文件状态(stat): 没有那个文件或目录 mv: 无法获取"order.war" 的文件状态(stat): 没有那个文件或目录
尝试一下 yum install java-1.8.0-openjdk, 强制安装jdk包 可以解决这个问题。
sudo
yum
install
java-1.8.0-openjdk-devel 用了这个以后再次构建报错
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project order: Compilation failure
sudo yum install java-1.8.0-openjdk-devel
同求步骤
谢谢老师。我后来重新安装了一个源码的JDK。问题已解决十分感谢!!!
用Jenkins自动化搭建测试环境
37385 学习 · 236 问题
相似问题