Found an easy way to make sure that produced artifacts are using the right java version.