Reputation: 637
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
Upvotes: 13
Views: 19853
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
Reputation: 842
Re imported and restart(Invalidate Caches / Restart) the IntelliJ. that was working
Upvotes: 7
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
Reputation: 31
Just rebooting IntelliJ did the trick for me. Simple but effective.
Upvotes: 0
Reputation: 11
You can do File-> Invalidate Caches/Restart... The errors will be gone after IntelliJ restarts.
Upvotes: 0
Reputation: 7424
Had the same issue.
Instead of
File > Open
used
File > New > Import from Existing Sources
and it worked
Upvotes: 0