The attached patch (diff -c) to PluginManifestParser_orig.java skips plugin subfolders which begin with a period. The practical use of this is to keep Nutch from throwing warnings in the presence of hidden version-control folders like ".cvs", ".svn", ".git", etc. Like the following, for example:

2007-07-03 12:13:26,543 WARN plugin.PluginRepository - java.io.FileNotFoundException: /home/dfuhry/kddb/opidig/nutch-0.9/plugins/.svn/plugin.xml (No such file
or directory)

Thanks,

Dave Fuhry
*** /home/dfuhry/tmp/PluginManifestParser_orig.java	2007-07-03 13:15:55.000000000 -0400
--- src/java/org/apache/nutch/plugin/PluginManifestParser.java	2007-07-03 13:16:16.000000000 -0400
***************
*** 86,91 ****
--- 86,94 ----
        LOG.info("Plugins: looking in: " + directory.getAbsolutePath());
        for (File oneSubFolder : directory.listFiles()) {
          if (oneSubFolder.isDirectory()) {
+           if (oneSubFolder.getName().startsWith(".")) {
+             continue;
+           }
            String manifestPath = oneSubFolder.getAbsolutePath() + File.separator
                + "plugin.xml";
            try {

Reply via email to