如何解决将Nutch 1.17与EclipseUbuntu 18.04集成
我不知道该指南是否可能已过时,或者我做错了什么。 我刚开始使用坚果,并且已经将其与solr集成在一起,并通过终端通过某些网站进行了爬网/索引。 现在,我试图在Java应用程序中使用它们,所以我一直在这里关注本教程: https://cwiki.apache.org/confluence/display/NUTCH/RunNutchInEclipse#RunNutchInEclipse-RunningNutchinEclipse
我通过Eclipse下载了Subclipse,ivyde和m2e,并且下载了ant,因此我应该具备所有先决条件。 本教程中的m2e链接已损坏,因此我在其他地方找到了它。事实证明,Eclipse在安装时已经安装了它。
在终端中运行“ ant eclipse”时,会收到大量错误消息。 由于字数过多,请在整个信息中添加一个指向pastebin的链接 here
我真的不确定我在做什么错。 方向并不那么复杂,所以我真的不知道我在搞砸。
只要有必要,这就是我们需要修改的nutch-site.xml。
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>plugin.folders</name>
<value>/home/user/trunk/build/plugins</value>
</property>
<!-- HTTP properties -->
<property>
<name>http.agent.name</name>
<value>MarketDataCrawler</value>
<description>HTTP 'User-Agent' request header. MUST NOT be empty -
please set this to a single word uniquely related to your organization.
NOTE: You should also check other related properties:
http.robots.agents
http.agent.description
http.agent.url
http.agent.email
http.agent.version
and set their values appropriately.
</description>
</property>
<property>
<name>http.robots.agents</name>
<value></value>
<description>Any other agents,apart from 'http.agent.name',that the robots
parser would look for in robots.txt. Multiple agents can be provided using
comma as a delimiter. eg. mybot,foo-spider,bar-crawler
The ordering of agents does NOT matter and the robots parser would make
decision based on the agent which matches first to the robots rules.
Also,there is NO need to add a wildcard (ie. "*") to this string as the
robots parser would smartly take care of a no-match situation.
If no value is specified,by default HTTP agent (ie. 'http.agent.name')
would be used for user agent matching by the robots parser.
</description>
</property>
</configuration>
大量错误与Ivy有关,所以我不知道Nutch和eclipse中安装的插件之间的Ivy版本是否兼容。
解决方法
按照LOG文件中的说明
[ivy:resolve] SERVER ERROR: HTTPS Required url=http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.pom
[ivy:resolve] SERVER ERROR: HTTPS Required url=http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar
[ivy:resolve] SERVER ERROR: HTTPS Required url=http://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.pom
您应该在ivy / ivy.xml中使用更新的存储库URL。一种选择是在ivy.xml中将每个URL从http更改为https。
我认为,您使用的是旧版本,否则此问题应该已经解决。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。