language: java
cache:
  directories:
    - $HOME/.m2
jdk:
  - oraclejdk8
addons:
 apt:
   packages:
     - oracle-java8-installer
notifications:
  slack: gotofail:rNibSSSvoPtDAS7wws1KtdXd
  email: false
before_install:
  - "[ \"$BUILD_PR_BRANCH\" = \"true\" ] && git checkout -b dummyBranch && git checkout develop && git merge dummyBranch; true"
env:
  - BUILD_PR_BRANCH=true

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3 # give xvfb some time to start
script:
  - mvn test
  - mvn site
  - mvn validate
matrix:
  allow_failures:
    - env:
      - BUILD_PR_BRANCH=true
after_script:
  - echo "== CHECKSTYLE_RESULT ==" && cat "out/checkstyle-result.xml" && echo "== END_CHECKSTYLE_RESULT =="
  - echo "== PMD_RESULT ==" && cat "out/pmd.xml" && echo "== END_PMD_RESULT =="
  - echo "== FINDBUGS_RESULT ==" && cat "out/findbugsXml.xml" && echo "== END_FINDBUGS_RESULT =="
after_failure:
  - echo "== CHECKSTYLE_RESULT ==" && cat "out/checkstyle-result.xml" && echo "== END_CHECKSTYLE_RESULT =="

language: java
cache:
  directories:
    - $HOME/.m2
jdk:
  - oraclejdk8
addons:
 apt:
   packages:
     - oracle-java8-installer
notifications:
  slack: gotofail:rNibSSSvoPtDAS7wws1KtdXd
  email: false
before_install:
  - "[ \"$BUILD_PR_BRANCH\" = \"true\" ] && git checkout -b dummyBranch && git checkout develop && git merge dummyBranch; true"
env:
  - BUILD_PR_BRANCH=true

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3 # give xvfb some time to start
script:
  - mvn test
matrix:
  allow_failures:
    - env:
      - BUILD_PR_BRANCH=true
after_script:
  - echo "== CHECKSTYLE_RESULT ==" && cat "out/checkstyle-result.xml" && echo "== END_CHECKSTYLE_RESULT =="
  - echo "== PMD_RESULT ==" && cat "out/pmd.xml" && echo "== END_PMD_RESULT =="
  - echo "== FINDBUGS_RESULT ==" && cat "out/findbugsXml.xml" && echo "== END_FINDBUGS_RESULT =="
after_failure:
  - echo "== CHECKSTYLE_RESULT ==" && cat "out/checkstyle-result.xml" && echo "== END_CHECKSTYLE_RESULT =="

Remove mvn site and validate because only test is needed (it checks tests and checkstyle)
Remove mvn site and validate because only test is needed (it checks tests and checkstyle)
