Where do I drop the Lombok.JAR file to get it to work with Intellij 12.4.6?
Trying to get lombok working with Intellij. Plugin installed, Intellij says everything's hunky-dory - but no Lombok annotations are working. Do I need to drop LOMBOK.JAR in the Java/bin directory, the Idea/bin directory, the Idea/lib directory..... ????
Any help is appreciated...
请先登录再写评论。
lombok.jar should be in classpath of your application. You don't need to put it anywhere else!
What kinf of problems do you have? Are you using something else as just java compiler? (Like ecipse or aspectj compiler?)
I'm not using anything weird, just Intellij, Maven and the JDK.
What is the classpath of the application, though? In this case, the application seems to be IntelliJ itself. There's no clear answer that I can find on how to "install" Lombok so that Intellij will spot it. Either I'm missing something very basic (which is certainly possible) or else there is a gap in the documentation.
Here's what I mean: The Lombok documentation says to put the jar "in the classpath." There is no "classpath" for Intellij as far as I can tell. Do I just add the Lombok jar to each project manually as a Maven dependency (I use Maven for my projects.) If so, will this be enough to tell Intellij that it should use Lombok as well?
It seems wrong to include the Lombok jar in every project as a dependency since it's a build-time thing, and doesn't need to go into the end product JAR or WAR. But I can't find any other way to make this work.
Is it really the case that Lombok has to be added into every project manually?
If you use maven, you just have to add lombok dependency to your project.
In Intellij self you only need to install the lombok-intellij-plugin from plugin-repository.
No, it is right. Simple use "provided" scope.
Just read the documention of lombok self: http://projectlombok.org/mavenrepo/index.html