language: java

sudo: false # faster builds

jdk:
    - oraclejdk8
    - oraclejdk7

install:
    true

before_script:
  - pip install --user codecov

script:
  - jdk_switcher use oraclejdk8
    - mvn -U -B -V test --fail-at-end -Dsource.skip=true -Dmaven.javadoc.skip=true
  - jdk_switcher use oraclejdk7
    - mvn -U -B -V test --fail-at-end -Dsource.skip=true -Dmaven.javadoc.skip=true -pl !:hamcrest-extensions-jdk8

after_success:
  - codecov
  - jdk_switcher use oraclejdk8
  - mvn clean test jacoco:report coveralls:report
  - jdk_switcher use oraclejdk7
  - mvn clean test jacoco:report coveralls:report -pl !:hamcrest-extensions-jdk8
  
notifications:
    email:
      on_failure: change

language: java

sudo: false # faster builds

jdk:
    - oraclejdk8
    - oraclejdk7

install:
    true

before_script:
  - pip install --user codecov

script:
  - jdk_switcher use oraclejdk8
    - mvn -U -B -V test --fail-at-end -Dsource.skip=true -Dmaven.javadoc.skip=true
  - jdk_switcher use oraclejdk7
    - mvn -U -B -V test --fail-at-end -Dsource.skip=true -Dmaven.javadoc.skip=true -pl !:hamcrest-extensions-jdk8

after_success:
  - jdk_switcher use oraclejdk8
  - mvn clean test jacoco:report coveralls:report
  - codecov -b "$TRAVIS_JOB_NUMBER-jdk8"
  - jdk_switcher use oraclejdk7
  - mvn clean test jacoco:report coveralls:report -pl !:hamcrest-extensions-jdk8
  - codecov -b "$TRAVIS_JOB_NUMBER-jdk7"
  
notifications:
    email:
      on_failure: change

Move Codecov to after mvn tests
Move Codecov to after mvn tests