美文网首页
[Nutch] ant编译的问题

[Nutch] ant编译的问题

作者: techhow | 来源:发表于2017-04-22 18:27 被阅读0次
缺包问题:
Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.   

解决方法:

  1. 下载 sonar-ant-task-2.2.jar
  2. 将其拷贝到 ${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

相关文章

网友评论

      本文标题:[Nutch] ant编译的问题

      本文链接:https://www.haomeiwen.com/subject/axwszttx.html