jkuhn1 opened a new pull request #40:
URL: https://github.com/apache/maven-compiler-plugin/pull/40


   Hi,
   
   I've ran into the same issue and I've been able to reproduce it (see 
MCOMPILER-272 integration test) and provide a working fix. 
   
   The issue was located in 
org.apache.maven.plugin.compiler.AbstractCompilerMojo#resolveProcessorPathEntries(),
 looking at the code, we could see that after the first loop on the annotation 
processor paths, a single call is made to the repository system in order to 
retrieve dependencies for all annotation processor paths including transitive 
dependencies which is not really intuitive but the trick used to make it work 
was to consider the first required artifact as the artifact in the request and 
set the complete list of required artifacts as artifact dependencies.
   
   Unfortunately, this doesn't always work, if we specify two annotation 
processor path, let's say 'processor1' and 'processor2' in that order such as 
'processor2' depends on 'processor1', the transitive dependencies of 
'processor2' are not resolved. My guess is that somehow the repository filter 
out them due to this dependency between 'processor2' and 'processor1', I didn't 
look further because a proper solution was to simply make independent requests 
for each unique annotation processor paths declared in the configuration.
   
   Please let me know if this is clear for you or if I miss something.
   
   Regards
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [X] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MCOMPILER) filed 
          for the change (usually before you start working on it).  Trivial 
changes like typos do not 
          require a JIRA issue.  Your pull request should address just this 
issue, without 
          pulling in other changes.
          
[MCOMPILER-272](https://issues.apache.org/jira/projects/MCOMPILER/issues/MCOMPILER-272)
    - [X] Each commit in the pull request should have a meaningful subject line 
and body.
    - [X] Format the pull request title like `[MPH-XXX] - Fixes bug in 
ApproximateQuantiles`,
          where you replace `MPH-XXX` with the appropriate JIRA issue. Best 
practice
          is to use the JIRA issue title in the pull request title and in the 
first line of the 
          commit message.
    - [X] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [X] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
          be performed on your pull request automatically.
    - [X] You have run the integration tests successfully (`mvn -Prun-its clean 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [X] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   


----------------------------------------------------------------
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.

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


Reply via email to