4848 item :
4949 - { name: "with Lastest SonarJava Plugin", profile: "without-sonarqube-project", java_plugin_version: "LATEST_MASTER" }
5050 - { name: "for SonarQube Project Only", profile: "only-sonarqube-project", java_plugin_version: "LATEST_MASTER" }
51+ - { name: "for Guava Project Only", profile: "only-guava-project", java_plugin_version: "LATEST_MASTER", java_version: "17", sonar-runtime: "LATEST_RELEASE[2025.4]" }
5152 - { name: "with Prod SonarJava Plugin", profile: "without-sonarqube-project", java_plugin_version: "POM_PROPERTY" }
5253 name : " QA Tests ${{ matrix.item.name }}"
5354 env :
6162 with :
6263 working-directory : its/ruling
6364 version : 2025.7.12
65+ - name : Override Java version for specific profiles
66+ if : ${{ matrix.item.java_version }}
67+ run : |
68+ # We must 'cd' into the target directory because mise 'use' commands are
69+ # scoped to the current working directory. Changing directories ensures
70+ # the java version is pinned specifically for the 'its/ruling' path
71+ # by creating/updating a local .mise.toml file there.
72+ cd its/ruling
73+ mise use java@${{ matrix.item.java_version }}
6474 - name : Get GitHub Token for QA Licenses
6575 id : secrets
6676 uses : SonarSource/vault-action-wrapper@v3
@@ -84,12 +94,13 @@ jobs:
8494 BUILD_NUMBER : ${{ needs.build.outputs.build-number }}
8595 MAVEN_OPTS : " -Xmx3g"
8696 SONAR_JAVA_VERSION : ${{ steps.resolve-sonar-java-plugin-version.outputs.version }}
97+ SONAR_RUNTIME : ${{ matrix.item.sonar-runtime || 'LATEST_RELEASE' }}
8798 run : |
8899 mvn package --batch-mode \
89100 "-Pit-ruling,${{ matrix.item.profile }}" \
90101 "-Dsonar.java.version=${SONAR_JAVA_VERSION}" \
91102 "-Dorchestrator.artifactory.accessToken=${ARTIFACTORY_ACCESS_TOKEN}" \
92- "-Dsonar.runtimeVersion=LATEST_RELEASE " \
103+ "-Dsonar.runtimeVersion=${{ env.SONAR_RUNTIME }} " \
93104 "-Dmaven.test.redirectTestOutputToFile=false" \
94105 "-DbuildNumber=${BUILD_NUMBER}" \
95106 -B -e -V \
@@ -115,4 +126,4 @@ jobs:
115126 BUILD_NUMBER : ${{ needs.build.outputs.build-number }}
116127 steps :
117128 - name : Promote artifacts
118- uses : SonarSource/ci-github-actions/promote@v1
129+ uses : SonarSource/ci-github-actions/promote@v1
0 commit comments