AFAIK the --add-opens is only useful when using the module path. Maven itself and the plugins use the classpath, so I would like to have an example to better understand your issue.
thanks, Robert On 15-6-2021 18:43:35, Guillaume Nodet <gno...@apache.org> wrote: Hi everyone ! There are some small incompatibilities between JDK around the supported command line versions. Usually, those do not cause any real problems. However, the "--add-opens" are sometimes necessary and only supported on JDK >= 9, as the JVM exits with an error on JDK 8. Some plugins may require the use of those options when running on JDK >= 9. What would be the way to solve this ? For mvnd, when the client launches the daemon, the JDK_JAVA_OPTIONS environment property is used. But it works because we have control on the client environment. But when you just clone a git repo, asking the user to set a specific environment is problematic imho. The .mvn/maven.config or .mvn/jvm.config can't be used to set up environment variables or to conditionally set up arguments afaik. Any idea ? -- ------------------------ Guillaume Nodet