title: how to pass --add-opens JDK module configuration to maven test
body: <p>I'm upgrading java version in our production code from java 8 to java 11.</p>
  <p>I have to add the below JDK module configuration in the application java start command due to usage of third party libraries like flume, zookeeper etc.</p>
  <p><code>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED</code></p>
  <p>After adding this configuration and java application is starting fine.</p>
  <p>But when I run the tests using <code>mvn test</code> the tests are failing. I've added the below configuration to the maven-surefire-plugin but still it is throwing error.</p>
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.0.0-M5&lt;/version&gt;
      &lt;configuration&gt;
          &lt;argLine&gt;--illegal-access=permit&lt;/argLine&gt;
          &lt;argLine&gt;--add-opens java.base/java.lang=ALL-UNNAMED&lt;/argLine&gt;
          &lt;argLine&gt;--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED&lt;/argLine&gt;
          &lt;argLine&gt;-Dillegal-access=permit&lt;/argLine&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p>I think I'm not passing the argument correctly in the maven test.
  Any idea what I'm doing wrong and how to fix this?</p>