Removed warnings and setting java version on pom