the goal you specified requires a project to execute maven in mvn install code example
Example: Goal requires a project to execute but there is no POM in this directory
Check for the name of the file, i.e pom.xml file is spelled correctly with proper file extension .xml.
Example for this error are
pom.ml pm.xl