nutch编译

nutch安装

1.安装ant编译工具

sudo apt install ant

2.下载svn工具,通过svn下载代码(或者直接从官网下载)

sudo apt install subversion
svn co https://svn.apache.org/repos/asf/nutch/tags/release-1.7

3.在nutch文件夹下执行ant编译命令

可能踩到的坑

坑一:

Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.

在用ant编译Nutch时出现上述情况,显示缺少相关的包。

1.下载sonar-ant-task-2.1.jar,并拷贝到nutch解压目录的lib文件夹下

2.修改nutch文件夹下的build.xml文件,引入上面的jar包

<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
  <classpath path="${ant.library.dir}" />
  <classpath path="${mysql.library.dir}" />
  <classpath><fileset dir="lib/" includes="sonar*.jar" /></classpath>
 </taskdef>

注意不是在末尾添加上面的代码,而是修改

坑二:
这里写图片描述

配置没问题。该加的包也加上了,源也换了,还是总出现这个问题。

可能是网的问题,通过开手机热点放网成功解决。

猜你喜欢

转载自blog.csdn.net/dpengwang/article/details/81710322