You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ab...@apache.org on 2006/03/13 13:16:55 UTC
svn commit: r385531 -
/lucene/nutch/trunk/src/java/org/apache/nutch/plugin/PluginManifestParser.java
Author: ab
Date: Mon Mar 13 04:16:54 2006
New Revision: 385531
URL: http://svn.apache.org/viewcvs?rev=385531&view=rev
Log:
Print out the full path of plugins directory. Allow using plugins
located outside classpath, eg. in shared repos.
Submitted by Stefan Groschupf, NUTCH-229.
Modified:
lucene/nutch/trunk/src/java/org/apache/nutch/plugin/PluginManifestParser.java
Modified: lucene/nutch/trunk/src/java/org/apache/nutch/plugin/PluginManifestParser.java
URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/src/java/org/apache/nutch/plugin/PluginManifestParser.java?rev=385531&r1=385530&r2=385531&view=diff
==============================================================================
--- lucene/nutch/trunk/src/java/org/apache/nutch/plugin/PluginManifestParser.java (original)
+++ lucene/nutch/trunk/src/java/org/apache/nutch/plugin/PluginManifestParser.java Mon Mar 13 04:16:54 2006
@@ -78,7 +78,7 @@
File directory = getPluginFolder(name);
if (directory == null)
continue;
- LOG.info("Plugins: looking in: " + directory);
+ LOG.info("Plugins: looking in: " + directory.getAbsolutePath());
File[] files = directory.listFiles();
if (files == null)
continue;
@@ -115,7 +115,10 @@
if (!directory.isAbsolute()) {
URL url = PluginManifestParser.class.getClassLoader().getResource(
name);
- if (url == null) {
+ if (url == null && directory.exists()
+ && directory.isDirectory() && directory.listFiles().length > 0) {
+ return directory; // relative path that is not in the classpath
+ } else if (url == null) {
LOG.warning("Plugins: directory not found: " + name);
return null;
} else if (!"file".equals(url.getProtocol())) {