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.
Summary: | Annotation processing doesn't work in Maven projects | ||
---|---|---|---|
Product: | projects | Reporter: | Matthieu.P |
Component: | Maven | Assignee: | Jesse Glick <jglick> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | arittner, dkonecny, jglick, pjiricka, sj-nb, ttfkam |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 178108 | ||
Attachments: |
Sample case
Lombok compilaton error |
Description
Matthieu.P
2010-04-26 08:25:38 UTC
Please be more specific and tell us what exactly doesn't work and what error messages are you getting. For example, @ServiceProvider annotations works OK for me - you just have to specify dependency of version 2.2 or higher of maven compiler plugin, because older versions don't process annotations correctly. Yep sorry i should have been more specific. The issue is with annotation processing inside the IDE (the new feature of 6.9) not at compilation time. When i use Lombok for example, the @Data annotation adds getters and setters for all properties in my class. Those methods appears in the navigator window, and in auto completion on a Java project. Now in my maven project, annotations are not processed and i can't use methods normally added by lombok. This is an IDE related issue i think. (In reply to comment #2) > The issue is with annotation processing inside the IDE (the new feature of 6.9) > not at compilation time. I.e. there is no AnnotationProcessingQueryImplementation in NbMavenProjectImpl.lookup. This also affects the generation of the JPA canonical metamodel, see bug 181861. Created attachment 102289 [details]
Sample case
core-main #8b313154fe61 Integrated into 'main-golden', will be available in build *201010080000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8b313154fe61 User: Jesse Glick <jglick@netbeans.org> Log: #184952: Annotation processing doesn't work in Maven projects Does not work with either 0.9.2 or 0.9.3 in NB 7.0 Beta. Ubuntu 10.10, Sun JDK 1.6.21 All classes annotated with any Lombok annotations (@Data, @EqualsAndHashCode, @ToString) show up with compilation errors. Same code works fine in Eclipse. Will attach screenshot Created attachment 103332 [details]
Lombok compilaton error
Compilation error always shows up on package statement
The code for my project is in git if you want to grab it and try to reproduce it: https://github.com/jacek99/maven-python-mojos/tree/master/maven-python-mojos/maven-bdd-plugin/ This was fixed as bug #192142 post-7.0 beta. *** Bug 186965 has been marked as a duplicate of this bug. *** I still have this issue on NetBeans 7.3.1: Product Version: NetBeans IDE 7.3.1 (Build 201306052037) Java: 1.6.0_43; Java HotSpot(TM) 64-Bit Server VM 20.14-b01 Runtime: Java(TM) SE Runtime Environment 1.6.0_43-b01 Please help ! |