org.sonarsource.scanner.maven:sonar-maven-plugin:5.1 or one of its dependencies could not be resolved

1,069 views
Skip to first unread message

Amedee Van Gasse

unread,
Oct 12, 2017, 9:33:56 AM10/12/17
to SonarQube
After upgrading SonarQube from 6.1 to 6.5, we get this error in Jenkins 2.73:

Version of sonar-maven-plugin
sonar:sonar

Maven command as configured in Jenkins:
-P test,qa clean org.jacoco:jacoco-maven-plugin:prepare-agent verify emma:emma -DgsExec=/usr/local/bin/gs -DcompareExec=/usr/bin/compare -Dmaven.test.failure.ignore=true $SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_AUTH_TOKEN

Maven command as executed by Jenkins
Executing Maven:  -B -f /var/lib/jenkins/jobs/itext7-develop-sonarqube/workspace/pom.xml -P test,qa clean org.jacoco:jacoco-maven-plugin:prepare-agent verify emma:emma -DgsExec=/usr/local/bin/gs -DcompareExec=/usr/bin/compare -Dmaven.test.failure.ignore=true org.sonarsource.scanner.maven:sonar-maven-plugin:5.1:sonar -Dsonar.host.url=http://sonarqube.itextsupport.com:9000 -Dsonar.login=******


SonarQube related messages in the build log:

[WARNING] The POM for org.sonarsource.scanner.maven:sonar-maven-plugin:jar:5.1 is missing, no dependency information available

(...)

[ERROR] Plugin org.sonarsource.scanner.maven:sonar-maven-plugin:5.1 or one of its dependencies could not be resolved: Failure to find org.sonarsource.scanner.maven:sonar-maven-plugin:jar:5.1 in http://repo.itextsupport.com/repo was cached in the local repository, resolution will not be reattempted until the update interval of itextsupport has elapsed or updates are forced -> [Help 1]

I don't know where org.sonarsource.scanner.maven:sonar-maven-plugin:5.1 comes from, it's not configured anywhere.
I also don't know why it tries to get the jar from our local repository instead of Maven Central.

What needs to be changed to solve this?

Dan Tran

unread,
Oct 12, 2017, 6:17:16 PM10/12/17
to SonarQube

Amedee Van Gasse

unread,
Oct 16, 2017, 2:51:33 AM10/16/17
to SonarQube
I know that there is no such version.

Would you mind actually answering the question? Thanks a lot!

Amedee Van Gasse

unread,
Oct 16, 2017, 3:01:28 AM10/16/17
to SonarQube
I changed "Version of sonar-maven-plugin" from blank (which defaults to sonar:sonar, according to the docuemtation) to the value "org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar", as described on https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven

When I do that, I get this error:


[HUDSON] Collecting dependencies info
[INFO] Downloading: http://repo.itextsupport.com/repo/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloading: http://repo.itextsupport.com/repo/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloading: http://repo.itextsupport.com/repo/org/codehaus/mojo/emma-maven-plugin/maven-metadata.xml
[INFO] Downloading: http://repo.itextsupport.com/repo/org/sonarsource/scanner/maven/sonar-maven-plugin/org.sonarsource.scanner.maven/sonar-maven-plugin-org.sonarsource.scanner.maven.pom
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/maven/sonar-maven-plugin/org.sonarsource.scanner.maven/sonar-maven-plugin-org.sonarsource.scanner.maven.pom
[WARNING] The POM for org.sonarsource.scanner.maven:sonar-maven-plugin:jar:org.sonarsource.scanner.maven is missing, no dependency information available
[INFO] Downloading: http://repo.itextsupport.com/repo/org/sonarsource/scanner/maven/sonar-maven-plugin/org.sonarsource.scanner.maven/sonar-maven-plugin-org.sonarsource.scanner.maven.jar
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/maven/sonar-maven-plugin/org.sonarsource.scanner.maven/sonar-maven-plugin-org.sonarsource.scanner.maven.jar
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
*snip*
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.640 s
[INFO] Finished at: 2017-10-16T08:59:25+02:00
[INFO] Final Memory: 20M/283M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.sonarsource.scanner.maven:sonar-maven-plugin:org.sonarsource.scanner.maven or one of its dependencies could not be resolved: Could not find artifact org.sonarsource.scanner.maven:sonar-maven-plugin:jar:org.sonarsource.scanner.maven in itextsupport (http://repo.itextsupport.com/repo) -> [Help 1]

On Friday, October 13, 2017 at 12:17:16 AM UTC+2, Dan Tran wrote:

Amedee Van Gasse

unread,
Oct 16, 2017, 5:37:15 AM10/16/17
to SonarQube
I changed "Version of sonar-maven-plugin" from "org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar" to "3.3.0.603" and now it seems to work.

Thanks for being my rubber duck.
Reply all
Reply to author
Forward
0 new messages