Issue
Showing compile error in IntelliJ-idea editor.
mvn clean install
When run it will build successfully and run code normally. But in editor its unable to resolve those import. Some of the import is showing correctly some of the import it's showing error like Blow
and actually, the dependency is present in maven dependency list
In the editor, it showing full of error
I modified build settings, deleted repo, updated maven to the latest version, updated the IntelliJ and tried other suggestion in StackOverflow, still no solution for this problem.
Solution
I believe this issue is related to the way we open this project in IntelliJ Idea as mvn clean install
is working fine for you.
While opening the project in IntelliJ, you should open maven project like this:
- New -> Project from Existing Sources -> Select Project -> Import from
External Model (Select
maven
here) - After this, if you are asked to override .iml (idea files), you can override them.
This should hopefully solve your problem.
Answered By - abstractKarshit
Answer Checked By - Gilberto Lyons (JavaFixing Admin)