MavenHelper
MavenHelper copied to clipboard
.mvn/jvm.config not picked up on submodule action
My project consists of a parent module and several sub modules. To be able to migrate von Java 11 to Java 17 i had to add several JVM configurations. I picked the .mvn/jvm.config
approach (https://maven.apache.org/configure.html). I created a directory .mvn
in the root of the Project and placed a file named jvm.config
with the following content inside:
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
- Running "right click parent => Run maven => clean install" results in a process with these settings picked up.
- Running "right click any submodule => Run maven => clean install" results in a process with these settings NOT picked up.
I used ps aux | grep add-opens
to check that.
After setting the option "Use a Terminal to run goals, with a custom mvn command: " to "mvn", the configuration is also picked up when a submodule is executed.
To Reproduce see above
Expected behavior
The options set in projectroot/.mvn/jvm.config
should always be picked up, when no projectroot/submodule/.mvn/jvm.config
is found in the submodule's root.
Sounds like IntelliJ bug. https://youtrack.jetbrains.com/issue/IDEA-281936/Support-.mvn-jvm.config-per-module-for-defining-JVM-configuration-for-Maven-builds
I have found that one too, but I think that bug is about being able to place jvm.config files in every submodule.
I want that: https://youtrack.jetbrains.com/issue/IDEA-205178/Support-.mvn-jvm.config-for-defining-JVM-configuration-for-Maven-builds#focus=Comments-27-5385229.0-0
I have no knowledge about the architecture of Idea Plugins. If you are telling me, that your Plugin depends upon default Idea feature, then it has to be an Idea bug.