Maven default is used JDK1.3 for the project compilation, building or packaging (mvn compile, install). Since JDK1.3 is not support annotation, if your project has annotation, you need to configure your Maven to use the latest JDK version.

[INFO] Compilation failure
[8,2] annotations are not supported in -source 1.3 
(use -source 5 or higher to enable annotations)


The solution is very simple, just include the maven compiler plugin and specify the JDK version.

<project ....>

Now, Maven is using JDK 1.6 for all the compilation now.