Well, I don't have much time right now to streamline the compiling
from source approach and hc devs either don't care or don't feel like
clarifying the whereabouts of it.
~
Here is a self-logging, less-than-2-minutes (seconds if you write up
a bash script) way to set up HC if you use the binary libraries they
offer at:
~
http://www.apache.org/dist/httpcomponents/httpclient/binary (<url_path>)
~
I just went about:
~
1) grabbing the latest libraries (currently <x.x.x>) and their KEYS file from:
~
$ date
$ pwd
$ wget --server-response --no-verbose
<url_path>/httpcomponents-client-<x.x.x>-bin.tar.gz
$ wget --server-response --no-verbose
<url_path>/httpcomponents-client-<x.x.x>-bin.tar.gz.asc
$ wget --server-response --no-verbose
<url_path>/httpcomponents-client-<x.x.x>-bin.tar.gz.md5
$ wget --server-response --no-verbose <url_path>/KEYS
(same with osgi library)
$ ls -l httpcomponents-client-<x.x.x>*.*
~
2) checking with md5sum and gpg
mf5sum -b httpcomponents-client-<x.x.x>-bin.tar.gz
cat httpcomponents-client-<x.x.x>-bin.tar.gz.md5
$ gpg --import KEYS
$ gpg --verify httpcomponents-client-<x.x.x>-bin.tar.gz.asc
$ gpg --verify httpcomponents-client-<x.x.x>-osgi-bin.tar.gz.asc
~
3) gunzipping the tar balls
~
tar xzvf httpcomponents-client-<x.x.x>-bin.tar.gz
tar xzvf httpcomponents-client-<x.x.x>-osgi-bin.tar.gz
~
4) setting the CLASSPATH
~
$ export
HC_LIB_HOME="/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib"
$ echo $HC_LIB_HOME
/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib
$ ls -l $HC_LIB_HOME
total 1096
-rw-r--r-- 1 knoppix knoppix 232771 Apr 10 2012 commons-codec-1.6.jar
-rw-r--r-- 1 knoppix knoppix 60686 Dec 4 2011 commons-logging-1.1.1.jar
-rw-r--r-- 1 knoppix knoppix 21886 Jun 29 19:40 fluent-hc-<x.x.x>.jar
-rw-r--r-- 1 knoppix knoppix 427022 Jun 29 19:40 httpclient-<x.x.x>.jar
-rw-r--r-- 1 knoppix knoppix 115096 Jun 29 19:39 httpclient-cache-<x.x.x>.jar
-rw-r--r-- 1 knoppix knoppix 223374 Jun 10 15:13 httpcore-<x.x.x>.jar
-rw-r--r-- 1 knoppix knoppix 26598 Jun 29 19:40 httpmime-<x.x.x>.jar
$ export
CLASSPATH="$HC_LIB_HOME/httpcore-<x.x.x>.jar:$HC_LIB_HOME/httpclient-<x.x.x>.jar:$HC_LIB_HOME/httpclient-cache-<x.x.x>.jar:$HC_LIB_HOME/commons-logging-1.1.1.jar:$HC_LIB_HOME/commons-codec-1.6.jar:$HC_LIB_HOME/fluent-hc-<x.x.x>.jar:$HC_LIB_HOME/httpmime-<x.x.x>.jar:."
$ echo $CLASSPATH
/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib/httpcore-<x.x.x>.jar:/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib/httpclient-<x.x.x>.jar:/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib/httpclient-cache-<x.x.x>.jar:/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib/commons-logging-1.1.1.jar:/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib/commons-codec-1.6.jar:/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib/fluent-hc-<x.x.x>.jar:/media/sdb1/inst/srcs/hc/bin/httpcomponents-client-<x.x.x>/lib/httpmime-<x.x.x>.jar:.
~
5) and compiling all examples
~
$ find /media/sdb1/prjx/kd/java/net/hc/examples -type f -name "*.java"
-print -exec javac {} \;
~
in order to test them
~
thanks
lbrtchx
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]