Intellij not resolving maven dependencies

Answered

I am using intellij to build my maven project. the project build successfully and run the problem is that intellij is not resolving my dependencies.I tried to restart but the problem is not being resolved. I also tried to clean the logs but no luck. Please assist

21 comments
Comment actions Permalink

IntelliJ IDEA 2019.1 (Ultimate Edition)
Build #IU-191.6183.87, built on March 27, 2019
************************
JRE: 1.8.0_202-release-1483-b39 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.4

 

that is the version of my intelliJ

0
Comment actions Permalink

Can you resolve the dependencies using maven from the command line?

If you are behind a proxy or go via a corporate maven repo you will have to edit your maven settings file (~/.m2/settings.xml)

0
Comment actions Permalink

i did all that but still is not resolved

0
Comment actions Permalink

that's how my maven settings looks like

0
Comment actions Permalink

Hold on, how is your project building successfully and running if the dependencies aren't resolved?

If your dependencies weren't resolved you wouldn't be able to compile.

What do you actually mean by "intellij is not resolving my dependencies"?

0
Comment actions Permalink

 

intelliJ is not picking up those methods and it looks like they dnt exist but they do exists

0
Comment actions Permalink

it's highlighting my class with a red lines

0
Comment actions Permalink

You could try File - Invalidate Caches/Restart although be aware that also removes your local history I think

0
Comment actions Permalink

this are all the commands I tried but still no luck

* Configuration (idea.config.path):
~/Library/Preferences/<PRODUCT><VERSION>
* Caches (idea.system.path):
~/Library/Caches/<PRODUCT><VERSION>
* Plugins (idea.plugins.path):
~/Library/Application Support/<PRODUCT><VERSION>
* Logs (idea.log.path):
~/Library/Logs/<PRODUCT><VERSION>

0
Comment actions Permalink

Please share IDE log folder zipped and if possible a sample project.

For uploading you can use ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com or any file sharing service.

Try with all custom plugins disabled and re-create project configuration by re-importing the project completely from Maven pom.xml file via File | New | Project from Existing Sources and selecting main parent pom.xml file to import from.

0
Comment actions Permalink

@Andrey Dernov i have shared my IDE log

0
Comment actions Permalink

IntelliJIdea2019.1.zip is the name of my IDE log

 

0
Comment actions Permalink

No obvious cause seen in logs. There are however errors related corrupted caches or IDE configuration.

Try close the IDE, delete the /Users/abrmagp/Library/Caches/IntelliJIdea2019.1/ directory, start IDE and re-import project from scratch as Maven project as advised. Make sure the import process competed successfully and that you can build the project by IDE (Build | Rebuild Project action).

0
Comment actions Permalink

ok let me try that

0
Comment actions Permalink

still the same issue

0
Comment actions Permalink

For which symbols do you get "red highlighting" problem? From the attached screenshot it does not look to unresolved Maven dependencies but to unresolved local variables (it does not look related to Maven). Can you share a project to check?

0
Comment actions Permalink

the think the problem is that is failing to pull Lombok dependency

0
Comment actions Permalink
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>

And I specify it on the pom
0
Comment actions Permalink

>the think the problem is that is failing to pull Lombok dependency

What makes you think that? Do you see this dependency in Dependencies tab for the module? Can you build project via Build | Rebuild Project action?

Do you use Lombok-generated code? Have you tried lombok plugin?

0

Please sign in to leave a comment.