How to make Lombok and AspectJ work together?

Eric B. picture Eric B. · Sep 18, 2014 · Viewed 10.8k times · Source

I just finished posting this issue on SO about Lombok not generating my getters/setters. It turns out that it is conflicting with AspectJ. If I disable AspectJ, then the getters/setters are appropriately generated.

My guess is that the ajc compiler is not able to recognize lombok.

Are Lombok and AspectJ mutually exclusive? Do both technologies work together?

Answer

kriegaex picture kriegaex · Oct 2, 2014

The current answer according to AspectJ maintainer Andy Clement is that there are problems due to ECJ (Eclipse Compiler for Java) packages being included and renamed in the AspectJ compiler infrastructure.

For more information there is ongoing discussion between Eric B. and A. Clement on the AspectJ users mailing list:

Maybe we can close the issue here with this answer and report back when the problem is solved.