Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Ant 1.7.1 or higher
  • Java 1.5 or higher

Installation

...

Just download the Sonar Ant Task

...

Declare the Sonar Ant Task and define the configuration in a common Ant script file:

Code Block
langxml
...  
  <!-- Add the Sonar Task -->
  <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
    <classpath path="path/to/sonar/ant/task/lib" /> 
    <!-- This sonar Ant task library can also be put in the ${ANT_HOME\}/lib directory-->
    <!-- In such case this classpath node is no more mandatory -->
  </taskdef>

  <!-- Out-of-the-box those parameters are optional -->
  <!-- EXAMPLE FOR MYSQL -->
  <property name="sonar.jdbc.url"
            value="jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8" />
  <property name="sonar.jdbc.driverClassName" value="com.mysql.jdbc.Driver" />
  <property name="sonar.jdbc.username" value="sonar" />
  <property name="sonar.jdbc.password" value="sonar" />

  <!-- SERVER ON A REMOTE HOST -->
  <property name="sonar.host.url" value="http://myserver:1234" />
...

.

on your machine.

You are now ready to analyze a project with the Sonar Ant Task.

...

Change Log

JIRA Issues
anonymoustrue
titleRelease 2.0
height90
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22ANT-TASK-2.0%22+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000

...