Apache Nutch is an extensible and scalable web crawler
NUTCH-1776 Log incorrect plugin.folder file path
Sebastian Nagel248e317afd4f
diff --git a/CHANGES.txt b/CHANGES.txtindex 7a56bc8d4..33f820c3c 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogNutch Current Development+* NUTCH-1776 Log incorrect plugin.folder file path (Diaa via snagel)+* NUTCH-1566 bin/nutch to allow whitespace in paths (tejasp, snagel)* NUTCH-1605 MIME type detector recognizes xlsx as zip file (snagel)diff --git a/src/java/org/apache/nutch/plugin/PluginManifestParser.java b/src/java/org/apache/nutch/plugin/PluginManifestParser.javaindex 147adbcc1..fe8d86923 100644--- a/src/java/org/apache/nutch/plugin/PluginManifestParser.java+++ b/src/java/org/apache/nutch/plugin/PluginManifestParser.java@@ -134,6 +134,9 @@ public class PluginManifestParser {} catch (UnsupportedEncodingException e) {}directory = new File(path);+ } else if (!directory.exists()) {+ LOG.warn("Plugins: directory not found: " + name);+ return null;}return directory;}diff --git a/src/java/org/apache/nutch/plugin/PluginRepository.java b/src/java/org/apache/nutch/plugin/PluginRepository.javaindex 1bbe1bef9..0c272a59d 100644--- a/src/java/org/apache/nutch/plugin/PluginRepository.java+++ b/src/java/org/apache/nutch/plugin/PluginRepository.java@@ -74,6 +74,10 @@ public class PluginRepository {PluginManifestParser manifestParser = new PluginManifestParser(this.conf, this);Map<String, PluginDescriptor> allPlugins = manifestParser.parsePluginFolder(pluginFolders);+ if (allPlugins.isEmpty()) {+ LOG.warn("No plugins found on paths of property plugin.folders=\"{}\"",+ conf.get("plugin.folders"));+ }Pattern excludes = Pattern.compile(conf.get("plugin.excludes", ""));Pattern includes = Pattern.compile(conf.get("plugin.includes", ""));Map<String, PluginDescriptor> filteredPlugins = filter(excludes, includes,