I use maven to build my project.
I have following configuration:
D:\\freelance\\polyndrom>mvn -verion Apache Maven 3.2.3 (33f8c3e1027c3ffffde9
By default, Maven assumes you wrote your code using JDK 1.5 and that you want to compile to that same target. You will need to add the maven-compiler-plugin to your build plugins, in order to tell it to use 1.8.
org.apache.maven.plugins maven-compiler-plugin 3.3 1.8 1.8
Check out the plugin's docs for more info: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html