[ 
https://issues.apache.org/jira/browse/QPID-7321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986309#comment-15986309
 ] 

Keith Wall commented on QPID-7321:
----------------------------------

To be safe for incremental compilation the processor 
(org.apache.qpid.server.plugin.PluggableProcessor#getPluggableTypes) needs a 
way to discover all the implementations which may be across different packages 
within the module including those that aren't being compiled.   I don't yet see 
a way to get the javax.annotation.processing.Processor API to walk the package 
tree.     There is a second problem too. I can't seem to get the 
{{javax.annotation.processing.Filer}}/{{javax.tools.FileObject#delete}}  to 
delete the existing services file.   Calling 
{{javax.annotation.processing.Filer#createResource}} seems to partially 
overwrite the existing contents with the new.  I guess this is the problem you 
saw.


> [Java Broker] Annotation processing on partial builds can produce incorrect 
> META-INF/services files
> ---------------------------------------------------------------------------------------------------
>
>                 Key: QPID-7321
>                 URL: https://issues.apache.org/jira/browse/QPID-7321
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Rob Godfrey
>            Priority: Minor
>             Fix For: qpid-java-broker-7.0.0
>
>
> The annotation processors which generate META-INF/services files work from 
> the list of classes passed to them by the compiler.  In the case of partial 
> compilations (where only modified files are compiled) this can lead to the 
> services files containing only the modified classes rather than all the 
> available implementations.
> Changes should be made to the annotation processor so that where there is an 
> existing services file we do not remove listings of classes that have not 
> been updated



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to