sonar ant build.xml die Datei für die Ausführung von Standard-Sonne-Prüfungen auf Java-Projekt

Ich bin ein Anfänger, SONAR , ich brauche nur eine Hilfe für einen Muster-ant-build-Datei für das ausführen von mein java-Projekt namens "Hello World" mit SONAR 's default Sonne prüft Qualität Profil .Ich habe nicht gefunden, überall und zu jeder richtigen ant-guide für sonar. Ich bin mit SONAR 2.10 .

Bitte helfen Sie mir, zu beginnen mit SONAR .

<project name="Example" default="Sonar" basedir=".">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
 <classpath path="C:\Program Files\Apache Software Foundation\ant\lib\sonar-ant-task-1.0.jar" />
</taskdef>
<!-- Out-of-the-box those parameters are optional -->
<property name="sonar.jdbc.url" value="jdbc:mysql://localhost:3309/sonar" />
<property name="sonar.jdbc.driverClassName" value="com.mysql.jdbc.Driver" />
<property name="sonar.jdbc.username" value="root" />
<property name="sonar.jdbc.password" value="root" />
<!-- Additional Sonar configuration (PMD need 1.5 when using annotations)-->
<property name="sonar.java.source" value="1.5"/>
<property name="sonar.java.target" value="1.5"/>
<property name="sonar.projectName" value="Example"/>
<property name="sonar.binaries" value="C:\Documents and   Settings\tausif\Feature2\Example\bin"/>
 <!-- SERVER ON A REMOTE HOST -->
<property name="sonar.host.url" value="http://localhost:8080/sonar" />
<target name="Sonar">
<!-- The workDir directory is used by Sonar to store temporary files -->
<sonar:sonar workDir="C:\Documents and Settings\tausif\Feature2\Sonar" key="com.example:example"  xmlns:sonar="antlib:org.sonar.ant" >
  <!-- source directories (required) -->
  <sources>
    <path location="C:\Documents and Settings\tausif\Feature2\Example" />
  </sources>
</sonar:sonar>
</target>
</project>

Den beiden oben genannten Antworten waren wirklich hilfreich für mich zum erstellen dieser xml-Datei .
Dies ist mein Beispiel build.xml . Können Sie bitte prüfen, was ich bin fehlt?
Ich habe aus Sonne Kontrollen als Standard.Mein Projektname ist ein Beispiel.

InformationsquelleAutor Md Tausif Warsi | 2011-08-24

Schreibe einen Kommentar