简体   繁体   中英

Jenkins build Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile

I am trying to build my first maven project in Jenkin after setup but unable to do that due to the following:

Waiting for Jenkins to finish collecting data [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project FreeCRMTest: Compilation failure -> [Help 1] [ERROR]

在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

在此处输入图像描述

I had same problem where maven compiler plugin v3.8.1 was failing in jenkins pipeline.

What fixed my issue?

In " Build Environment " menu,

Adding JAVA_HOME=<jdk path> under " Inject environment variables to the build process " fixes the issue

在此处输入图像描述

Go to Jenkins->Global Tool configuration -> "Add JDK" and give your jdk path. Problem solved!

Hopefully its gonna help someone

在此处输入图像描述 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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