Meta information about new code in branch build (SVN) is wrong

  • SonarQube 7.9.1, Jenkins 2.176.2, Maven 3.5, Maven Sonar Plugin 3.6.0.1398, Maven JaCoCo Plugin 0.8.1

  • Pre-condition: we have a trunk (SVN) and a branch (SVN); we build by separate jobs, separating the analysis in Sonar by using different project keys. Example

    • trunk: groupId:artifactId
    • branch: groupId:artifactId:RC -> (RC for release candidate)
  • How to reproduce:
    Having one and the same code in trunk and in branch, with 10 lines of code:

  • Change code in line2 (feature1) in trunk
  • Change also code in lines 5-6 (feature2) in trunk
  • merge feature2 from trunk into branch
    Result:
  • Source code beeing analysed by the branch Job is correct -> you see the changed lines 5-6
  • Problem1: also line2 is marked as new code although in the branch, the line is untouched!
  • Problem2: the meta information of the code in line2 is reported with:
    • user who merged feature2
    • timestamp of the merge

So, somehow the meta information about new code and also who/when changed code is somehow mixed up. The pom.xml in the branch have correct properties for SCM set.