I am adding more points to the solution by @Rushi Shah
mvn clean install -X helps to identify the root cause.
Some of the important phases of Maven build lifecycle are:
clean – the project is clean of all artifacts that came from previous compilations
compile – the project is compiled into /target directory of project root
install – packaged archive is copied into local maven repository (could in your user's home directory under /.m2)
test – unit tests are run
package – compiled sources are packaged into archive (JAR by default)
The 1.6 under tag refers to JDK version.
We need to ensure that proper jdk version in our dev environment or change the value to
1.7 or 1.5 or whatever if the application can be supported in that JDK version.