I have the same problem, I fixed it with installing maven.
- Download maven from https://maven.apache.org/download.cgi
- Unzip in disk C.
- Add the bin folder in the system enviroment path C:\maven\bin
(win button , in search type enviroment variables, System Variables on path add C:\maven\bin )
- in cmd type mvn -v to see does is installed.
- Then i restart intelij.
- And in intelij in the terminal run this command mvn clean install.
- After this everything was ok.
I hope i dont miss something, and this will help on next person that read.