简体   繁体   English

Jenkins Maven Build无法使用Java Home

[英]Jenkins Maven Build Not Picking Up Java Home

The version of Jenkins I am using seems to not be correctly picking up the value for Java Home that I am setting as a Global Variable 我正在使用的Jenkins版本似乎没有正确地获取我设置为全局变量的Java Home的值

if I run a clean install on my pom as a Pre Build Step - it picks up the Java Home variable that I set If I run a clean install on my pom as a Build step - it picks up another version of Java on my linux box thats not set as Java Home 如果我作为预构建步骤在pom上运行全新安装-它会拾取我设置的Java Home变量如果我作为构建步骤在pom上运行全新安装-它将在我的Linux盒子上拾取另一个Java版本多数民众赞成在未设置为Java主页

I have tried a few things including deleting the version of Java that the Build Step is picking up but to no avail. 我尝试了一些操作,包括删除Build步骤正在使用的Java版本,但无济于事。 For now I will execute my build as a Pre Build step until I have figured out the problem 现在,我将执行构建作为“预构建”步骤,直到找出问题为止

The version of jenkins I am using is Jenkins ver. 我正在使用的jenkins版本是Jenkins ver。 1.565.3 1.565.3

Have you configured the JDK installation under Manage Jenkins Global Configuration? 您是否在“管理Jenkins全局配置”下配置了JDK安装?

Have you configured your maven job to use that particular JDK? 您是否已将Maven作业配置为使用该特定JDK? (If you have just one, it will always use that one) (如果只有一个,它将始终使用该一个)

Jenkins will install and maintain it's own JDK, independent of what you have pre-installed on the operating system Jenkins将安装和维护自己的JDK,而与您在操作系统上预先安装的内容无关

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM