title: SonarQube : Execution of several Sonar analysis at same time, on same project. Different versions
body: <p>I want to have Sonar analysis being performed on twice on the same Maven project at the same time, but different versions.</p>
  
  <p>i.e. GAV details</p>
  
  <pre><code>&lt;groupId&gt;com.test.exm&lt;/groupId&gt;
  &lt;artifactId&gt;exm001&lt;/artifactId&gt;
  &lt;version&gt;1.5.0-SNAPSHOT&lt;/version&gt;
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>&lt;groupId&gt;com.test.exm&lt;/groupId&gt;
  &lt;artifactId&gt;exm001&lt;/artifactId&gt;
  &lt;version&gt;1.4.0-SNAPSHOT&lt;/version&gt;
  </code></pre>
  
  <p>This gives the error though...</p>
  
  <blockquote>
    <p>Caused by: org.sonar.api.utils.SonarException: The project is already
    being analysed.   at
    org.sonar.batch.scan.ProjectLock.start(ProjectLock.java:55)</p>
  </blockquote>
  
  <p>Please don't ask why I have snapshot 1.4.0 and 1.5.0 at the same time.
  Its a legacy build thing going on in the background.</p>
  
  <p>I would have thought the semaphore lock used would include the version number, not just the artifact and groupID.</p>
  
  <p>I've found this defect... </p>
  
  <p><a href="https://jira.codehaus.org/browse/SONAR-2761" rel="nofollow">https://jira.codehaus.org/browse/SONAR-2761</a></p>
  
  <p>I could turn off sonar for the legacy stuff, but I'd sooner see if there is a fix I could make to allow Sonar to do the analysis.</p>