0

I am using Java 8 to compile my code , some time back our sonar server upgraded to 8.1 and we were forced to analyse the code using Java11 as asked here https://community.sonarsource.com/t/sonarqube-8-1-with-java-8-code/19306

I have upgraded my sonarqube stage to use jdk 11 like this

sonarqube:
  stage: sonar
  image: maven:3.8.1-openjdk-11-slim
  script:
    - cd some-service/backend
    - mvn -q -U -B verify sonar:sonar --settings ../../settings.xml -DskipTests=true -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN
  tags:
    - dev
  only:
    - schedules

But after this I run into this exception in the pipeline

Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path /usr/java/openjdk-11/../lib/tools.jar

My compile stage looks like below

compile:
  stage: compile
  image: maven:3.8.1-openjdk-8-slim
  tags:
    - build
  script:
    - cd someservice/backend
    - mvn clean compile
  except:
    - master

I am not sure what I am missing , I have tried using openjdk 15 image from docker hub but nothing work.

Prashant Raghav
  • 319
  • 2
  • 6
  • 15

0 Answers0