You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Alaak <al...@gmx.de> on 2012/08/20 19:17:54 UTC

Dependencies between Plugin

Hi,

I wrote my own plugin containing a main method which is called for 
testing purposes as described under: 
http://wiki.apache.org/nutch/AboutPlugins

However, since this is an IndexingFilter I would like to get the output 
of the "parse-html" plugin for my tests. The problem is, I do not know 
how to add this dependency to my project. I tried it with:

<requires>
         <import plugin="parse-html"/>
</requires>

in my plugin.xml. But this results only in the message that the 
HtmlParser class can not be found while building Nutch.

It would be great if someone tells me how to achieve this or what to 
read to aqcuire the necessary knowledge.

Thanks

Re: Dependencies between Plugin

Posted by "hugo.ma" <hu...@gmail.com>.
In Plugin.xml

<requires>
  <import plugin="nutch-extensionpoints"/>
  <import plugin="another_plugin_necessary_id"/>
</requires>


And on Build.xml of you plugin


  <target name="deps-jar">
    <ant target="jar" inheritall="false" dir="../path_of_plugin"/>
    <ant target="compile-test" inheritall="false" dir="../path_of_plugin"/> 
  </target>

  
  <path id="plugin.deps">
    <fileset dir="${nutch.root}/build">
      <include name="**/path_of_plugin/*.jar" />
    </fileset>
    <pathelement location="${nutch.root}/build/path_of_plugin"/>
  </path>


I think its all, give it a try and say the result.





--
View this message in context: http://lucene.472066.n3.nabble.com/Dependencies-between-Plugin-tp4002216p4003137.html
Sent from the Nutch - User mailing list archive at Nabble.com.

Re: Dependencies between Plugin

Posted by Alaak <al...@gmx.de>.
Hi,

Ok. I think I got it. In addition to adding the following lines to 
plugin.xml:
<requires>
<import plugin="parse-html"/>
</requires>

I needed to add the following lines to build.xml:

<path id="plugin.deps">
         <fileset dir="${nutch.root}/build">
             <include name="**/parse-html/*.jar" />
         </fileset>
</path>

An example how this works can be found in the parse-html plugin itself. 
Just in case someone else has the same problem.

Regards

Am Di 21 Aug 2012 09:44:41 CEST schrieb Alaak:
>
> Hi,
>
> Thanks for your help.
>
> I already implemented that example and it works nicely. My problem now
> is that I need my plugin to have a dependency on an existing nutch
> plugin. To be more concrete on the parse-html plugin. However I do not
> know which of the three configuration files (plugin.xml, ivy.xml,
> build.xml) to change so that Nutch finds my dependency and builds
> successfully.
>
> Regards
>
> Am Di 21 Aug 2012 03:33:27 CEST schrieb feng lu:
>>
>>
>> http://wiki.apache.org/nutch/WritingPluginExample#Writing_a_Nutch_Plugin
>>
>> An example of how to write a nutch plugin, hope this could help you.It
>> use ant to compile the plugin.
>>
>> On Tue, Aug 21, 2012 at 1:17 AM, Alaak <alaak@gmx.de
>> <ma...@gmx.de>> wrote:
>>
>> Hi,
>>
>> I wrote my own plugin containing a main method which is called for
>> testing purposes as described under:
>> http://wiki.apache.org/nutch/__AboutPlugins
>> <http://wiki.apache.org/nutch/AboutPlugins>
>>
>> However, since this is an IndexingFilter I would like to get the
>> output of the "parse-html" plugin for my tests. The problem is, I
>> do not know how to add this dependency to my project. I tried it with:
>>
>> <requires>
>> <import plugin="parse-html"/>
>> </requires>
>>
>> in my plugin.xml. But this results only in the message that the
>> HtmlParser class can not be found while building Nutch.
>>
>> It would be great if someone tells me how to achieve this or what
>> to read to aqcuire the necessary knowledge.
>>
>> Thanks
>>
>>
>>
>>
>> -- 
>> Don't Grow Old, Grow Up... :-)

Re: Dependencies between Plugin

Posted by Alaak <al...@gmx.de>.
Hi,

Thanks for your help.

I already implemented that example and it works nicely. My problem now 
is that I need my plugin to have a dependency on an existing nutch 
plugin. To be more concrete on the parse-html plugin. However I do not 
know which of the three configuration files (plugin.xml, ivy.xml, 
build.xml) to change so that Nutch finds my dependency and builds 
successfully.

Regards

Am Di 21 Aug 2012 03:33:27 CEST schrieb feng lu:
>
> http://wiki.apache.org/nutch/WritingPluginExample#Writing_a_Nutch_Plugin
>
> An example of how to write a nutch plugin, hope this could help you.It
> use ant to compile the plugin.
>
> On Tue, Aug 21, 2012 at 1:17 AM, Alaak <alaak@gmx.de
> <ma...@gmx.de>> wrote:
>
> Hi,
>
> I wrote my own plugin containing a main method which is called for
> testing purposes as described under:
> http://wiki.apache.org/nutch/__AboutPlugins
> <http://wiki.apache.org/nutch/AboutPlugins>
>
> However, since this is an IndexingFilter I would like to get the
> output of the "parse-html" plugin for my tests. The problem is, I
> do not know how to add this dependency to my project. I tried it with:
>
> <requires>
> <import plugin="parse-html"/>
> </requires>
>
> in my plugin.xml. But this results only in the message that the
> HtmlParser class can not be found while building Nutch.
>
> It would be great if someone tells me how to achieve this or what
> to read to aqcuire the necessary knowledge.
>
> Thanks
>
>
>
>
> -- 
> Don't Grow Old, Grow Up... :-)

Re: Dependencies between Plugin

Posted by feng lu <am...@gmail.com>.
http://wiki.apache.org/nutch/WritingPluginExample#Writing_a_Nutch_Plugin

An example of how to write a nutch plugin, hope this could help you.It use
ant to compile the plugin.

On Tue, Aug 21, 2012 at 1:17 AM, Alaak <al...@gmx.de> wrote:

> Hi,
>
> I wrote my own plugin containing a main method which is called for testing
> purposes as described under: http://wiki.apache.org/nutch/**AboutPlugins<http://wiki.apache.org/nutch/AboutPlugins>
>
> However, since this is an IndexingFilter I would like to get the output of
> the "parse-html" plugin for my tests. The problem is, I do not know how to
> add this dependency to my project. I tried it with:
>
> <requires>
>         <import plugin="parse-html"/>
> </requires>
>
> in my plugin.xml. But this results only in the message that the HtmlParser
> class can not be found while building Nutch.
>
> It would be great if someone tells me how to achieve this or what to read
> to aqcuire the necessary knowledge.
>
> Thanks
>



-- 
Don't Grow Old, Grow Up... :-)