I use maven to regenerate jars. If I make a change to one project and then do an "mvn install" it'll update the jar file in the local repository. If another idea project makes use of that jar then the editor will now be filled with "Cannot resolve symbol" errors.
Note that that other project will build just fine. I can do a clean rebuild and any changes I've made to the first project will be usable and everything works fine when running the application.
But, the editor is filled with "Cannot resolve symbol" errors. It's a sea of red underlines for every class which was defined in that jar.
I cannot consistently figure out how to get rid of these errors. Some combination of the following seems to do it, but I don't know exactly which has the effect:
- remove the jar from the dependencies then compile then add it back to the dependencies.
- delete target directories
- delete the system directory of idea in the documents and settings
- do a complete rebuild
- rebuild the idea project files.
- exiting idea entirely (not just closing the project)
I'm hoping someone can tell me specifically what I need to do to fix this simply. It's tiring to randomly do those things until these errors finally go away (I have to do this every time I regenerate the jar file).