Maven is not generating code into class file

601 views
Skip to first unread message

AlexHerold

unread,
Jul 2, 2018, 8:21:09 AM7/2/18
to Project Lombok
Hi there,

I am a long time user of projekt lombok and never had any problem using it.. until now.

I have added the needed maven dependency as useual to the pom file and also set up the Lombok plugin for IntelliJ.
Then I created a simple DTO and added the @Data annotation to it. After that I created a simple test to verify everything is working. 
Plain and simple. 

So far everything works as excepted until start the maven build.

The UnitTest fails becauce the compiler says "cannot find symbol" and rightfully so. I checked the generated class file and there is not getter or setter.
The annotation has been removed as expected but nothing else happend.

I assume that there might other dependencies in the pom file that interfere. 
Cloud somebody please help me? 

Greeting, Alex

Daniel López

unread,
Jul 2, 2018, 10:49:27 AM7/2/18
to project...@googlegroups.com
They probably need at least the Lombok, Maven and JDK version to get an idea of what's going on. Without that it's like shooting in the dark... blindfolded ;).

I'ts never happened to me like that in all the years I've been using it, so no clue.
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.
For more options, visit https://groups.google.com/d/optout.

Roel Spilker

unread,
Jul 2, 2018, 5:47:44 PM7/2/18
to Project Lombok
I suggest you check your latest commits for static imports.

For some reason, static imports are resolved before annotation processors are invoked. And if there is an error with them, lombok will not run, Even if running lombok would resolve those errors.

If this solves you problem, please let us know.

AlexHerold

unread,
Jul 5, 2018, 11:19:23 AM7/5/18
to Project Lombok
Hi again,

this is what I am using.
Lombok: 1.18.0
Maven: 3.5.2
JDK: 8_u162

For testing/to assure me sanity I created an emtpy project with just one DTO and the @Data annotation. The test worked. But the original project still does not work.

I will check the static import lead. I think it is either that or there is something wrong with the pom-file.

If you got futher ideas let me know :)

AlexHerold

unread,
Jul 10, 2018, 6:15:20 AM7/10/18
to Project Lombok
I check for static imports. It does not seem to be the issue. 
I created a new DTO with just one private field and wrote a unit test for it. There were no static imports of the class in the test or in the DTO. It did not work.

We got two annotation processors in our pom file: 
com.querydsl.apt.jpa.JPAAnnotationProcessor
org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor

Could they be reason?

Reinier Zwitserloot

unread,
Jul 17, 2018, 3:36:26 PM7/17/18
to Project Lombok
possible, but I have no idea where to even begin to help you out on this. I don't think there's much we can do unless you make a complete, stand-alone, smallest possible test case. Include whatever dependencies you have to include to make it fail.
Reply all
Reply to author
Forward
0 new messages