1
votes

My problem is that I have lombok used in my project and intellisense doesn't recoginze it's packages and annotations.

What I have done:

  1. dependency added to maven pom.xml (jar appears in "External Libraries")

  2. lombok plugin installed via "Settings -> Plugins -> Browse repositories"

  3. "Enable annotation processing" enabled in "Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors"

  4. IntelliJ Idea restart with invalidate cache

  5. Project rebuilded

Strange thing is that project get's builded without any errors and works perfectly. I just can't see this package in IntelliJ and it's cumbersome, because a lot of code is "red". My current IntelliJ IDEA version is 2017.3.1. I've looked up in every post simillar to my problem and tried every method (including reinstalling plugin, doing everything again, changing order in things that were done etc.), but it still doesn't work.

1
When you move your mouse cursor over the "red" code, what it says ?whatamidoingwithmylife
On "import lombok.*" it's "Package not found: lombok". On annotations etc. it's "Cannot resolve symbol (..)".Kamil Przybyo
Can you please go here: projectlombok.org/download, download the lombok and manually add it to the libraries, if you don't know how to do it, let me know.whatamidoingwithmylife
@EdinMujakic I did it through "File -> Project Structure". Here I've tried to add it in "Project Settings -> Libraries" and also in "Platform Settings -> Global Libraries". Both cases failed. I've restarted IDE after adding lib, but still everything was red. Is it possible to be lombok plugin version issue? I haven't tried installing other version than this in IntelliJ Idea brwose repository.Kamil Przybyo
Go to Project Structure, Modules, click on Dependencies tab, click on the green + (add) button and select the .jar file you downloaded.whatamidoingwithmylife

1 Answers

0
votes

I've solved issue. The problem Was that IntelliJ Idea mistakenly created projects from my main project and they were in conflict. Under "File -> Project Structure" I had 5 different projects which were created from and they still were included in this one that was separate from them. All I had to do was to delete those wrong projects.