I had the same issue and none of the above answers fixed it for me because my env variables were all set. I had just reinstalled my Java.
What worked was to
C:\path\to\apache-maven-3.0.4\bin
and open the mvn.bat
file.@SET JAVA_HOME=C:\progra~1\java\jdk1.7.0_03
I don't know if this is Windows specific, but it might help someone!