-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven build error #181
Comments
I had the same problem and still did not get a solution. Did you get any? |
The issue is related to the compilation failure due to source and target compatibility levels. However, in the webapp.xml provided, there is no Maven Compiler Plugin configuration similar to the server-side pom.xml. FIXED the compilation issue, we can add the Maven Compiler Plugin configuration to the webapp module's pom.xml. 4.0.0 com.example.maven-project maven-project 1.0-SNAPSHOT ../pom.xmlwebapp
Ensure that we replace 7 with the appropriate source and target compatibility levels we want to use. After updating the pom.xml, save the changes and rebuild your project in Jenkins. This should resolve the source and target compatibility level errors for the webapp module. |
Hi James,
I'm on your Udemy Jenkins lecture.
I encountered the following error while building the first Jenkins project. Would you please kindly advise the next steps? Thank you!
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: Source option 6 is no longer supported. Use 7 or later.
[ERROR] error: Target option 6 is no longer supported. Use 7 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Maven Project 1.0-SNAPSHOT:
[INFO]
[INFO] Maven Project ...................................... SUCCESS [ 0.142 s]
[INFO] Server ............................................. FAILURE [ 0.402 s]
[INFO] Webapp ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.630 s
[INFO] Finished at: 2021-09-04T09:59:06+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project server: Compilation failure: Compilation failure:
[ERROR] error: Source option 6 is no longer supported. Use 7 or later.
[ERROR] 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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :server
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
The text was updated successfully, but these errors were encountered: