2

ello, I am doing my code analysis through sonar runner previously I am getting the following error.when I run teh command of sonar-runner Any help???

SonarException: Can not add twice the same measure on org.sonar.api.resources.Project
Exception in thread "main" org.sonar.runner.RunnerException: org.sonar.api.utils.SonarException: Can not add twice the same measure on org.sonar.api.resources.Project@549154f9[id=22,key=DistanceConver
ter-Net:DistanceConverter,qualifier=BRC]: org.sonar.api.measures.Measure@70d1a353[id=<null>,metricKey=profile,metric=Metric[id=144,formula=<null>,key=profile,description=Selected quality profile,type=
DATA,direction=0,domain=General,name=Profile,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=f
alse],value=5.0,data=Sonar way,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<nu
ll>,url=<null>,characteristic=<null>,personId=<null>,persistenceMode=FULL]
        at org.sonar.runner.Runner.delegateExecution(Runner.java:288)
        at org.sonar.runner.Runner.execute(Runner.java:151)
Nazish Ali Rizvi
  • 175
  • 6
  • 15

1 Answers1

0

This happens when you have 2 or more projects with same name. Rename your projects to have distinct names will help.

In your case, Sonar specifically indicates that the project name Net:DistanceConverter is confusing.

Believe2014
  • 3,894
  • 2
  • 26
  • 46