今天在公司做nutch的调试时,犯了一个低级的错误,在这里记录下,提醒下大家,以后不要犯此类的错误。
我们知道nutch-default.xml中有一个:
<property>
<name>plugin.folders</name>
<value>plugins</value>
<description>Directories where nutch plugins are located. Each
element may be a relative or absolute path. If absolute, it is used
as is. If relative, it is searched for on the classpath.</description>
</property>
nutch在启动的时候就会把下面的所有的插件加载。如果我们自己写一个插件的话,那么必须告诉nutch.我是在./src/plugin下面写的plugin.嘿嘿,这个<value>plugins</value> 没改,害的我找了好半天。应该该为 <value>./src/plugin </value>才对。
关于插件的做法在上几篇的文章已经写过了。