language: java
jdk:
  - oraclejdk8
sudo: required 
dist: trusty
env:
  - MVN_PROFILE=java-6
  - MVN_PROFILE=java-8
script: "mvn checkstyle:check test -B -V -P ${MVN_PROFILE}"

language: java
jdk:
  - oraclejdk11
sudo: required 
dist: trusty
env:
  - MVN_PROFILE=java-8
  - MVN_PROFILE=java-11
script: "mvn checkstyle:check test -B -V -P ${MVN_PROFILE}"

Build profile java-8 and java-11 on Travis.
Build profile java-8 and java-11 on Travis.