Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2890 Upgrade protocol-okhttp to use OkHttp 4.9.1

Sebastian Nageled6a942ca407
diff --git a/src/plugin/protocol-okhttp/howto_upgrade_okhttp.txt b/src/plugin/protocol-okhttp/howto_upgrade_okhttp.txt
new file mode 100644
index 000000000..b3b6f1f22
--- /dev/null
+++ b/src/plugin/protocol-okhttp/howto_upgrade_okhttp.txt
@@ -0,0 +1,27 @@
+1. Upgrade OkHttp dependency in src/plugin/protocol-okhttp/ivy.xml
+
+2. Upgrade OkHttp's own dependencies in src/plugin/protocol-okhttp/plugin.xml
+
+ To get the list of dependencies and their versions execute in the Nutch root
+ folder:
+ $ ant clean runtime
+ $ ls build/plugins/protocol-okhttp/ \
+ | grep '\.jar$' \
+ | grep -vF protocol-okhttp.jar \
+ | sed 's/^/ <library name="/g' | sed 's/$/"\/>/g'
+
+ In the plugin.xml replace all lines between
+ <!-- dependencies of OkHttp -->
+ and
+ <!-- end of dependencies of OkHttp -->
+ with the output of the command above.
+
+3. Build Nutch and run all unit tests:
+
+ $ ant clean runtime test
+
+ At least, run the protocol-okhttp unit tests:
+
+ $ ant test-plugin -Dplugin=protocol-okhttp
+
+4. (optionally but recommended) Run a test crawl using protocol-okhttp
\ No newline at end of file
diff --git a/src/plugin/protocol-okhttp/ivy.xml b/src/plugin/protocol-okhttp/ivy.xml
index c5c09c89e..36befcf45 100644
--- a/src/plugin/protocol-okhttp/ivy.xml
+++ b/src/plugin/protocol-okhttp/ivy.xml
@@ -36,8 +36,8 @@
</publications>
<dependencies>
- <dependency org="com.squareup.okhttp3" name="okhttp" rev="4.3.1"/>
- <dependency org="com.squareup.okhttp3" name="okhttp-brotli" rev="4.3.1"/>
+ <dependency org="com.squareup.okhttp3" name="okhttp" rev="4.9.1"/>
+ <dependency org="com.squareup.okhttp3" name="okhttp-brotli" rev="4.9.1"/>
</dependencies>
</ivy-module>
diff --git a/src/plugin/protocol-okhttp/plugin.xml b/src/plugin/protocol-okhttp/plugin.xml
index bbeb5daf5..5138a155e 100755
--- a/src/plugin/protocol-okhttp/plugin.xml
+++ b/src/plugin/protocol-okhttp/plugin.xml
@@ -25,13 +25,17 @@
<library name="protocol-okhttp.jar">
<export name="*"/>
</library>
- <library name="okhttp-4.3.1.jar"/>
- <library name="okio-2.4.1.jar"/>
- <library name="kotlin-stdlib-1.3.61.jar"/>
- <library name="kotlin-stdlib-common-1.3.61.jar"/>
+ <!-- dependencies of OkHttp -->
+ <library name="okhttp-4.9.1.jar"/>
+ <library name="okhttp-brotli-4.9.1.jar"/>
+ <library name="okio-2.8.0.jar"/>
+ <library name="kotlin-stdlib-1.4.10.jar"/>
+ <library name="kotlin-stdlib-common-1.4.10.jar"/>
+ <library name="kotlin-stdlib-jdk7-1.4.10.jar"/>
+ <library name="kotlin-stdlib-jdk8-1.4.10.jar"/>
<library name="annotations-13.0.jar"/>
- <library name="okhttp-brotli-4.3.1.jar"/>
<library name="dec-0.1.2.jar"/>
+ <!-- end of dependencies of OkHttp -->
</runtime>
<requires>