Дженкинсу не удается запустить тест с Maven и Java 21 ⇐ JAVA
-
Гость
Дженкинсу не удается запустить тест с Maven и Java 21
I'm trying to run mvn test in Jenkins when code is pushed to git repo.
When I build tests in Jenkins, it gives me this:
Parsing POMs Established TCP socket on 41593 [Java App] $ java -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.14.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.7.0.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging jenkins.maven3.agent.Maven35Main /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven /var/jenkins_home/war/WEB-INF/lib/remoting-3206.vb_15dcf73f6a_9.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.14.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.14.jar 41593 channel started Executing Maven: -B -f /var/jenkins_home/workspace/Java App/pom.xml test [INFO] Scanning for projects... [INFO] [INFO] ----------------------< org.example:javaProject >----------------------- [INFO] Building javaProject 1.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ javaProject --- [INFO] skip non existing resourceDirectory /var/jenkins_home/workspace/Java App/src/main/resources [INFO] skip non existing resourceDirectory /var/jenkins_home/workspace/Java App/src/main/resources [INFO] [INFO] --- compiler:3.11.0:compile (default-compile) @ javaProject --- [INFO] Changes detected - recompiling the module! :source [INFO] Compiling 4 source files with javac [debug release 21] to target/classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.680 s [INFO] Finished at: 2024-03-04T09:52:19Z [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project javaProject: Fatal error compiling: error: release version 21 not supported -> [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/disp ... nException [JENKINS] Archiving /var/jenkins_home/workspace/Java App/pom.xml to org.example/javaProject/1.0-SNAPSHOT/javaProject-1.0-SNAPSHOT.pom channel stopped Finished: FAILURE My pom.xml:
Источник: https://stackoverflow.com/questions/781 ... nd-java-21
I'm trying to run mvn test in Jenkins when code is pushed to git repo.
When I build tests in Jenkins, it gives me this:
Parsing POMs Established TCP socket on 41593 [Java App] $ java -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.14.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.7.0.jar:/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging jenkins.maven3.agent.Maven35Main /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven /var/jenkins_home/war/WEB-INF/lib/remoting-3206.vb_15dcf73f6a_9.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.14.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.14.jar 41593 channel started Executing Maven: -B -f /var/jenkins_home/workspace/Java App/pom.xml test [INFO] Scanning for projects... [INFO] [INFO] ----------------------< org.example:javaProject >----------------------- [INFO] Building javaProject 1.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ javaProject --- [INFO] skip non existing resourceDirectory /var/jenkins_home/workspace/Java App/src/main/resources [INFO] skip non existing resourceDirectory /var/jenkins_home/workspace/Java App/src/main/resources [INFO] [INFO] --- compiler:3.11.0:compile (default-compile) @ javaProject --- [INFO] Changes detected - recompiling the module! :source [INFO] Compiling 4 source files with javac [debug release 21] to target/classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.680 s [INFO] Finished at: 2024-03-04T09:52:19Z [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project javaProject: Fatal error compiling: error: release version 21 not supported -> [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/disp ... nException [JENKINS] Archiving /var/jenkins_home/workspace/Java App/pom.xml to org.example/javaProject/1.0-SNAPSHOT/javaProject-1.0-SNAPSHOT.pom channel stopped Finished: FAILURE My pom.xml:
Источник: https://stackoverflow.com/questions/781 ... nd-java-21
Мобильная версия