Apache Nutch is an extensible and scalable web crawler
How to Upgrade Apache Tika in Nutch
Nutch uses official Apache Tika artifacts for document parsing and language detection.
Upgrade Steps
Upgrade Tika dependency (tika-core) in ivy/ivy.xml
Upgrade Tika dependency (tika-parsers-standard-package) in src/plugin/parse-tika/ivy.xml Note: The tika-handler-boilerpipe module provides Boilerpipe support for text extraction (tika.extractor=boilerpipe configuration). This was moved from tika-core in TIKA-4138.
Upgrade Tika's own dependencies in src/plugin/parse-tika/plugin.xml
To get the list of dependencies and their versions execute: $ cd src/plugin/parse-tika/ $ ant -f ./build-ivy.xml $ ls lib | sed 's/^/ <library name="/g' | sed 's/$/"/>/g'
In the plugin.xml replace all lines between
and
with the output of the command above.
(Optionally) remove overlapping dependencies between parse-tika and Nutch core dependencies:
- check for libs present both in build/lib and build/plugins/parse-tika/ (eventually with different versions)
- duplicated libs can be added to the exclusions of transitive dependencies in src/plugin/parse-tika/ivy.xml
- but the library versions in ivy/ivy.xml MUST correspond to those required by Tika
Remove the locally "installed" dependencies in src/plugin/parse-tika/lib/:
$ rm -rf lib/
Repeat steps 2-5 for the language-identifier plugin which also depends on Tika modules
$ cd ../language-identifier/
Update tika-langdetect-optimaize in src/plugin/language-identifier/ivy.xml Then regenerate the library list in plugin.xml: $ ant -f ./build-ivy.xml $ ls lib | sed 's/^/ <library name="/g' | sed 's/$/"/>/g'
Build Nutch and run all unit tests:
$ cd ../../../ $ ant clean runtime test