-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 toolchain is ignored for used java executable #12943
Comments
/cc @quarkusio/devtools |
Issue seems to be related to #241 |
@aloubyansky Thank you for the pull request. Does this also fix the ignored toolchain during the package phase resp. in QuarkusAugmentor? |
Unfortunately, no. The PR only fixes the DevMojo, which is a regression. Fixing the packaging looks like a bigger challenge. |
any news on this? was trying to use the maven toolchains plugin to develop with java 17 on a new project, and came across the same issue on version [ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.5.3.Final:build (default) on project my-backend: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.arc.deployment.ConfigBuildStep#generateConfigClasses threw an exception: java.lang.UnsupportedClassVersionError: my/backend/SomeConfiguration has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java
Runtime only recognizes class file versions up to 55.0 |
Any news? |
Any news? |
using toolchains gets more and more common as users want to try out new vs old java combinations. Whats the blocker here? |
Any news ? |
Describe the bug
quarkus-maven-plugin apparently ignores maven toolchain configuration. i. e. if maven is run with java 8 and toolchain is configured with java 11, the quarkus-maven-plugin picks up java 8.
Expected behavior
use java from maven toolchain
Actual behavior
use java, with which maven is run
To Reproduce
see maven project code-with-quarkus.zip
Steps to reproduce the behavior:
jdkHome
in toolchains.xml in project-root with a valid path to a java 11 installationmvn package --global-toolchains toolchains.xml
in project-rootsee output:
...
[INFO] --- maven-toolchains-plugin:3.0.0:toolchain (default) @ code-with-quarkus ---
[INFO] Required toolchain: jdk [ vendor='openjdk' version='11' ]
[INFO] Found matching toolchain for type jdk: JDK[Z:\Programme\Java\jdk11]
...
[INFO] --- quarkus-maven-plugin:1.9.0.Final:build (default) @ code-with-quarkus ---
[WARNING] [io.quarkus.deployment.QuarkusAugmentor] Using Java versions older than 11 to build Quarkus applications is deprecated and will be disallowed in a future release!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.460 s
[INFO] Finished at: 2020-10-26T11:45:36+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.9.0.Final:build (default) on project code-with-quarkus: Execution default of goal io.quarkus:quarkus-maven-plugin:1.9.0.Final:build failed: An API incompatibility was encountered while executing io.quarkus:quarkus-maven-plugin:1.9.0.Final:build: java.lang.UnsupportedClassVersionError: org/acme/config/MyConfigSourceProvider has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[ERROR] -----------------------------------------------------
....
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: