maven工程报错

背景:idea新建普通maven工程,报如下错误.

Error:Maven Resources Compiler: Maven project configuration required for module ‘springdemo’ isn’t available. Compilation of Maven projects is supported only if external build is started from an IDE.

解决方法:

1.检查idea配置.maven工程报错
2.完成第一步没问题,检查maven的conf下的文件配置是否正确.尤其是setting的仓库.