dist: trusty
language: java
sudo: false

jdk:
  - oraclejdk9
  - oraclejdk11

install: true

env:
global:
  - secure: iI7IpfDtS+LUyS2yNuRCR3KelNyvBHuoMQ3gb1UNmR5SSL7jO/p3olQWrQROs28FJ+dpE3lHyIjoHrebKQGJHHAgTG2XWxn+G3fDsf+wSSFSLoDGj0o2SgGXooBbR2dccnNZHCyQaOyE2cIPWaOxrQZFE4No70LQB4mrP/gdkoc=
matrix:
    include:
       - jdk: oraclejdk8
         env: STRUTS_IT=true # do integration tests and coverage reports when jdk 9 and 11 tests prospered

script:
   - if [ "$STRUTS_IT" == "true" ]; then
      ./mvnw clean install -DskipTests -DskipAssembly -B;
      ./mvnw test org.jacoco:jacoco-maven-plugin:report org.jacoco:jacoco-maven-plugin:report-integration org.eluder.coveralls:coveralls-maven-plugin:report -Ptravis-coveralls -DskipAssembly -B;
    else
      ./mvnw clean package test -DskipAssembly -B;
    fi;

cache:
  directories:
    - $HOME/.m2
