Maven instal is OK but rebuild does not
Answered
There is a workspace. Its configuration is workable. I've been working with it for the last 2 weeks.
I get fresh code from git.
Then:
-maven build from the command line "mvn clean instal -U" - no errors
- maven build from IDEA - no errors
- "Reload All Maven Projects" in online mode - done, there is no problem. There is no "red" dependency.
- rebuild the module in IDEA - with errors and not found references to some classes/packages that are definitely present in the project dependencies.
Seems like a caching issue
What needs to be done so that rebuild can see project dependencies?
Thank you.
Please sign in to leave a comment.
I have tried more things.
"Invalidate Caches and restart" did not help.
Packages and classes that appear in rebuild error messages "java: package PACKAGE_NAME_HERE does not exist" are present in the "External libraries" section of the "Project" panel.
Hello Gene,
What IDE version do you use? Is there a sample project available to check?
For the investigation, could you please provide this information? It would be the most useful. Thank you.
Hello Andrey,
The creation of an absolutely similar workspace solved the problem.
Looks like the problem is in the internal IDEA information (related to dependencies?) stored for the previous version of code and not updated after the new code was pulled from git.
Hello Andrey,
Thank you for the link.
The workaround works for me.
Katshyn's workaround did not work for me, but File | Manage IDE Settings | Restore Default Settings... did.