title: Failed to execute maven-compiler-plugin:3.6.1:testCompile when using java 9
body: <p>I know that there are a lot question with similar error. I would appreciate before point as duplicate take in account that it only happens with Java 9.</p>
  
  <p>I do have java 9 installed</p>
  
  <pre><code>C:\_pocs\ws_j9\java9-http-client&gt;java -version
  java version "9.0.1"
  Java(TM) SE Runtime Environment (build 9.0.1+11)
  Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
  
  C:\_pocs\ws_j9\java9-http-client&gt;echo %JAVA_HOME%
  C:\Program Files\Java\jdk-9.0.1
  </code></pre>
  
  <p>To make simple the exemplification, if i download a very simple example <a href="https://examples.javacodegeeks.com/core-java/java-9-httpclient-example/" rel="noreferrer">https://examples.javacodegeeks.com/core-java/java-9-httpclient-example/</a> and I try/</p>
  
  <p>mvn clean install package -e</p>
  
  <pre><code>[ERROR] Failed to parse module-info:
  [ERROR] With qdox: null
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.925 s
  [INFO] Finished at: 2018-01-01T23:43:32+01:00
  [INFO] Final Memory: 13M/44M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project http_client: Execution default-testCompile of goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile failed: Failed to parse module-info -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project http_client: Execution default-testCompile of goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile failed: Failed to parse module-info
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
  </code></pre>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.javacodegeeks.java9&lt;/groupId&gt;
      &lt;artifactId&gt;http_client&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;Java9HttpClient&lt;/name&gt;
      &lt;description&gt;Java Http Client example&lt;/description&gt;
      &lt;properties&gt;
          &lt;java-version&gt;1.9&lt;/java-version&gt;
  
          &lt;maven-compiler-plugin-version&gt;3.6.1&lt;/maven-compiler-plugin-version&gt;
          &lt;maven-shade-plugin-version&gt;3.0.0&lt;/maven-shade-plugin-version&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${maven-compiler-plugin-version}&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${maven-shade-plugin-version}&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java-version}&lt;/source&gt;
                      &lt;target&gt;${java-version}&lt;/target&gt;
                      &lt;verbose&gt;true&lt;/verbose&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;transformers&gt;
                                  &lt;transformer
                                      implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                                      &lt;mainClass&gt;com.javacodegeeks.java9.http_client.Main&lt;/mainClass&gt;
                                  &lt;/transformer&gt;
                              &lt;/transformers&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I am bit confused what could be causing this issue. On top of this, I am facing another challenge that make it a bit harder for someone trying to use Java 9 for first time: my Eclipse isn't properly accepting Java 9. I tried install Java 9 Support in Eclipse Oxygen which I just downloaded it but I am getting "No repository found at <a href="http://download.eclipse.org/eclipse/updates/none" rel="noreferrer">http://download.eclipse.org/eclipse/updates/none</a>". And I can't make this mvn plugin update the Java version to 9 (it used to work properly for Java &lt; 1.8:</p>
  
  <pre><code>    &lt;properties&gt;
          &lt;java-version&gt;1.9&lt;/java-version&gt;
  ...
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java-version}&lt;/source&gt;
                      &lt;target&gt;${java-version}&lt;/target&gt;
                      &lt;verbose&gt;true&lt;/verbose&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>That is the reason I am trying to compile straich from command line.</p>
  
  <p>I read that Java 9 came with new concept of modularity which will help us better organize the packages but I am very limeted if this could drive me to fix my issue. It might be some obvious solution whe someone sees "Failed to parse module-info" but I can't imagine anything usefull to try.</p>
  
  <p>My straight question is what I could check in order to compile. An additional trick regard making Eclipse Oxygen current version compatible with Java 9 will be appreciatte as well.</p>
  
  <ul>
  <li>Edited</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/rhawH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rhawH.png" alt="enter image description here"></a></p>
  
  <p>Eclipse version downloaded for Windows less than 24 hours ago:</p>
  
  <p>Eclipse Java EE IDE for Web Developers.</p>
  
  <p>Version: Oxygen.2 Release (4.7.2)
  Build id: 20171218-0600</p>
  
  <ul>
  <li>Edited second time</li>
  </ul>
  
  <p>After I changed from 1.9 to 9 the red error icon was gone and I have now Java 9. Nevertheless, now I got this error:</p>
  
  <pre><code>[ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
  [INFO] 1 error
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.542 s
  [INFO] Finished at: 2018-01-02T05:19:30+01:00
  [INFO] Final Memory: 9M/30M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project http_client: Compilation failure
  [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
  </code></pre>
  
  <p>Which doesn't make sense to me because:</p>
  
  <p><a href="https://i.stack.imgur.com/q6fcu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/q6fcu.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>Edited third time</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/F2CIo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/F2CIo.png" alt="enter image description here"></a></p>