Problem with my Maven installation

Hi, community. I am learning how to use the Vaadin Framework, I have a problem with the Maven installation. I use the Netbeans IDE, when I create a New Vaadin Project, in my output console an error appears:

Error: M2_HOME is set to an invalid directory. M2_HOME = "D:\Vaadin\Vaadin\apache-maven-3.3.9" Please set the M2_HOME variable in your environment to match the location of the Maven installation Please, help me !!!
Thank you in advance

Hello Rubén,
it looks like your maven installation directory is not the one you have specified.
You can check your installation path by running

mvn -v in your console.
Then you have to set M2_HOME to a path specified there.
Also you have to ensure that you have intalled the maven itself.
Here is the more detailed instructions:
http://maven.apache.org/install.html

Hopefully, it helps : )