title: maven-compiler-plugin 3.6.0 doesn't compile generated sources from annotations
body: <p>We just upgraded our JBoss from 6.1.0 to Wildfly 10.1, and made a variety of associated upgrades to modules and artifact versions and so on. In one module this caused our cobertura compiles to fail with a compiler error. I found <a href="https://stackoverflow.com/questions/31891219/illegalstateexception-in-hibernate-metamodel-generation-with-maven">IllegalStateException in Hibernate metamodel generation with maven</a> and upgraded to maven-compiler-plugin 3.6.0 (from 3.1). This seemed to resolve my problem, but only on a local basis. I can compile the module for cobertura, but it turns out to cause a new problem.</p>
  
  <p>Some of the annotation-generated sources for this module are used by another module, and the class files aren't found. What changed? The generated-sources directory contains the java files, but the classes aren't compiled.</p>
  
  <p>It looked at one point like changing the build-helper phase to generate-sources from process-sources helped, but that failed subsequently.</p>
  
  <p>Is there something else that needs to be changed because of changes between 3.1 and 3.6.0? (I'm not familiar with how to process annotations - I'm just the Cobertura support guy.)  </p>
  
  <p>pom file:</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;description&gt;The JPA entities for the Element Manager&lt;/description&gt;
  
  &lt;artifactId&gt;em-model&lt;/artifactId&gt;
  &lt;groupId&gt;com.myprod.em&lt;/groupId&gt;
  
  &lt;parent&gt;
      &lt;artifactId&gt;em&lt;/artifactId&gt;
      &lt;groupId&gt;com.myprod&lt;/groupId&gt;
      &lt;version&gt;3.5.0.0.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;
              &lt;executions&gt;      
                 &lt;execution&gt; 
                    &lt;phase&gt;process-sources&lt;/phase&gt;
                    &lt;configuration&gt;
                       &lt;sources&gt;
                           &lt;source&gt;${project.build.directory}/generated-sources/annotations&lt;/source&gt;
                       &lt;/sources&gt;
                    &lt;/configuration&gt;
                    &lt;goals&gt;
                       &lt;goal&gt;add-source&lt;/goal&gt;
                    &lt;/goals&gt;
                 &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;        
  
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;configuration&gt;
                  &lt;finalName&gt;em-model&lt;/finalName&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
                 &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                 &lt;configuration&gt;
                    &lt;compilerArgument&gt;-proc:none&lt;/compilerArgument&gt;
                 &lt;/configuration&gt;
                 &lt;executions&gt;
                    &lt;execution&gt;
                       &lt;id&gt;run-annotation-processors-only&lt;/id&gt;
                       &lt;phase&gt;generate-sources&lt;/phase&gt;
                       &lt;configuration&gt;
                          &lt;compilerArgument&gt;-proc:only&lt;/compilerArgument&gt;                            
                       &lt;/configuration&gt;
                       &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                       &lt;/goals&gt;
                    &lt;/execution&gt;
                 &lt;/executions&gt;  
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;        
  &lt;/build&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
          &lt;artifactId&gt;javax.el&lt;/artifactId&gt;
          &lt;version&gt;3.0.1-b08&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.spec.javax.ejb&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-ejb-api_3.2_spec&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Since hibernate validator is used in unit tests, 
           these JBoss logging deps are needed --&gt;        
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-jboss-logmanager&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;    
      &lt;/dependency&gt;
       &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.logmanager&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-logmanager&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;version&gt;1.8.5&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;1.3.2&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;    
      &lt;dependency&gt;
          &lt;groupId&gt;com.myco.csp&lt;/groupId&gt;
          &lt;artifactId&gt;nrp_jpa&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.myco.cim&lt;/groupId&gt;
          &lt;artifactId&gt;cs_cim_jpa&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
             &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
             &lt;artifactId&gt;hibernate-jpamodelgen&lt;/artifactId&gt;
             &lt;version&gt;1.0.0.Final&lt;/version&gt;
             &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Test --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mockito&lt;/groupId&gt;
          &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.myco.logging&lt;/groupId&gt;
          &lt;artifactId&gt;logging-client&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;apache-log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.myprod.prodCommon&lt;/groupId&gt;
          &lt;artifactId&gt;unit-test-utils&lt;/artifactId&gt;
          &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>