Maven requires a file named pom.xml
in the directory at which you have your project and are executing maven in.
That is the default; if you have another file as your pom.xml
like you described in your comment, m2-pom.xml
you'll have to inform maven about it with the -f
flag.
mvn -f m2-pom.xml clean package