jenkins-docs/simple-java-maven-app

Source option 6 is no longer supported. Use 7 or later

romarknmsu opened this issue · 2 comments

I attempted to run this in Jenkins and it returned this error. Any idea on how to fix?

[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Source option 6 is no longer supported. Use 7 or later. [ERROR] Target option 6 is no longer supported. Use 7 or later. [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.842 s [INFO] Finished at: 2021-06-15T12:38:35-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project my-app: Compilation failure: Compilation failure: [ERROR] Source option 6 is no longer supported. Use 7 or later. [ERROR] Target option 6 is no longer supported. Use 7 or later. [ERROR] -> [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/MojoFailureException Build step 'Invoke top-level Maven targets' marked build as failure Finished: FAILURE

I have submitted a PR to resolve this error. Please have a check on the same. #297

the issue is in the pom.xml file. Add the following line:

<properties>

Just update pom.xml

<plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
</plugin>