Maven With Java 25

Hello everyone! Im starting to learn java. I tried to configure maven to work with maven.compiler.release to be 25. However I keep getting errors. Any way one can provide example of pom file with java25? Thanks in advance !
22 Replies
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Dev0Guy! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
ayylmao123xdd
ayylmao123xdd2mo ago
can you send your pom
Dev0Guy
Dev0GuyOP2mo ago
sure
ayylmao123xdd
ayylmao123xdd2mo ago
nice account creation date btw
Dev0Guy
Dev0GuyOP2mo ago
ayylmao123xdd
ayylmao123xdd2mo ago
and what error do you get
Dev0Guy
Dev0GuyOP2mo ago
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project learn-java: Fatal error compiling: error: release version 25 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/display/MAVEN/MojoExecutionException
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project learn-java: Fatal error compiling: error: release version 25 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/display/MAVEN/MojoExecutionException
ayylmao123xdd
ayylmao123xdd2mo ago
do you got jdk 25 installed in your ide or pc
Dev0Guy
Dev0GuyOP2mo ago
Im using zed. And configure the language server to the java home
No description
Dev0Guy
Dev0GuyOP2mo ago
the $JAVA_HOME is in sdk 25
ayylmao123xdd
ayylmao123xdd2mo ago
hmm do you know if other java versions work maybe the ide doesnt see the new jdk @dan1st | Daniel can u check java version 25 not supported
stechy1
stechy12mo ago
Hi, try to update the compiler plugin to version 3.14.1. I'm just upgrading my project to Java 25 and I'm able to build it without issues. Make sure you are executing Maven with Java 25. Check settings.xml
Dev0Guy
Dev0GuyOP2mo ago
now I get build fail
stechy1
stechy12mo ago
Post a log from the failed build here...
Dev0Guy
Dev0GuyOP2mo ago
ARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/opt/homebrew/Cellar/maven/3.9.11/libexec/lib/guice-5.1.0-classes.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.040 s
[INFO] Finished at: 2025-10-03T17:09:08+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/guyarieli/Documents/SideLearning/BMO/LearnJava/tmp). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
ARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/opt/homebrew/Cellar/maven/3.9.11/libexec/lib/guice-5.1.0-classes.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.040 s
[INFO] Finished at: 2025-10-03T17:09:08+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/guyarieli/Documents/SideLearning/BMO/LearnJava/tmp). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
Dev0Guy
Dev0GuyOP2mo ago
full logs @stechy1
dan1st
dan1st2mo ago
they are using a JDK before JDK 25 to compile a project with <release>25</release> mvn -v should show which Java version Maven runs with
Dev0Guy
Dev0GuyOP2mo ago
Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
Maven home: /opt/homebrew/Cellar/maven/3.9.11/libexec
Java version: 25, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/25/libexec/openjdk.jdk/Contents/Home
Default locale: en_IL, platform encoding: UTF-8
OS name: "mac os x", version: "15.5", arch: "aarch64", family: "mac"
Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
Maven home: /opt/homebrew/Cellar/maven/3.9.11/libexec
Java version: 25, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/25/libexec/openjdk.jdk/Contents/Home
Default locale: en_IL, platform encoding: UTF-8
OS name: "mac os x", version: "15.5", arch: "aarch64", family: "mac"
dan1st
dan1st2mo ago
that error is because the directory you are in when executing Maven doesn't have a pom.xml make sure to execute the Maven command in the right directory ls should include the pom.xml
Dev0Guy
Dev0GuyOP2mo ago
Thank you. I feel so imbursement
JavaBot
JavaBot2mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
JavaBot
JavaBot2mo ago
Post Closed
This post has been closed by <@165490902989668353>.

Did you find this page helpful?