RFR: 8345185: Some tests in test/jdk/tools/jpackage fail with a JDK without JMODs

Mandy Chung mchung at openjdk.org
Fri Dec 13 18:15:38 UTC 2024


On Fri, 13 Dec 2024 16:15:03 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> > This method, in turn, calls `JLinkBundlerHelper.getDefaultModules()` which uses `Configuration.empty().resolveAndBind()` which performs the service binding.
> 
> So it appears using `Configuration.empty().resolve()` instead would fix this.

JEP 343 & JEP 392 both specify that jpackage by default does not include service providers unless `--bind-services` is included.  This should be fixed to match the JEP and there is no difference in behavior with a linkable runtime or non-linkable.   A CSR is required for this fix due the behavioral change. 

If `--bind-services` is included, `jdk.package` and `jdk.jlink` will be included in the default module set as expected.   I would suggest to wait and see if any customer uses the linkable runtime and depends on `jpackage --add-modules ALL-DEFAULT --bind-services`.    ALL-DEFAULT should have the same meaning/result as used at run time.  If this limitation becomes a major concern, could consider a new jpackage-specific token or a new option etc rather than changing the behavior of ALL-DEFAULT.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22644#issuecomment-2541997017


More information about the core-libs-dev mailing list