缺包问题:
Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
解决方法:
- 下载 sonar-ant-task-2.2.jar
- 将其拷贝到 ${NUTCH_HOME}/lib 目录下面,并修改${NUTCH_HOME}/build.xml,在
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
下添加
<classpath><fileset dir="./lib" includes="sonar*.jar" /></classpath>
编译卡顿:
一直出现在以下界面不动
resolve-default:
[ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = /opt/apache-nutch-2.3.1/ivy/ivysettings.xml
解决方法:
可通过修改maven中央库地址来解决
修改${NUTCH_HOME}/ivy/ivysettings.xml中
<property name="repo.maven.org"
value="http://repo1.maven.org/maven2/"
override="false"/>
value值改为国内阿里云的中央库地址:http://maven.aliyun.com/nexus/content/groups/public/
参考资料:
1. http://blog.csdn.net/maoersong/article/details/52201812