On Thu, 27 Feb 2025 10:19:51 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
>> While testing a bit with a minimal JVM, it has been noticed that some >> java/lang jtreg tests use jfr but do not declare it with a "requires >> vm.hasJFR" ; that leads to test errors in a JVM setup with no JFR . > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last revision: > > copyright years There is no user-selectable option to exclude modules during the build. The official answer is that you need to create your own image in a follow-up step using jlink, where you can select which modules to include. That is really stupid, since internally in the build system we have a `MODULES_FILTER` for modules to exclude, and we should really expose it to the user. (I've been thinking about this but never had the time to fix it.) Anyway, I think this is an interesting discussion, but not really high-priority, and the build changes are unlikely to happen unless someone can argue that they should be given more priority (as there are simple work-arounds available). I created https://bugs.openjdk.org/browse/JDK-8350930 to track this discussion so we don't lose it, though. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23805#issuecomment-2690268354