Maven dependency on lombok on parent pom?

445 views
Skip to first unread message

moilejter

unread,
Oct 25, 2018, 4:39:51 PM10/25/18
to Project Lombok
Hi!  This may be an obvious question - but I don't see it :-(.
We are about to start using Lombok on our projects, and so I've been setting up workspace that uses it.
I tried putting the Maven dependency on Lombok in the <dependencies> section on the parent pom, then inherit it into child projects - but when I do that, Eclipse doesn't seem to realize it has to run Lombok within each child project.
OTOH, when I put the Maven dependency in each child project, then Eclipse does the right thing.

Is there a way to put that Maven dependency on the parent pom, so that I don't have to configure it explicitly in all of the children?

Thank you!

Moises

Reinier Zwitserloot

unread,
Oct 26, 2018, 8:06:31 AM10/26/18
to Project Lombok
As long as you installed lombok into your eclipse (double click the lombok jar), eclipse will apply lombok properly... but you will still get red wavy underlines beneath all your references to lombok types (such as 'lombok.Value') if they aren't on the build path.

The part where lombok is different from libraries is the 'apply the changes' bit, which is entirely classpath agnostic. It either works for everything that eclipse installation ever touches, or it works for nothing.

Given that it seems to work fine for the main project, it's gotta be the classpath thing. Which means lombok is not special, and therefore it's simply a problem of inheriting dependencies in maven.

I unfortunately don't have any particular experience on that one :(

Jan Materne

unread,
Oct 26, 2018, 8:09:45 AM10/26/18
to project...@googlegroups.com
When adding to the dependency Sektion you should run a Maven build. When using Eclipse you should install Lombok. DoubleClick in Thema hat and follow the gui.

Jan 

--
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.
Reply all
Reply to author
Forward
0 new messages