I\'m compiling a project in Eclipse using m2eclipse. I set the JDK path in Eclipse like this:
Windows-->preferences-->installed jres--> jdk1.7.xx p
In addition to answer above, I could say that just try to run Maven from the terminal (outside of Eclipse). In this way, if it builds from outside but not in Eclipse, you can understand that the problem should be in Eclipse.