-
Notifications
You must be signed in to change notification settings - Fork 37
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 plugin should not use staged runtime #814
Comments
See #813 for the sample project. |
I'm not sure we can do this without breaking backwards compatibility, but maybe we can provide an option about staging a JRE (defaulting to True)? @cmatsuoka what do you think? |
The issue with the staged runtime is that the error message from the build is misleading - |
The root cause is stage path being prepended to the PATH:
This forces Java plugins to use staged runtime. |
The stage dir is always prepended to the PATH, yes. That's typically how one can use a custom version of build tools. It's too late to change this now but we can discuss alternatives for 26.04. What's really interesting to me, though, is that Maven is picking up the staged Java even though it's just the runtime, and not a full JDK. That looks like a bug we might be able to fix. @vpa1977 do you know if there's any way to control how Maven finds the Java to use? |
Maven checks JAVA_HOME and then the search path. |
so in this case would it be enough to set |
This would be sufficient for maven plugin |
Bug Description
Maven plugin tries to use staged Java runtime instead of the one installed as the build package.
This causes a subsequent build failure due to runtime missing necessary modules to compile Java files.
To Reproduce
Build succeeds
Build fails
part yaml
Relevant log output
The text was updated successfully, but these errors were encountered: