Fixed error which occurred while deploying with java8 to maven central