language: java
jdk:
  - oraclejdk8
  - oraclejdk7
  - openjdk7
env:
  - MAVEN_CONFIG=-DskipRelease
#script: "mvn cobertura:cobertura "
script: "mvn -DskipRelease clean org.jacoco:jacoco-maven-plugin:prepare-agent install cobertura:cobertura sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.projectKey=io.springlets -Dsonar.login=$SONAR_TOKEN"
after_success:
  - bash <(curl -s https://codecov.io/bash)
cache:
  directories:
    - $HOME/.m2

language: java
jdk:
  - oraclejdk8
  - oraclejdk7
  - openjdk7
env:
  - MAVEN_CONFIG=-DskipRelease
script: 
  - "mvnw cobertura:cobertura"
  - jdk_switcher use oraclejdk8
  - "mvnw org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.projectKey=io.springlets -Dsonar.login=$SONAR_TOKEN"
after_success:
  - bash <(curl -s https://codecov.io/bash)
cache:
  directories:
    - $HOME/.m2

Change configuration to run sonar analysis always with jdk8
Change configuration to run sonar analysis always with jdk8