Open vpa1977 opened 1 month ago
See https://github.com/canonical/craft-parts/issues/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 - release X is not supported.
and there is no way to make maven use the desired JDK.
It would be nice to have java_home
property to point it to the right Java that should default to build-package
JDK if present.
The root cause is stage path being prepended to the PATH:
/root/stage/usr/bin:/snap/rockcraft/x1/libexec/rockcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
This forces Java plugins to use staged runtime.
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
part yaml
Relevant log output