nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Kubes (JIRA)" <>
Subject [jira] Updated: (NUTCH-609) Allow Plugins to be Loaded from Jar File(s)
Date Tue, 12 Feb 2008 22:24:07 GMT


Dennis Kubes updated NUTCH-609:

    Attachment: NUTCH-609-1-20080212.patch

Rough first draft of patch.  After research I determined that to load classes via  a jar within
a jar that a custom classloader would need to be written.  I figured that wasn't the right
path to go down right now so created a utility to manage the deletion of resources (files
and folders) during shutdown and methods to allow plugins to be unzipped into a temporary
folder (the system temp dir by default although this is configurable).  This patch will take
any jar file on the classpath that ends in plugin.jar or plugins.jar and will unzip its contents
into the plugins temp directory.  This is then added to the plugin folders and parsed as normal.
 The plugins temp dir will be kept until the JVM shuts down at which point it and all the
resources it contains will be deleted by a shutdown hook.

Please let me know thoughts on this approach.  I would still need to add unit tests and documentation
for these classes and methods.  :)

> Allow Plugins to be Loaded from Jar File(s)
> -------------------------------------------
>                 Key: NUTCH-609
>                 URL:
>             Project: Nutch
>          Issue Type: Improvement
>    Affects Versions: 1.0.0
>         Environment: All
>            Reporter: Dennis Kubes
>            Assignee: Dennis Kubes
>             Fix For: 1.0.0
>         Attachments: NUTCH-609-1-20080212.patch
> Currently plugins cannot be loaded from a jar file.  Plugins must be unzipped in one
or more directories specified by the plugin.folders config.  I have been thinking about an
extension to PluginRepository or PluginManifestParser (or both) that would allow plugins to
packaged into multiple independent jar files and placed on the classpath.  The system would
search the classpath for resources with the correct folder name and would load any plugins
in those jars.
> This functionality would be very useful in making the nutch core more flexible in terms
of packaging.  It would also help with web applications where we don't want to have a plugins
directory included in the webapp.
> Thoughts so far are unzipping those plugin jars into a common temp directory before loading.
 Another option is using something like commons vfs to interact with the jar files.  VFS essential
uses a disk based temporary cache for jar files, so it is pretty much the same solution. 
 What are everyone else's thoughts on this?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message