use try-with-resource
remove dummy main method
pom: update compile plugin to 3.2
src: use java8