Reputation: 20330
I created a maven project with lots of external dependencies. I was able to build it fine. Then I installed new SNAPSHOT of dependency into my local maven repository.
First maven itself was not picking up latest SNAPSHOT. I deleted the old SNAPSHOT. This caused maven to pick up the new SNAPSHOT and I was able to compile against new jar from mvn
command line but now IntelliJ
is not recognizing any of my imports and I cannot build from IntelliJ
(although mvn package works).
How to fix this? If I create a brand new project from same sources in a new folder then IntelliJ
works.
Upvotes: 0
Views: 362
Reputation: 450
In the upper left corner, right-click on your project and re-import Maven. That sometimes works for me. In some cases even that fails, and honestly I've just gone into the M2 repository (~/.m2), and deleted all copies of that particular library. That forces a rebuild as well and seems to work.
I'll be curious to see if someone has a better answer ...
Upvotes: 1