Problems related to compiling:
1: Compiled plugin jars and files are not making it to nutch-0.9/plugin
2: ant package gives errors with both ant 1.6.5 and ant 1.7
3: even Apache example doesn't compile under nutch-0.9
Not sure if item 2 is the cause of item 1 or not, but was trying to fix it
just in case. Problem 1 is more serious.
Problem 1:
When I use ant to compile plugins, they never make it from the build
directory. I'm running ant with the default target in the main nutch-0.9
directory.
I did add my job to src/plugin/build.xml And I do see files show up in
build. They just never make it to the main plugin dir structure.
As another test, I've even tried temporarily removing a core plugin and ant
doesn't rebuild that either.
Attempted fix:
I wondered if maybe the default ant target wasn't supposed to create the
dirs and jars in the main plugin directory structure, and that maybe I
needed to run ant package.
I wondered if trying "ant package" would force it to migrate the files from
/build/ to /plugin/. (is that correct??)
That led to problem 2, when I run "ant package" from the main dir I get
errors. (I'm not sure I this was the correct fix or not..)
Problem 2:
I'm getting (different) errors with both ant 1.6.5 and 1.7. I'm not sure if
either errors are related to the main problem.
Ant 1.6.5
ant package
BUILD FAILED
/home/mbennett/build_nutch/build.xml:442: The following error occurred while
executing this line:
/home/mbennett/build_nutch/build.xml:408: java.lang.ClassNotFoundException:
org.apache.tools.ant.taskdefs.optional.TraXLiaison
I saw comments that yum wasn't installing ant 1.7, so I did a manual install
of that.
Ant 1.7
ant package
BUILD FAILED
/home/mbennett/build_nutch/build.xml:61: Specify at least one source--a file
or resource collection.
build.xml line 61 has:
<touch datetime="01/25/1971 2:00 pm">
<fileset dir="${conf.dir}" includes="**/*.template"/>
</touch>
I'm not an ant expert, but ant 1.6.5 didn't complain about this particular
line.
Problem 3:
This example doesn't compile, lots of changes needed.
http://wiki.apache.org/nutch/WritingPluginExample
It seems to be related to logging classes at a minimum.
I got part way through it.
The boost-urlpattern class seems way out of date too. That's the one I've
been trying to port to 0.9
http://issues.apache.org/jira/browse/NUTCH-16
In addition to logging, it appears that the initialization of extensions has
changed, and how they find their current directory (to read config files
from, etc).
Stefan's Plugins doc on the Wiki also seems to be missing.
On this page:
http://wiki.apache.org/nutch/PluginCentral
The link to "Writing Plugins - by Stefan" goes to this URL:
http://wiki.media-style.com/display/nutchDocu/Write+a+plugin
I'm not whining, it's just that I was trying to find some working example in
nutch-0.9.
I'm really stuck trying to get any extension to work in 0.9 :-(
I would really appreciate any advice on any of this, or talking to anybody
who's been able to compile extensions in nutch-0.9. I'm sure I'm doing
something "dumb".
Mark