sudo: required
cache:
  directories:
    - $HOME/.m2
language: java
jdk:
  - oraclejdk8
install: true
# The environment variable ${TRAVIS_PULL_REQUEST} is set to "false" when the build 
# is for a normal branch commit. When the build is for a pull request, it will 
# contain the pull request’s number.
script:
  - '[ "${TRAVIS_PULL_REQUEST}" != "false" ] || ./mvnw package -Pspring,full -U -Dmaven.test.redirectTestOutputToFile=false'
  - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] || ./mvnw package -Pspring -U -Dmaven.test.redirectTestOutputToFile=false'
after_success:
  - bash <(curl -s https://codecov.io/bash)
