docker jenkins NB: JAVA_HOME should point to a JDK not a JRE

jenkins java编译错误:
3.5.4/conf/settings.xml
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
Build step ‘Invoke top-level Maven targets’ marked build as failure
Finished: FAILURE

原因:
JAVA_HOME错误
docker jenkins NB: JAVA_HOME should point to a JDK not a JRE_第1张图片
在docker运行项目下面:
bash-4.4# java -verbose
docker jenkins NB: JAVA_HOME should point to a JDK not a JRE_第2张图片
第一行的路径
[Opened /usr/lib/jvm/java-1.8-openjdk/jre/lib/rt.jar] 拷贝:/usr/lib/jvm/java-1.8-openjdk到jenkins全局配置工具
然后再次jenkins编辑项目,就可以解决问题
docker jenkins NB: JAVA_HOME should point to a JDK not a JRE_第3张图片

你可能感兴趣的:(docker,jenkins,java)