title: SonarQube with new Branch feature fails with "a measure can be set only once for a specific Component"?
body: <p>Trying out the newer branch support feature in SonarQube.</p>
  
  <p>I have run into a bit of a problem which I do not understand.</p>
  
  <p>I upgraded our SonarQube instance to the developer edition. Under the branch configuration for Long living branches pattern I set it to (develop|master) as we are using GitFlow branching strategy.</p>
  
  <p>From a Jenkins job I executed the following after upgrading to the developer edition where I Pass the project key and name in. This works fine and I get an analysis for the website project shown. </p>
  
  <pre><code>C:\Jenkins\sitecore\develop&gt;SonarScanner.MSBuild.exe" begin /d:sonar.login=******** /k:NEON /n:Website /v:Build#3-SHA#a37bc8060e8d5a4264140784b1f93c9a4ca80b43 /d:sonar.host.url=http://codeanalysis.remoteiv.dk /d:sonar.cs.nunit.reportsPaths=C:\Jenkins\sitecore\develop\NUnitResult.xml /d:sonar.cs.opencover.reportsPaths=C:\Jenkins\sitecore\develop\OpenCoverResult.xml
  </code></pre>
  
  <p>Then for subsequent runs Jenkins passes the feature branch name using the sonar.branch.name property as shown below.</p>
  
  <pre><code>C:\Jenkins\sitecore\feature-NEON-10-Setting-Up-Toll-Gate@2&gt;SonarScanner.MSBuild.exe" begin /d:sonar.login=********** /k:NEON /n:Website /v:Build#5-SHA#2acea67103ab4b1223d80bf62d23999dd5369c29 /d:sonar.branch.name=feature-NEON-10-Setting-Up-Toll-Gate /d:sonar.host.url=http://codeanalysis.remoteiv.dk /d:sonar.cs.nunit.reportsPaths=C:\Jenkins\sitecore\feature-NEON-10-Setting-Up-Toll-Gate@2\NUnitResult.xml /d:sonar.cs.opencover.reportsPaths=C:\Jenkins\sitecore\feature-NEON-10-Setting-Up-Toll-Gate@2\OpenCoverResult.xml
  </code></pre>
  
  <p>The end step in Jenkins says it succeeds. </p>
  
  <pre><code>INFO: Sensor C# Unit Test Results Import [csharp] (done) | time=30ms
  INFO: Sensor Zero Coverage Sensor
  INFO: Sensor Zero Coverage Sensor (done) | time=341ms
  INFO: Sensor CPD Block Indexer
  INFO: Sensor CPD Block Indexer (done) | time=1ms
  INFO: Skipping CPD calculation for short living branch
  INFO: Analysis report generated in 378ms, dir size=841 KB
  INFO: Analysis reports compressed in 61ms, zip size=55 KB
  INFO: Analysis report uploaded in 49ms
  INFO: ANALYSIS SUCCESSFUL, you can browse http://codeanalysis.remoteiv.dk/dashboard/index/NEON
  INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
  INFO: More about the report processing at http://codeanalysis.remoteiv.dk/api/ce/task?id=AWL3Sf5q5_IkahY6f6q6
  INFO: Task total time: 1:02.311 s
  INFO: ------------------------------------------------------------------------
  INFO: EXECUTION SUCCESS
  INFO: ------------------------------------------------------------------------
  INFO: Total time: 1:04.661s
  INFO: Final Memory: 23M/692M
  </code></pre>
  
  <p>But The analysis says it has failed on the server and there is no branch under the branches view on sonar server?</p>
  
  <p>The error is.</p>
  
  <pre><code>{"task":{"id":"AWL3Sf5q5_IkahY6f6q6","type":"REPORT","componentId":"AWL3Mrk25_IkahY6f6qw","componentKey":"NEON","componentName":"Website","componentQualifier":"TRK","status":"FAILED","submittedAt":"2018-04-24T12:54:04+0200","submitterLogin":"jenkins","startedAt":"2018-04-24T12:54:05+0200","executedAt":"2018-04-24T12:54:15+0200","executionTimeMs":10155,"logs":false,"errorMessage":"a measure can be set only once for a specific Component (key=NEON:BRANCH:feature-NEON-10-Setting-Up-Toll-Gate), Metric (key=test_execution_time). Use update method (Visit failed for Component {key=NEON:BRANCH:feature-NEON-10-Setting-Up-Toll-Gate,type=PROJECT} )","hasScannerContext":true,"organization":"default-organization","branch":"feature-NEON-10-Setting-Up-Toll-Gate","branchType":"SHORT"}}
  </code></pre>
  
  <p>Any help would be appreciated.</p>