sudo: false

language: java

# precise required for openjdk6, see https://github.com/travis-ci/travis-ci/issues/8199
dist: precise

jdk:
  - openjdk6
#  - openjdk7
#  - oraclejdk7
  - oraclejdk8

addons:
  sonarcloud:
    organization: "uwolfer-github"
    token: $SONAR_TOKEN
  hosts:
    - buildhost
  hostname: buildhost

cache:
  directories:
    - $HOME/.m2/repository/
    - $HOME/.sonar/cache/

after_success:
  if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
    mvn clean cobertura:cobertura coveralls:report jacoco:prepare-agent test jacoco:report sonar:sonar;
  fi

language: java

jdk:
  - openjdk6
#  - openjdk7
#  - oraclejdk7
  - oraclejdk8

addons:
  apt:
    packages:
      - openjdk-6-jdk
  sonarcloud:
    organization: "uwolfer-github"
    token: $SONAR_TOKEN
  hosts:
    - buildhost
  hostname: buildhost

cache:
  directories:
    - $HOME/.m2/repository/
    - $HOME/.sonar/cache/

install:
  - if [[ "$TRAVIS_JDK_VERSION" == "openjdk6" ]]; then
      echo "Downloading Maven 3.0";
      wget https://archive.apache.org/dist/maven/binaries/apache-maven-3.0-bin.zip || travis_terminate 1;
      unzip -qq apache-maven-3.0-bin.zip || travis_terminate 1;
      export M2_HOME=$PWD/apache-maven-3.0;
      export PATH=$M2_HOME/bin:$PATH;
      mvn -version;
    fi

after_success:
  if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
    mvn clean cobertura:cobertura coveralls:report jacoco:prepare-agent test jacoco:report sonar:sonar;
  fi

Switch from precise to default dist and manually install openjdk6
Travis: Switch from precise to default dist and manually install openjdk6

- this should fix failing builds
