In my Maven based project I'm using Lombok to save some boilerplate code. Furthermore I'm using a Spring Data library which uses AspectJ to get things done. Sadly, Lombok and AspectJ don't play nicely together out of the box, as the AspectJ compiler recompiles the Java files. So the implemented Getter and Setters of Lombok are lost.
I decided to delombok my code using the Lombok Maven plugin. This code is then passed to AspectJ. This is the basic flow:
Sources in /src/main/java or /src/test/java
=> [Delombok]
=> Delomboked sources in /target/generated-sources/delombok or /target/generated-test-sources/delombok
=> [AspectJ]
=> Compiled results in /target/classes or /target/test-classes
However, one downside to this approach: I seem to have lost debug support using IntelliJ. Breakpoints set in a /src/main/java or /target/generated-sources/delombok Java file are never hit. I run the project using the IntelliJ Maven plugin, selecting a lifecycle item (e.g. "test"), the debug hooks. Sadly, the breakpoints are never hit.
What can be done to get back debugging support?
I didn't find a solution. Thus, I delomboked the source code and done it with plain vanilla Java... sad :-(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With