Upon IntelliJ IDEA > File > New > Project from Existing Sources... > Import project from external model > Maven
, I can't successfully mvn compile
.
Instead Maven fails that with..
[ERROR] COMPILATION ERROR :
...
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
.. on seemingly every classtype (not just Object
as above) in the project.
How can I configure my IntelliJ to successfully mvn compile
?
[Questions that are similar to this, but not exactly the same (although maybe tangentially helpful)]:
- Why so red? IntelliJ seems to think every declaration/method cannot be found/resolved
- Nothing is red in my IntelliJ IDEA
- Intellij Cannot resolve symbol on import
- Sounds like the wording of that [error?], "Cannot resolve symbol on import", is similar but different from mine ("The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files")
- A text search of that page also [CMD+F / Ctrl+F], for parts of my specific Error message {"cannot be resolved", "indirectly referenced", ".class"}, shows no matches - which further leads me to think that Question is slightly different
- Question itself makes no mention of
Maven