2017-04-18 47 views

回答

5

試評中build.xml這一切的部分:

<!-- ================================================================== --> 
    <!-- 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="${ant.library.dir}"/> 
    <classpath path="${mysql.library.dir}"/> 
    </taskdef> 

    <!-- Add the target --> 
    <target name="sonar" description="--> run SONAR analysis"> 

    <!-- list of mandatory source directories (required) --> 
    <property name="sonar.sources" value="${src.dir}"/> 

    <!-- list of properties (optional) --> 
    <property name="sonar.projectName" value="Nutch Trunk 1.4 Sonar Analysis" /> 
    <property name="sonar.binaries" value="${build.dir}/classes" /> 
    <property name="sonar.binaries" value="${build.dir}/plugins" /> 
    <property name="sonar.tests" value="${test.src.dir}" /> 

    <sonar:sonar workDir="${base.dir}" key="org.apache.nutch:trunk" 
    version="1.4-SNAPSHOT" xmlns:sonar="antlib:org.sonar.ant"/> 
    </target> 
這樣

,它應該工作。

+0

謝謝,問題解決了。 – Kaiux