language: java
jdk:
  - openjdk7
install: /bin/true
script: ant

language: java
jdk:
  - openjdk7
  - oraclejdk7
  - oraclejdk8
install: /bin/true
script: ant

Test against multiple JDKs: add oraclejdk7/8
Test against multiple JDKs: add oraclejdk7/8

Apparently openjdk8 is still not supported by travis CI according to http://docs.travis-ci.com/user/languages/java/.