How can I use source 5? I tried
mvn -source 5 test
but it didn\'t work :-)
When I compile the file by javac, everything works.
You need to configure the maven-compiler-plugin:
... org.apache.maven.plugins maven-compiler-plugin 2.3.2 1.5 1.5 ... ...
EDIT: Changed example to use latest version of the plugin.