Sonar-runner: same project analyzed twice - causing sonar exception "Can not add the same measure twice"


in our multi-project configuration we got the problem that the same project is analyzed twice, causing a sonar error

“Can not add the same measure twice on org.sonar.api.resources.File.”

Our setup:

  • gradle 2.2.1 and gradle 2.3 (tested both, no difference) - SonarQube Runner 2.4 (tested also 2.3,no difference) - SonarQube 5.0 with MSSQL (separate server via jDTS) on Windows Server 2012 6.2 amd64, JDK 1.8 - analysis on Windows Server 2012 6.2 amd64 - Java 1.7.0_45 Oracle Corporation (64-bit) - Sonar Java Plugin 2.9.1 (all plugins are up-to-date as of yesterday) - same codebase worked with 4.5.2

I uploaded parts of the log file to

It scans the project at 08:24:11 and then a few seconds later at 08:24:13.

After discussion on the sonar dev mailing list we think that this may be a problem with gradle’s sonar project setup.


Are you using the sonar or sonar-runner plug-in in Gradle? What does your multi-project layout look like?


We have the same issue with the same configuration using the sonar-runner gradle plugin …

After downgrading to SonarQube 4.5.3 it works …