Java 6 Unsupported major.minor version 51.0
That version number (51.0) indicates that you are trying to run classes compiled for Java 7. You will need to recompile them for Java 6.
Note, however, that some features may no longer be compatible with Java 6, which is very old, and no longer (publicly) supported by Oracle.
The problem is because you haven't set JDK version properly.You should use jdk 7 for major number 51. Like this:
JAVA_HOME=/usr/java/jdk1.7.0_79
i also faced similar issue. I could able to solve this by setting JAVA_HOME in Environment variable in windows. Setting JAVA_HOME in batch file is not working in this case.
According to maven website, the last version to support Java 6 is 3.2.5, and 3.3 and up use Java 7. My hunch is that you're using Maven 3.3 or higher, and should either upgrade to Java 7 (and set proper source/target attributes in your pom) or downgrade maven.