简体   繁体   中英

How to connect a SpringBoot project to SonarQube

I am trying to connect my Spring Boot application to SonarCloud, using a maven plugin for it. Concretely, I am trying to run (I got these instructions from SonarCloud tutorial):

mvn sonar:sonar \\ -Dsonar.organization=myacconunt-github \\ -Dsonar.host.url=https://sonarcloud.io \\ -Dsonar.login=mygeneratedtoken

Everything seems good but I got this error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project demo: You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator. -

I have been checking Sonar permissions for my user and everything looks good. I think my user has permissions, since I have another project from the same GitHub account working and being analysing by Sonar. Do you have similar problems to that one?

Thanks to @Fabrice I managed to solve that issue. It turned out that I was using a groupId:artifactId which was already used in SonarCloud. So just changing either groupId or artifactId worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM