Rajmahendra
Rajmahendra

Reputation: 3224

Running multiple sonar ant project build but sonar displays one project

I am trying to run sonar with my 2 project but in Sonar web i see only one project. Each time when i run sonar its deleting the existing content.

I have removed sonar?create=true from the database connection but still its giving same issue.

I am not sure wheather the database is deleted each time or the sonar is letting to create only one project

Upvotes: 0

Views: 1697

Answers (2)

MEC
MEC

Reputation: 1736

You need to have different project keys in your Ant tasks for each project, even if the projects have different names.

The sample ant tasks use org.example:example as the project key, and if you simply copied the sample ant tasks then you probably are using the same key for both projects.

Check over here:docs.codehaus

<sonar:sonar workingDir="..." serverUrl="...">
  <project key="org.example:example" version="0.1-SNAPSHOT">
    <property name="sonar.dynamicAnalysis" value="false"/>
    <sources>
      <path location="..."/>
    </sources>
  </project>
</sonar:sonar>

Upvotes: 1

oers
oers

Reputation: 18704

It sounds like the 2 projects may have the same sonar project name? And one project ist overwriting the other.

And you may want to consider to use a real database(free oracle db or something similar). The integrated one is quite slow and is officially not supported when upgrading later.

Upvotes: 0

Related Questions