Yes, there is an easier way. Implement a custom task to which you'll pass a path to plugin.xml and a name for a path. The task (Java code) will create a named (id) <path> object which can be subsequently used in ant with <classpath refid="xxx" />.

This requires a custom ant task, but as you mentioned foreach is also a separate library, so I don't see a huge disadvantage.

Carrot2 codebase contains similar fuctionality in carrot2-ant-extensions module, although it should be trivial to implement it from scratch.

D.

Jérôme Charron wrote:
Is there any ant guru in the nutch-dev list?
Since the number of plugins increase in nutch and that dependencies becomes
more and more used, I would like to add in build-plugin.xml the capability
to dynamicaly add into the classpath the dependencies defined in a
plugin.xml file (this avoid to declare dependencies twice in a plugin : once
in the plugin's build.xml and once in the plugin's plugin.xml).
So if someone have any idea on how to perform such behavior...
The only way I saw was to load the plugin.xml file using the <xml property>
ant task, then access the ${plugin.requires.import(plugin)} property which
contains all the plugins dependencies separated e a comma (ie
nutch-extensionpoints,lib-jakarta-poi,...)
The idea is then to use the <foreach> ant task to iterate over these values
and then build a fileset ....
(foreach task requires to import antcontrib in ant).

Is there an easiest way to implement this?

Thanks

Jérôme



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers

Reply via email to