Issue
Jenkins throws the following error:
[WARNING] The requested profile "singleflow" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project factor-esb-autotest: Fatal error compiling: invalid target release: 10 -> [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/MojoExecutionException
build step 'invoke top-level maven targets' marked build as failure
My POM https://pastebin.com/xeb5Mpcb
At first I thought that the error was due to the fact that in the jenkins global settings the version does not match the plugin (3.8.1), I set it to "Install from Apach" 3.8.1 but it still does not work. What could be the reason ?
Maven in global setting
Solution
There must be a configuration for maven-compiler-plugin (<release>10</release>
) or a property like <maven.compiler.release>10</maven.compiler.release>
The commented upgrade of JUnit is unrelated to the problem.
Apart from that such information that you have update pom should be part of the question up-front
Answered By - khmarbaise
Answer Checked By - Mildred Charles (JavaFixing Admin)