Maven or Ivy
Lombok is in maven central with groupId
org.projectlombok
, artifactId
lombok
and version
@VERSION@
.
Full instructions are on the
lombok maven info page.
Javac, netbeans, and most other compilers and tools based on javac
Just put
lombok.jar
on the classpath.
Eclipse and STS (Springsource Tool Suite)
Run
lombok.jar
as a stand-alone java app (i.e. doubleclick it, usually) to open the installer, which will find your eclipse/STS installs automatically.
IDEA IntelliJ
lombok doesn't (yet) work under IntelliJ. We're working on it though!
Javadoc
First delombok your code then run javadoc on the result. See the
delombok feature page for more information.
GWT
When you create a new GWT project, 2 batch scripts are made by the tool (one to run in devmode, one to compile). Open these scripts in an editor and find the
invocation of 'java'. Add the following:
-javaagent:lombok.jar=ECJ
. Then copy
lombok.jar
to your GWT project directory, and add
lombok.jar
to the classpath as usual.
Thanks to Stephan Habermann for figuring this out.
Play! Framework
Play does not run annotation processors of any kind, but Aaron Freeman has made a play plugin to get around this problem. See the
play-lombok plugin for more information.
ecj and other tools based on ecj
Put
lombok.jar
on the classpath and add the following VM parameter when invoking ecj:
-javaagent:lombok.jar=ECJ
.