-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Change javac executable used by quarkus-maven-plugin #39129
Comments
/cc @quarkusio/devtools (maven) |
Sounds like a good first issue, want to submit a PR? |
I gave it a shot, assuming that it would be as easy as adding a new property for the executable path and passing it to the I don't think this is a good first issue but would instead require someone quite familiar with developing Maven plugins and Quarkus code generation, which I am definitely not. For anyone deciding to look into this, here's the stack trace I get when running
|
Description
There is currently no way to change the JDK used by quarkus-maven-plugin, which is an annoyance for developers that have to switch between projects using different JDK versions.
Usually we would do one of these two things to specify the path to the JDK the project should use:
<executable>
in maven-compiler-plugin's<configuration>
to point to something like${JAVA_17_HOME}/bin/javac
However, none of these approaches work for Quarkus projects, since they don't have any effect on quarkus-maven-plugin. We now have to resort to manually changing the JAVA_HOME environment variable before executing with Maven, or to automatically changing it inside the Maven wrapper script. The latter approach is not ideal because JAVA_HOME stays changed even after the Maven command has finished, and it doesn't work if the developer uses mvn instead of mvnw.
It would be great if we could set a custom path to the javac executable used by quarkus-maven-plugin. Support for toolchains would also be awesome, but I think that's already tracked in this issue: #12943
Implementation ideas
Add an
<executable>
property to quarkus-maven-plugin's<configuration>
sectionThe text was updated successfully, but these errors were encountered: