This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 181355

Summary: Hotfix annotation processors to work in module projects under Maven
Product: platform Reporter: Antonin Nebuzelsky <anebuzelsky>
Component: -- Other --Assignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: normal CC: jtulach, mkleint
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://jira.codehaus.org/browse/MCOMPILER-122
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 203794, 212077    
Bug Blocks:    

Description Antonin Nebuzelsky 2010-03-01 06:15:51 UTC
Milos's findings on the maven-compiler plugin and the annotation processing.

1. -proc and -s <path> switches implemented in current compiler-plugin sources with reasonable defaults for main and test sources..

2. including src/main/resources or target/classes on the -sourcepath doesn't have any effect on annotation processors requiring access to resources like xml schema (@schema2beans) or Bundle.properties files (@EditorActionRegistration). Both require to actually have the resources in the same source tree. That is an issue with the javac compiler, filed by Jesse as #6929404.

For 6.9 we need to hotfix annotation processors to seek in SOURCE_PATH as we do now and if nothing is found there, seek in CLASS_OUTPUT as a fallback.
Comment 1 Jesse Glick 2010-03-01 08:25:04 UTC
LayerGeneratingProcessor workaround works in a unit test at least, and making a similar but untested fix in S2B. core-main #e97fb471102d

Note that JavaHintsAnnotationProcessor and AbstractServiceProviderProcessor also check SOURCE_PATH, but failure to find a resource is in these cases not fatal, so not adding a workaround to them.
Comment 2 Quality Engineering 2010-03-01 22:10:28 UTC
Integrated into 'main-golden', will be available in build *201003020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e97fb471102d
User: Jesse Glick <jglick@netbeans.org>
Log: #181355: if a resource cannot be found on SOURCE_PATH, check also CLASS_OUTPUT. Workaround for javac bug.
Comment 3 Jesse Glick 2010-09-27 20:22:51 UTC
Linking to related Maven compiler plugin issue.