Lombok Issue In IntelliJ - intellij-idea

I have lombok plugin installed on Mac IntelliJ, but for some reason my intelliJ not finding log.info or other logger methods,
i verified the below settings, looks good.
Lombok annotations do not compile under Intellij idea
i reinstalled my lombok, and cleared cache and reset it, though no luck. I have re-installed IntelliJ.
I've cleared few setting under "~/Library/Preferences" too. Not working any suggestion?

I primarily use Lombok for auto generating the getters,setters, toString etc. Even though you have downloaded it as a plugin, have you imported it in your pom.xml if you are using Maven project?
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>

my intelliJ creates main.iml and test.iml after import. After removing those files, works fine. Thanks for your inputs.

Related

intellij doesnt recognize lombok generated methods from #Data annotation

I'm using IntelliJ 2018.3.
I have Lombok plugin installed, and I have Annotation Processing enabled.
The plugin version is the latest as well.
The problem is that Intellij doesn't recognize the generated methods from lombok.
Gradle build is passing so the problem is in IntelliJ.
How can I fix that problem :) ?

how to compile project without using Lombok plugin in intellij IDEA

i have some restriction to download the plugins for intellij.
In this case how can i compile my app using lombok.
i have tried to paas lombok jar through VM options in run configuration but no luck. any suggestion will be appreaciated.
You can still use Lombok in your code, provided you instructed your build tool to have a build-time dependency.
Without the Plugin, that will result in a lot of red wavy underlines in IntelliJ. But the code would still compile and run.
Disclosure: I am a Lombok developer.

IntelliJ not reflecting Maven dependencies

I recently updated my IntelliJ and I am having a problem with it showing import statements as nonexistent in the classpath despite the project building fine by doing mvn clean [install|verify] from the command line and the software actually works. So the dependencies are certainly there but the IDE seems to have a bug synchronizing against the pom file. I have tried to Maven --> Reimport multiple times, without success.
Considering that I recently updated IntelliJ (the version is as of 7/15/2017), could this be a newly introduced bug and is there a workaround?
The problem may be caused by a known bug in Maven integration which affects 2017.2 version. This bug is fixed in 2017.2.1 version.
You can find out if it's the case of your problem by searching idea.log for:
java.lang.AbstractMethodError: org.jetbrains.idea.maven.server.embedder.CustomModelValidator$ProxyModelProblemCollector.add(Lorg/apache/maven/model/building/ModelProblemCollectorRequest;)V

intellij JavaDoc browser plugin can't find javax

I'm on Arch linux x64 machine , I installed intellij idea but whenever I open a project a startupabortedexception occurs with the JavaDoc browser plugin.
I looked into my idea.log and figured out that it can't find javax.servlet.Servlet, I disabled the plugin in order to open a java project and indeed when I type import javax; it says it can't find javax.
I have java-openjfx installed and still intellij can't find it, what to do in this case ? .
Environment information
jdk:openjdk 1.8.0_60 64 bit.
intellij version: 14.1.5 community edition.
Goal
My goal is to get the JavaDoc browser plugin to work not to program in javax.servlet, I don't intend to do any web development with java right now.
If you don't have Maven project, you can just add the jar to the project. The one you are missing can be downloaded from:
http://mvnrepository.com/artifact/javax.servlet/javax.servlet-api/3.1.0
(just click "Download (JAR)" button)
The class javax.servlet.Servlet is not part of the standard JDK, it is part of the JEE, so you have to add servlet-api.jar to your classpath.
If your project is a Maven project you add the dependency like this:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
And you probably want to add
<scope>provided</scope>
as this dependency is most likely present in your application server.

How to add Java EE Servlet API library on your compile classpath in IntelliJ

I am new to IntelliJ and I have been working on a few small projects to familiarize myself with IDE and how to develop Java web projects with it.
I recently picked up Professional Java for Web Applications to practise my web development skills and I wanted to try it because it focuses on IntelliJ rather than Eclipse.
My main issues are from not knowing my way around the IDE at all. I have come across a problem that I have been unable to figure out how to do correctly.
How do you add Java EE Servlet API library on your compile classpath ?
Where is the compile classpath located in IntelliJ ?
Any help is appreciated!
This depends on how you are managing dependencies in your project.
If you are using Maven simply add it as a dependency in your pom.xml. When IDEA sees a maven based project it will over for you to Import Changes and/or Enable Auto Import. A common JavaEE 7 maven dependency would look like this in your pom.xml:
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
If you are only using an IDEA project to manage things (vs. maven, gradle etc.) then you can go into the project structure dialog, click on modules and select the module containing your web tier code. Then click on the dependencies tab. Then click on plus button (+) and add a JAR, then navigate to the JAR containing the servelet APIs that is bundled with your application server and select that.
There are another half dozen ways to set this up and exactly which one you choose depends on a lot of factors like how you want to manage provided dependencies in your project etc. Either of these methods should get you on your way though.