[ 
https://jira.codehaus.org/browse/MCOMPILER-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=363715#comment-363715
 ] 

Thomas Broyer commented on MCOMPILER-122:
-----------------------------------------

This is a bad idea IMO.

First, annotation processors shouldn't depend on non-java inputs, because 
JSR-269 doesn't allow you to track dependencies of generated 
sources/classes/resources to anything else than "elements": 
http://docs.oracle.com/javase/7/docs/api/javax/annotation/processing/Filer.html 
(File#getResource is rather meant to read resources that were previously 
generated by File#createResource, but should still be used with care).

Also, including target/classes to sourcepath could lead to classes being 
compiled or recompiled when they shouldn't (when you have *.java files as 
resources but not sources). Fortunately, there'd be an easy workaround here: 
exclude *.java files from project.build.resources and use 
resources:copy-resources after the compile phase to copy the *.java files; 
that'd still be a hack if you ask me.

> -sourcepath shall include resources
> -----------------------------------
>
>                 Key: MCOMPILER-122
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-122
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Milos Kleint
>
> annotation processors which load non-Java resources from the sourcepath, will 
> currently get only the src/main/java folder.
> Unfortunately just adding src/main/resources to -sourcepath does not suffice, 
> due to a bug in javac:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6929404
> see MCOMPILER-98 for more



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to