Can not make it work with Eclipse Kepler

2,591 views
Skip to first unread message

Petr Gladkikh

unread,
Sep 10, 2013, 1:53:24 AM9/10/13
to project...@googlegroups.com
Hello,

I want to introduce project-lombok in our project but can not do so before I make sure that it works with Eclipse since it is used by majority of our developers.
I tried using preprocessor with "plain" Maven and maven project in IntelliJ Idea by adding it to Maven dependencies and it worked as promised (thanks to javac recognizing META-INF in class path?).

However I could not made it work with Eclipse. 
Configurations tried:
* Plain Eclipse with preprocessor enabled in project properties
* Eclipse after running lombok installer with lombok in dependencies
* Eclipse with Maven project with lombok in classpath, and plain project with lombok.jar in classpath (did not expext this to work however, since javac is not used anyway)

None of these worked. My environment is OpenJDK 7, Eclipse Kepler, Linux, tried 0.12.0 and 0.9.3 (latter produces errors former just does nothing under Eclipse).

I can not figure what I did wrong or maybe this configuration has not been tried yet.
Besides this the question I am curious most is why does project-lombok needs an installer and adding it's preprocessor to _Eclipse's_ launcher while I need preprocessing my _project's_ classes. I see that this is some hack to make it work with Eclipse but why is it necessary while Eclipse's project settings have options for preprocessor and it seems that preprocessors are supported "out of box". Can I just enable preprocessing in project settings (and maybe adding lombok.jar to preprocessors list)? If so, what's needed to make it work? 

And while I am at it, what is the last stable version of lombok? (I have seen 0.9.3 somewhere but it does not seem to be stable)

Roel Spilker

unread,
Sep 10, 2013, 3:46:12 AM9/10/13
to project...@googlegroups.com
Possibly, the combination you missed is:
- Install Lombok into you Eclipse (stop Eclipse, start Eclipse, check the About Eclipse screen if it is actually active)
- Put Lombok on you classpath (maybe first try without Maven)

In order to use Lombok on Eclipse, you need to both install it AND oput it on the classpath.

Roel



--
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/groups/opt_out.

Petr Gladkikh

unread,
Sep 13, 2013, 1:26:11 AM9/13/13
to project...@googlegroups.com
I'll retry all this again when have spare time.

However there is still a quersion: WHY should I mess with Eclipse launch parameters when Eclipse seems to be supporting annotation processors out-of-box?
Is there a problem with Eclipse that does not work as advertised or lombok implementation have some special quirks that can not be handled by Eclipse?

Martin Grajcar

unread,
Sep 13, 2013, 6:24:18 AM9/13/13
to project...@googlegroups.com
On Fri, Sep 13, 2013 at 7:26 AM, Petr Gladkikh <petr...@gmail.com> wrote:
However there is still a quersion: WHY should I mess with Eclipse launch parameters when Eclipse seems to be supporting annotation processors out-of-box?
Is there a problem with Eclipse that does not work as advertised or lombok implementation have some special quirks that can not be handled by Eclipse?

dxmann73

unread,
Oct 31, 2013, 5:36:22 AM10/31/13
to project...@googlegroups.com
Solution: Put lombok.jar into your eclipse folder (next to eclipse.exe) and add the following to your eclipse.ini: 

-javaagent:lombok.jar
-Xbootclasspath/a:lombok.jar

That worked for me. 

Cheers
David

softweave

unread,
Dec 4, 2013, 7:15:16 PM12/4/13
to project...@googlegroups.com
Running Mac OS 10.9 and SpringToolSuite 3.4.0.RELEASE was able to run lombok.jar and install into STS. The STS.ini contains these entries. However, am still getting numerous errors problems reported within STS from to lombok annotations. Is there a solution?
Reply all
Reply to author
Forward
0 new messages