title: How add "--add-exports" compiler directive to Maven compilation
body: <p>I get the following errors when compiling with Java 11.</p>
  <pre><code>Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xerces.internal.xni.parser'
  Symbol is declared in module 'java.base' which does not export package 'sun.net.www.protocol.http'
  Symbol is declared in module 'java.base' which does not export package 'sun.net.www.protocol.file'
  Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xerces.internal.util'
  Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xerces.internal.xni.parser'
  Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xerces.internal.xni.parser'
  Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xerces.internal.xni.parser'
  [...]
  Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xerces.internal.impl.dtd'
  </code></pre>
  <p>I need to specified <code>--add-exports</code> directive to the Java compilation.
  I don't know how to add it to my Maven build compiling Kotlin code.</p>
  <p>Also, I am not sure about the exact values for <code>--add-exports</code>.</p>
  <p>This is my <code>pom.xml</code>.</p>
  <pre class="lang-xml prettyprint-override"><code>    &lt;!-- Kotlin compilation --&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jetbrains.kotlin&lt;/groupId&gt;
                  &lt;artifactId&gt;kotlin-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${kotlin.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;compile&lt;/id&gt;
                          &lt;phase&gt;compile&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;compile&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;sourceDirs&gt;
                                  &lt;source&gt;src/main/java&lt;/source&gt;
                                  &lt;source&gt;src/main/kotlin&lt;/source&gt;
                              &lt;/sourceDirs&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;test-compile&lt;/id&gt;
                          &lt;phase&gt;test-compile&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;test-compile&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;jvmTarget&gt;1.8&lt;/jvmTarget&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- Bundle a standalone JAR --&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;finalName&gt;${project.artifactId}-${project.version}-all&lt;/finalName&gt;
                      &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;mainClass&gt;DtdFinderKt&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-assembly&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;single&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;!-- Attempt to specify --add-export --&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;java11-compiler-java-with-kotlin&lt;/id&gt;
              &lt;activation&gt;
                  &lt;file&gt;&lt;exists&gt;${basedir}/src/main/kotlin&lt;/exists&gt;&lt;/file&gt;
                  &lt;jdk&gt;[11,)&lt;/jdk&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                          &lt;configuration&gt;
                              &lt;compilerArgs&gt;
                                  &lt;arg&gt;--add-exports&lt;/arg&gt;&lt;arg&gt;java.xml/com.sun.org.apache.xerces.internal.impl.dtd=ALL-UNNAMED&lt;/arg&gt;
                                  &lt;arg&gt;--add-exports&lt;/arg&gt;&lt;arg&gt;java.xml/com.sun.org.apache.xerces.internal.xni.parser=ALL-UNNAMED&lt;/arg&gt;
                                  &lt;arg&gt;--add-exports&lt;/arg&gt;&lt;arg&gt;java.base/sun.net.www.protocol.http=ALL-UNNAMED&lt;/arg&gt;
                                  &lt;arg&gt;--add-exports&lt;/arg&gt;&lt;arg&gt;jdk.unsupported/sun.misc=ALL-UNNAMED&lt;/arg&gt;
                              &lt;/compilerArgs&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  </code></pre>