How to change where the analysis output is uploaded when running from local maven?

java
sonarqube
maven

(Nicholas DiPiazza) #1
  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Version 6.7.5 (build 38563)

  • what are you trying to achieve
    Trying to run a sonarqube scan locally then upload the artifact to sonarqube in a unique location.

  • what have you tried so far to achieve this
    I have run sonarqube with the following:

mvn sonar:sonar -Dsonar.host.url=https://sonar.mydomain.com

My pom is com.groupname:projectname:4.0.0

And it will upload my artifact to the following location:

https://sonar.mydomain.com/dashboard/index/com.groupname:projectname:LOCAL

I would like this to be uploaded to something like this:

https://sonar.mydomain.com/dashboard/index/com.groupname:projectname:NICHOLAS

So that my scan doesn’t overwrite someone else’s. How can I do that?


(Nicholas DiPiazza) #2

ah it’s:

<sonar.projectKey>


(G Ann Campbell) #3

Hi,

I feel it’s worth pointing out that you seem to be doing branch analysis, which is supported by Developer Edition($).

 
Ann


(Nicholas DiPiazza) #4

Well i’m a bit of a newb here. I’m running the sonar:sonar target on my mvn project and its generating an entire analysis file based on the entire project.

are you saying there is a way to run this against a base branch?

I was actually about to open a new question about this.


(G Ann Campbell) #5

Hi,

Here are the docs on that. You won’t get a restricted analysis scope, but you will get other, branch-context-sensitive features.

 
Ann