[英]Jenkins - Unable to run maven project in local system which is set as slave
HI I have set my local machine as Slave and created a job to run scripts whenever there is a build deployment in Client machine. 嗨,我已将本地计算机设置为从属计算机,并创建了一个作业,以在客户端计算机中有构建部署时运行脚本。 Howerver, I am seeing below error trace and scripts are not running.
但是,我看到以下错误跟踪并且脚本未运行。
[ERROR] COMPILATION ERROR :
[INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR :
[信息] ----------------------------------------- --------------------
[ERROR] No compiler is provided in this environment. [错误]在此环境中未提供编译器。 Perhaps you are running on
a JRE rather than a JDK?
也许您是在
a JRE rather than a JDK?
[INFO] 1 error [INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.874 s
[INFO] Finished at: 2016-11-24T17:08:33+04:00 [INFO] Final Memory: 17M/247M
[INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project EmiratesNBD_FaceLift_Smoke: Compilation failure [ERROR] No compiler is provided in this environment. [INFO] 1错误
[INFO] -------------------------------------------------------------
[INFO] ---------------------------- -------------------------------------------- [INFO] BUILD FAILURE
[ INFO] ------------------------------------------------ ------------------------ [INFO] Total time: 17.874 s
[INFO]完成于:2016-11-24T17:08:33 + 04: 00 [INFO] Final Memory: 17M/247M
[INFO] ------------------------------------- -----------------------------------等待詹金斯完成数据收集[错误]无法执行目标组织.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile(默认为testCompile)在项目EmiratesNBD_FaceLift_Smoke:编译失败[ERROR]在此环境中未提供编译器。 Perhaps you are running on a JRE rather than a JDK? 也许您是在JRE而不是JDK上运行?
I have set my MAVEN AND jAVA Set in my environment variables correctly. 我已经在我的环境变量中正确设置了我的MAVEN AND JAVA设置。 kindly suggest
友善建议
In my opinion the most safe way to have a correct JDK on Jenkins slave is to use Jenkins Tools Configuration
(in case you use Jenkins 2). 在我看来,在Jenkins从站上拥有正确的JDK的最安全方法是使用
Jenkins Tools Configuration
(以防您使用Jenkins 2)。 It's available via Jenkins Manage
page. 可通过
Jenkins Manage
页面使用。 For versions below 2 it's available in Configure System
对于低于2的版本,可在“
Configure System
Jenkins Tools Configuration
find JDK
Jenkins Tools Configuration
找到JDK
Automatic install
from java.sun.com) Automatic install
) JDK
) JDK
字段中) Now you have no problems with installed or not installed JDK, 32 or 64 bit and so on... 现在,您已安装或未安装32位或64位JDK等都没有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.