[Build stage](https://docs.travis-ci.com/user/build-stages) could be used to execute builds with different Java versions in parallel and then release it using selected Java.