I know, it's an old one

98 views
Skip to first unread message

Roberto Lo Giacco

unread,
Mar 29, 2021, 12:54:58 PM3/29/21
to Project Lombok
But believe me, I've already tried any option easily searchable on the Internet.

So, the problem is Eclipse is building a "lobokized" project with no issues, but I keep getting the daring "Unresolved compilation problems" whenver I try to run the unit tests.

My project is a maven multimodule project loaded in Eclipse STS4 (always lates update) using lombok 1.18.18 (but I also tried 1.18.16 and 1.18.12 and some odler versions) and yes, I have the right version of lombok installed and Eclipse restarted accordingly.

Running an Eclipse clean helps every now and then, but mostly doesn't.  I'm using OpenJDK 11.0.3, but I've set both Maven and Eclipse to build for Java 8.
I've tried to sync Maven and Eclipse (via the ALT + F5 Maven Update command), but without much joy.

On of the most interesting things is the Eclipse outline shows correctly the generated classes and methods, but somehow the JUnit runner doesn't... did I say the compilation is fine and the error shows up only when running the test?

As I'm building a spring-boot application I don't deploy the web app via Eclipse, so I can't tell if "running" the applications does end up in the same way, but definitely I'm more than able to run the tests via maven (even without performing a clean) but totally unable to run them via Eclipse.

Anyone willing to provide some help? Sadly I'm not authorized to share the project I'm working, but I can pull up a sample project if needed, even if I hardly believe it will be reproducible.

I tried to blame any plugin I could have installed, but the only one I believe might be related (EclEmma as that introduces Jacoco, another agent) doesn't seem to have much to do with my issue.

It's frustrating.... I would really appreciate any help

Daniel López

unread,
Apr 2, 2021, 3:13:53 PM4/2/21
to project...@googlegroups.com
Have you tried playing with the "Annotation processing" options of the Eclipse settings? They already say the build results might differ from the Maven results.
I've experienced "Unresolved compilation problems" before, but not just in the tests. I've had other issues with Eclipse regarding that, as it puts the test dependencies also in the MAVEN_DEPENDENCIES so it makes the available for regular classes, and then when you try to run the app you discover you don't really have the dependency available, but again, not with Lombok.
I would also check if the errors view shows some info, sometimes you can see there errors that happen in the internals of Eclipse (like when Lombok/Mapstruct don't play well with each other).

I can't talk much about STS, I use plan Eclipse even if developing Sprinb Boot apps, after suffering from unexpected problems different from the base product, so one test would be to download a plain Eclipse Java version and see if the same thing happens wih a vanilla version of that with no plugins.

Sorry I can't really be of much help,
Good luck,
D.

--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/project-lombok/e7fc2724-0cf9-4614-8095-08d409d8af4en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages