How to add --add-exports?
Answered
It show me add "--add-exports='.....' to module " everytime when I reopen the idea.
How to add it forever?
Please sign in to leave a comment.
Hello, do you have empty Override parameters per module (in Preferences | Build, Execution, Deployment | Compiler | Java Compiler) after reopening the project, please confirm? What IDEA version do you use?
I try to add
-add-exports=java.base/jdk.internal.misc=ALL-UNNAMED
to here, reopening the preject, It doesn't work.
Clean the add parameters doesn't work ,too.
Please clarify, after adding a compilation option to module you close the project, open it, and there is no added option in Override compiler parameters table? Or option is presented in table, but IDEA still asks to add option and highlights import in code Editor? If possible please provide idea.log and sample project where the issue is reproduced. Thanks
to get it to show up forever, you configure your project's Maven compiler settings with the modules.
then the modules will automatically show up per project in intellij compilation options when you maven sync intellij.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerArgs>
<arg>--add-exports</arg>
<arg>java.base/sun.security.x509=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>