desruisseaux opened a new pull request, #987:
URL: https://github.com/apache/maven-compiler-plugin/pull/987

   In Maven 4, the recommended way to add a JAR on the annotation processor 
classpath is like below:
   
   ```xml
   <project>
     <dependencies>
       <dependency>
         <groupId>org.apache.maven.plugins.compiler.it</groupId>
         <artifactId>annotation-processor</artifactId>
         <version>1.0-SNAPSHOT</version>
         <type>processor</type>
       </dependency>
     </dependencies>
   </project>
   ```
   
   However, Maven Compiler Plugin 4.0.0-beta-3 does not automatically detects 
the processor if it is declared only as above. This commit fixes that issue and 
adds an integration test, together with opportunistic cleaning in other 
integration tests.
   
   In the main time, as a workaround, adding the following configuration seems 
to work, where `org.foo.MyAnnotationProcessor` is the value declared in the 
`META-INF/services/javax.annotation.processing.Processor` file. Note that only 
the processor class is declared, not the artifact coordinates:
   
   ```xml
   <project>
     <build>
       <plugins>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <configuration>
             <annotationProcessors>
               
<annotationProcessor>org.foo.MyAnnotationProcessor</annotationProcessor>
             </annotationProcessors>
           </configuration>
         </plugin>
       </plugins>
     </build>
   </project>
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to