What has changed in SonarCloud that would cause my usage of the maven sonar plugin to start failing?
Error observed:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project xxxxx: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator -> [Help 1]
Maven sonar plugin version 3.9.1.2184.
Configuration unchanged and working for >6 months.
Next GITHUB token expiration still a month away.
Maven command run from Jenkins server:
steps {
withSonarQubeEnv('SonarCloud') {
withCredentials([string(credentialsId: 'xxxxx_github_token', variable: 'GITHUB_TOKEN')]) {
sh "mvn -B sonar:sonar \
-Dsonar.projectKey=${org}_${repo} \
-Dsonar.branch.name=${env.BRANCH_NAME}"
}
}
}
Also, tried
sh "mvn -B sonar:sonar \
-Dsonar.projectKey=${org}_${repo} \
-Dsonar.organization=${org} \
-Dsonar.branch.name=${env.BRANCH_NAME}"
SONAR_TOKEN is never explicitly set. Since this has been working until now, I assumed that there was no need to explicitly set it.