Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Annotation Processors

Yeah, can't get it working with Eclipse :\



On Sun, Feb 5, 2017 at 7:22 PM, Anton Tanasenko <atg.sleepless@xxxxxxxxx> wrote:
Did you try (turning it off and on again) forcing maven project update (alt+f5)?

2017-02-05 19:06 GMT+02:00 Dagan Sandler <dagansandler@xxxxxxxxx>:
Hi,
So I'm actually using m2e-apt already, and it's enabled for all projects, but for some reason it's not configuring the project to use the Annotation Processor

I'm really not sure what I'm missing here.


On Sun, Feb 5, 2017 at 2:13 PM, Anton Tanasenko <atg.sleepless@xxxxxxxxx> wrote:
Hey,
M2e does not configure jdt-apt itself (which is a pain to configure manually), but there is m2e-apt [1] which would do that for your.
As its description says, it's not enabled by default, you can either enable it globally in preferences or for each project separately (which is more preferable).

One thing to note though: due to eclipse compiler's incremental nature, some APs might not work properly, especially those that perform some aggregation of annotated classes at the end of processing round.


2017-02-05 13:46 GMT+02:00 Dagan Sandler <dagansandler@xxxxxxxxx>:
Hi,

I am trying to get familiar with writing Annotation Processors and having a difficulty with integration somewhere between maven/eclipse I think.

My setup is like so:
- Project A contains:
   - Annotation -  MyAnnotation
   - Annotation Processor -  MyProcessor
   - Service provider - src/main/resources/META-INF/services/javax.annotation.processing.Processor
This AP simply writes a mandatory warning message when the annotation is used on a class declaration.
The javax.annotation.processing.Processor contains the name of MyProcessor

-Project B contains:
   - Class B - annotated with MyAnnotation

When I compile everything from the command line - it all works well and I can see the warning generated by MyProcessor in the build output

But when I look at eclipse - I see no indication that the annotation processor is running at all. I tried installing Project A to the local repo and use it as a non-workspace dependency, but to no avail. The warning is still not showing.

Can you please help me?
I'll provide sample projects if needed




_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
Regards,
Anton.

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
Regards,
Anton.

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top