Nutch - 无法从资源 org/sonar/ant/antlib.xml 加载定义
Nutch - Could not load definitions from resource org/sonar/ant/antlib.xml
我正在 bin 目录中学习 Nutch through the official guide. So when I run Ant,它说:
"Could not load definitions from resource org/sonar/ant/antlib.xml
. It
could not be found."
我花了很多时间google来解决,但我失败了。我的OS是Ubuntu16.04.
尝试在 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>
这样,应该可以了。
我正在 bin 目录中学习 Nutch through the official guide. So when I run Ant,它说:
"Could not load definitions from resource
org/sonar/ant/antlib.xml
. It could not be found."
我花了很多时间google来解决,但我失败了。我的OS是Ubuntu16.04.
尝试在 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>
这样,应该可以了。