user3426603
user3426603

Reputation: 637

IntelliJ IDEA does not recognise maven dependencies (omitted for conflict with ...)

I loaded a Maven project in IntelliJ IDEA, when I run 'mvn clean package' in the terminal, it works fine, but IntelliJ IDEA can not debug or build it and in the UI, maven project tab, shows the following (red line on dependencies):

omitted for conflict with STH

enter image description here How should I fix it?

Upvotes: 13

Views: 19853

Answers (6)

Sunil N
Sunil N

Reputation: 51

Check if the jar is downloaded in m2 folder , if it is downloaded and its not showing in intellij then add the same maven dependency in module where you are trying to use the classes in the jar.

Upvotes: 0

Rajitha Bhanuka
Rajitha Bhanuka

Reputation: 842

Re imported and restart(Invalidate Caches / Restart) the IntelliJ. that was working

enter image description here

Upvotes: 7

cajo
cajo

Reputation: 1

I had the same issue with an old project of mine which was developed with Eclipse. I had to go to switch to an older version of maven and not the build-in version from intelliJ. settings > maven > change maven home directory

Upvotes: 0

Seadrill
Seadrill

Reputation: 31

Just rebooting IntelliJ did the trick for me. Simple but effective.

Upvotes: 0

sarathezil
sarathezil

Reputation: 11

You can do File-> Invalidate Caches/Restart... The errors will be gone after IntelliJ restarts.

Upvotes: 0

Horatiu Jeflea
Horatiu Jeflea

Reputation: 7424

Had the same issue.

Instead of

File > Open

used

File > New > Import from Existing Sources

and it worked

Upvotes: 0

Related Questions