title: Spring Boot 2 + Java 9 + Querydsl
body: <p>I have successfully updated my application (Spring Boot + Java + Maven) to Spring Boot 2. Now I'm trying to update to Java 9.</p>
  
  <p>According to Nicolas Fränkel's blog post (<a href="https://blog.frankel.ch/migrating-to-java-9/1/" rel="noreferrer" title="Migrating a Spring Boot application to Java 9 - Compatibility">Migrating a Spring Boot application to Java 9 - Compatibility</a>) I accomplished to update to Java 9 without using a module-info file. But when I create such a file, the apt-maven-plugin gets stucked on creating the Q-types.</p>
  
  <p>Has anyone successfully completed using Java 9 + Maven + Querydsl?</p>
  
  <p>My Maven configuration for the apt-maven-plugin looks as follows:</p>
  
  <pre><code>     &lt;plugin&gt;
          &lt;groupId&gt;com.mysema.maven&lt;/groupId&gt;
          &lt;artifactId&gt;apt-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
          &lt;executions&gt;
             &lt;execution&gt;
                &lt;goals&gt;
                   &lt;goal&gt;process&lt;/goal&gt;
                &lt;/goals&gt;
                &lt;configuration&gt;
                   &lt;outputDirectory&gt;target/generated-sources/java&lt;/outputDirectory&gt;
                   &lt;processor&gt;com.querydsl.apt.jpa.JPAAnnotationProcessor&lt;/processor&gt;
                &lt;/configuration&gt;
             &lt;/execution&gt;
          &lt;/executions&gt;
       &lt;/plugin&gt;
  </code></pre>
  
  <p>When I run <em>mvn generate-sources</em>, the plugin only prints a bunch of error messages, generates no classes and reports success:</p>
  
  <pre><code>$ mvn generate-sources
  ...
  [INFO] --- apt-maven-plugin:1.1.3:process (default) @ app ---
  .../src/main/java/module-info.java:9: error: module not found: java.validation
     requires java.validation;
                  ^
  .../src/main/java/module-info.java:13: error: module not found: hibernate.jpa
     requires hibernate.jpa;
                       ^
  ...
  21 errors
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3.484 s
  [INFO] Finished at: 2018-04-01T13:11:25+02:00
  [INFO] ------------------------------------------------------------------------
  </code></pre>