Maven resources compiler: Maven project configuration required for module '<project name>' isn't available. Compilation of Maven projects is supported only if external build is started from an IDE.
Solution
Right click on the POM.xml file of your project and click on the option "Add as Maven Project".
This will import your project as the Maven project and starts downloading the dependencies.