Hi builds@,

I wonder if anyone can provide some direction regarding how I can get the
above plugin to work as a post-build task for our Nutch trunk build [1]. I
opened an issue in our Jira for the functionality and would like to commit
the following (or something similar) patch to our ant build script. One
problem I for see is the classpath path, however I am not sure what to set
this to as I have not configured the plugin before.

+  <!-- ==================================================================
-->
+  <!-- SONAR targets
-->
+  <!-- ==================================================================
-->
+
+  <!-- Define the Sonar task if this hasn't been done in a common script
-->
+  <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
+    <classpath path="../sonar-ant-task-1.1.jar" />
+  </taskdef>
+
+  <!-- Add the target -->
+  <target name="sonar">
+    <!-- list of mandatories Sonar properties -->
+    <property name="sonar.sources" value="${src.dir}" />
+
+    <!-- list of optional Sonar properties -->
+    <property name="sonar.projectName" value="Nutch.Sonar.Analysis" />
+    <property name="sonar.tests" value="${test.src.dir}" />
+
+    <sonar:sonar key="org.example:example" version="0.1-SNAPSHOT"
xmlns:sonar="antlib:org.sonar.ant"/>
+  </target>

I'm aware that it is best to use an enterprise relational database but I
think for the purpose of this experiment the default Derby db will suffice.
I wonder if anyone has experience using this plugin and how the
configuration options above need to be edited to allow us to do some Sonar
analysis on the Nutch codebase.

Thanks in advance for any pointers.

[1] https://builds.apache.org/view/M-R/view/Nutch/job/Nutch-trunk/
-- 
*Lewis*

Reply via email to