'Intellij idea cannot find existing class during rebuild (yet maven builds and project runs even from idea)
I opened older project (which I left in state that it builds). Maven still builds externally. Running maven from idea builds (without delegate all actions to maven selected). Project runs and works.
Editor underline files claimed to be not existing, while they are existing. Rebuild complaints about the same. So I did all updates and all repairs, and dropping all cached and rebuild them, restarts. From editor pane point of view, all "errors" were cured by that. Maven still builds, app still runs, externally and from idea (do not build before run is not selected, so it does build it, and not via maven). SO idea had to build it actually, if it can run it. Yet still, rebuild project fails on not existence of one class. This class is definition of project root exception. This class indeed exists, just rebuild does not see it. And surprisingly, the rebuild process has no problem with all descendants of that exception. Descencant exceptions also "cannot be build", because their parent "does not exist", but descendants can be instantiated and used.
Java modules aren't used.
So the workaround is to build project using maven, don't use rebuild project, and then everything works. Yet it would be great if rebuild project could be used.
Any idea what could go wrong or what can I try to fix it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
