You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/26 11:01:00 UTC

[camel] branch master updated: CAMEL-14794: camel-weather - Upgrade to http client 4.x.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 01471c9  CAMEL-14794: camel-weather - Upgrade to http client 4.x.
01471c9 is described below

commit 01471c947fbba5a962aa94f423b91f68eafbb920
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 26 11:56:32 2020 +0100

    CAMEL-14794: camel-weather - Upgrade to http client 4.x.
---
 components/camel-weather/pom.xml                   |  11 +-
 .../weather/WeatherComponentConfigurer.java        |  15 +-
 .../weather/WeatherEndpointConfigurer.java         |  40 ---
 .../apache/camel/component/weather/weather.json    |  13 +-
 .../src/main/docs/weather-component.adoc           |  15 +-
 .../camel/component/weather/WeatherComponent.java  |  97 ++----
 .../component/weather/WeatherConfiguration.java    | 108 +-----
 .../camel/component/weather/WeatherConsumer.java   |  18 +-
 .../camel/component/weather/WeatherProducer.java   |  18 +-
 .../geolocation/FreeGeoIpGeoLocationProvider.java  |  23 +-
 .../http/AuthenticationHttpClientConfigurer.java   |  53 ---
 .../weather/http/AuthenticationMethod.java         |  25 --
 .../weather/http/CompositeHttpConfigurer.java      |  51 ---
 .../weather/http/HttpClientConfigurer.java         |  33 --
 .../dsl/WeatherComponentBuilderFactory.java        |  42 +--
 .../dsl/WeatherEndpointBuilderFactory.java         | 363 ---------------------
 .../modules/ROOT/pages/camel-3x-upgrade-guide.adoc |   6 +
 17 files changed, 95 insertions(+), 836 deletions(-)

diff --git a/components/camel-weather/pom.xml b/components/camel-weather/pom.xml
index 8415888..313db90 100644
--- a/components/camel-weather/pom.xml
+++ b/components/camel-weather/pom.xml
@@ -31,12 +31,6 @@
     <name>Camel :: Weather</name>
     <description>Camel Weather support</description>
 
-    <properties>
-        <camel.osgi.import.additional>
-            org.apache.commons.httpclient.*;version="[3.1,4.0)"
-        </camel.osgi.import.additional>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.camel</groupId>
@@ -44,9 +38,8 @@
         </dependency>
 
         <dependency>
-            <groupId>commons-httpclient</groupId>
-            <artifactId>commons-httpclient</artifactId>
-            <version>${httpclient-version}</version>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
         </dependency>
 
         <!-- Jackson -->
diff --git a/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherComponentConfigurer.java b/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherComponentConfigurer.java
index 6af384f..6cf87cb 100644
--- a/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherComponentConfigurer.java
+++ b/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherComponentConfigurer.java
@@ -23,10 +23,8 @@ public class WeatherComponentConfigurer extends PropertyConfigurerSupport implem
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
-        case "geolocationaccesskey":
-        case "geolocationAccessKey": target.setGeolocationAccessKey(property(camelContext, java.lang.String.class, value)); return true;
-        case "geolocationrequesthostip":
-        case "geolocationRequestHostIP": target.setGeolocationRequestHostIP(property(camelContext, java.lang.String.class, value)); return true;
+        case "httpclient":
+        case "httpClient": target.setHttpClient(property(camelContext, org.apache.http.impl.client.CloseableHttpClient.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         default: return false;
@@ -38,8 +36,7 @@ public class WeatherComponentConfigurer extends PropertyConfigurerSupport implem
         Map<String, Object> answer = new CaseInsensitiveMap();
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("bridgeErrorHandler", boolean.class);
-        answer.put("geolocationAccessKey", java.lang.String.class);
-        answer.put("geolocationRequestHostIP", java.lang.String.class);
+        answer.put("httpClient", org.apache.http.impl.client.CloseableHttpClient.class);
         answer.put("lazyStartProducer", boolean.class);
         return answer;
     }
@@ -52,10 +49,8 @@ public class WeatherComponentConfigurer extends PropertyConfigurerSupport implem
         case "basicPropertyBinding": return target.isBasicPropertyBinding();
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": return target.isBridgeErrorHandler();
-        case "geolocationaccesskey":
-        case "geolocationAccessKey": return target.getGeolocationAccessKey();
-        case "geolocationrequesthostip":
-        case "geolocationRequestHostIP": return target.getGeolocationRequestHostIP();
+        case "httpclient":
+        case "httpClient": return target.getHttpClient();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
         default: return null;
diff --git a/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherEndpointConfigurer.java b/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherEndpointConfigurer.java
index 1b6cc01..c560917 100644
--- a/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherEndpointConfigurer.java
+++ b/components/camel-weather/src/generated/java/org/apache/camel/component/weather/WeatherEndpointConfigurer.java
@@ -43,8 +43,6 @@ public class WeatherEndpointConfigurer extends PropertyConfigurerSupport impleme
         case "greedy": target.setGreedy(property(camelContext, boolean.class, value)); return true;
         case "headername":
         case "headerName": target.getConfiguration().setHeaderName(property(camelContext, java.lang.String.class, value)); return true;
-        case "httpconnectionmanager":
-        case "httpConnectionManager": target.getConfiguration().setHttpConnectionManager(property(camelContext, org.apache.commons.httpclient.HttpConnectionManager.class, value)); return true;
         case "ids": target.getConfiguration().setIds(property(camelContext, java.lang.String.class, value)); return true;
         case "initialdelay":
         case "initialDelay": target.setInitialDelay(property(camelContext, long.class, value)); return true;
@@ -58,20 +56,6 @@ public class WeatherEndpointConfigurer extends PropertyConfigurerSupport impleme
         case "period": target.getConfiguration().setPeriod(property(camelContext, java.lang.String.class, value)); return true;
         case "pollstrategy":
         case "pollStrategy": target.setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
-        case "proxyauthdomain":
-        case "proxyAuthDomain": target.getConfiguration().setProxyAuthDomain(property(camelContext, java.lang.String.class, value)); return true;
-        case "proxyauthhost":
-        case "proxyAuthHost": target.getConfiguration().setProxyAuthHost(property(camelContext, java.lang.String.class, value)); return true;
-        case "proxyauthmethod":
-        case "proxyAuthMethod": target.getConfiguration().setProxyAuthMethod(property(camelContext, java.lang.String.class, value)); return true;
-        case "proxyauthpassword":
-        case "proxyAuthPassword": target.getConfiguration().setProxyAuthPassword(property(camelContext, java.lang.String.class, value)); return true;
-        case "proxyauthusername":
-        case "proxyAuthUsername": target.getConfiguration().setProxyAuthUsername(property(camelContext, java.lang.String.class, value)); return true;
-        case "proxyhost":
-        case "proxyHost": target.getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
-        case "proxyport":
-        case "proxyPort": target.getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
         case "repeatcount":
         case "repeatCount": target.setRepeatCount(property(camelContext, long.class, value)); return true;
         case "rightlon":
@@ -120,7 +104,6 @@ public class WeatherEndpointConfigurer extends PropertyConfigurerSupport impleme
         answer.put("geolocationRequestHostIP", java.lang.String.class);
         answer.put("greedy", boolean.class);
         answer.put("headerName", java.lang.String.class);
-        answer.put("httpConnectionManager", org.apache.commons.httpclient.HttpConnectionManager.class);
         answer.put("ids", java.lang.String.class);
         answer.put("initialDelay", long.class);
         answer.put("language", org.apache.camel.component.weather.WeatherLanguage.class);
@@ -131,13 +114,6 @@ public class WeatherEndpointConfigurer extends PropertyConfigurerSupport impleme
         answer.put("mode", org.apache.camel.component.weather.WeatherMode.class);
         answer.put("period", java.lang.String.class);
         answer.put("pollStrategy", org.apache.camel.spi.PollingConsumerPollStrategy.class);
-        answer.put("proxyAuthDomain", java.lang.String.class);
-        answer.put("proxyAuthHost", java.lang.String.class);
-        answer.put("proxyAuthMethod", java.lang.String.class);
-        answer.put("proxyAuthPassword", java.lang.String.class);
-        answer.put("proxyAuthUsername", java.lang.String.class);
-        answer.put("proxyHost", java.lang.String.class);
-        answer.put("proxyPort", java.lang.Integer.class);
         answer.put("repeatCount", long.class);
         answer.put("rightLon", java.lang.String.class);
         answer.put("runLoggingLevel", org.apache.camel.LoggingLevel.class);
@@ -185,8 +161,6 @@ public class WeatherEndpointConfigurer extends PropertyConfigurerSupport impleme
         case "greedy": return target.isGreedy();
         case "headername":
         case "headerName": return target.getConfiguration().getHeaderName();
-        case "httpconnectionmanager":
-        case "httpConnectionManager": return target.getConfiguration().getHttpConnectionManager();
         case "ids": return target.getConfiguration().getIds();
         case "initialdelay":
         case "initialDelay": return target.getInitialDelay();
@@ -200,20 +174,6 @@ public class WeatherEndpointConfigurer extends PropertyConfigurerSupport impleme
         case "period": return target.getConfiguration().getPeriod();
         case "pollstrategy":
         case "pollStrategy": return target.getPollStrategy();
-        case "proxyauthdomain":
-        case "proxyAuthDomain": return target.getConfiguration().getProxyAuthDomain();
-        case "proxyauthhost":
-        case "proxyAuthHost": return target.getConfiguration().getProxyAuthHost();
-        case "proxyauthmethod":
-        case "proxyAuthMethod": return target.getConfiguration().getProxyAuthMethod();
-        case "proxyauthpassword":
-        case "proxyAuthPassword": return target.getConfiguration().getProxyAuthPassword();
-        case "proxyauthusername":
-        case "proxyAuthUsername": return target.getConfiguration().getProxyAuthUsername();
-        case "proxyhost":
-        case "proxyHost": return target.getConfiguration().getProxyHost();
-        case "proxyport":
-        case "proxyPort": return target.getConfiguration().getProxyPort();
         case "repeatcount":
         case "repeatCount": return target.getRepeatCount();
         case "rightlon":
diff --git a/components/camel-weather/src/generated/resources/org/apache/camel/component/weather/weather.json b/components/camel-weather/src/generated/resources/org/apache/camel/component/weather/weather.json
index 249914d..2261cf2 100644
--- a/components/camel-weather/src/generated/resources/org/apache/camel/component/weather/weather.json
+++ b/components/camel-weather/src/generated/resources/org/apache/camel/component/weather/weather.json
@@ -19,11 +19,10 @@
     "version": "3.2.0-SNAPSHOT"
   },
   "componentProperties": {
-    "geolocationAccessKey": { "kind": "property", "displayName": "Geolocation Access Key", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The geolocation service now needs an accessKey to be used" },
-    "geolocationRequestHostIP": { "kind": "property", "displayName": "Geolocation Request Host IP", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The geolocation service now needs to specify the IP associated to the accessKey you're using" },
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by [...]
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
-    "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }
+    "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
+    "httpClient": { "kind": "property", "displayName": "Http Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.http.impl.client.CloseableHttpClient", "deprecated": false, "secret": false, "description": "To use an existing configured http client (for example with http proxy)" }
   },
   "properties": {
     "name": { "kind": "path", "displayName": "Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "The name value is not used." },
@@ -41,7 +40,6 @@
     "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange h [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
     "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "httpConnectionManager": { "kind": "parameter", "displayName": "Http Connection Manager", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.commons.httpclient.HttpConnectionManager", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "To use a custom HttpConnectionManager to manage connections" },
     "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." },
     "cnt": { "kind": "parameter", "displayName": "Cnt", "group": "filter", "label": "filter", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "Number of results to be found" },
     "ids": { "kind": "parameter", "displayName": "Ids", "group": "filter", "label": "filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "List of id's of city\/stations. You can separate multiple ids by comma." },
@@ -52,13 +50,6 @@
     "topLat": { "kind": "parameter", "displayName": "Top Lat", "group": "filter", "label": "filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "For boxed queries this is the top latitude. Needs to be used in combination with rightLon and zoom." },
     "zip": { "kind": "parameter", "displayName": "Zip", "group": "filter", "label": "filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "Zip-code, e.g. 94040,us" },
     "zoom": { "kind": "parameter", "displayName": "Zoom", "group": "filter", "label": "filter", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "For boxed queries this is the zoom. Needs to be used in combination with rightLon and topLat." },
-    "proxyAuthDomain": { "kind": "parameter", "displayName": "Proxy Auth Domain", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "Domain for proxy NTLM authentication" },
-    "proxyAuthHost": { "kind": "parameter", "displayName": "Proxy Auth Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "Optional host for proxy NTLM authentication" },
-    "proxyAuthMethod": { "kind": "parameter", "displayName": "Proxy Auth Method", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "Authentication method for proxy, either as Basic, Digest or NTLM." },
-    "proxyAuthPassword": { "kind": "parameter", "displayName": "Proxy Auth Password", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "Password for proxy authentication" },
-    "proxyAuthUsername": { "kind": "parameter", "displayName": "Proxy Auth Username", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "Username for proxy authentication" },
-    "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "The proxy host name" },
-    "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.weather.WeatherConfiguration", "configurationField": "configuration", "description": "The proxy port number" },
     "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." },
     "backoffIdleThreshold": { "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." },
     "backoffMultiplier": { "kind": "parameter", "displayName": "Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "description": "To let the scheduled polling consumer backoff if there has been a number of subsequent idles\/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option  [...]
diff --git a/components/camel-weather/src/main/docs/weather-component.adoc b/components/camel-weather/src/main/docs/weather-component.adoc
index b9201ff..3624e28 100644
--- a/components/camel-weather/src/main/docs/weather-component.adoc
+++ b/components/camel-weather/src/main/docs/weather-component.adoc
@@ -52,18 +52,17 @@ from where you're using the API now on.
 
 
 // component options: START
-The Weather component supports 5 options, which are listed below.
+The Weather component supports 4 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *geolocationAccessKey* (common) | The geolocation service now needs an accessKey to be used |  | String
-| *geolocationRequestHostIP* (common) | The geolocation service now needs to specify the IP associated to the accessKey you're using |  | String
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
+| *httpClient* (advanced) | To use an existing configured http client (for example with http proxy) |  | CloseableHttpClient
 |===
 // component options: END
 
@@ -88,7 +87,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (48 parameters):
+=== Query Parameters (40 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -108,7 +107,6 @@ with the following path and query parameters:
 | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. |  | PollingConsumerPollStrategy
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
-| *httpConnectionManager* (advanced) | To use a custom HttpConnectionManager to manage connections |  | HttpConnectionManager
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *cnt* (filter) | Number of results to be found |  | Integer
 | *ids* (filter) | List of id's of city/stations. You can separate multiple ids by comma. |  | String
@@ -119,13 +117,6 @@ with the following path and query parameters:
 | *topLat* (filter) | For boxed queries this is the top latitude. Needs to be used in combination with rightLon and zoom. |  | String
 | *zip* (filter) | Zip-code, e.g. 94040,us |  | String
 | *zoom* (filter) | For boxed queries this is the zoom. Needs to be used in combination with rightLon and topLat. |  | Integer
-| *proxyAuthDomain* (proxy) | Domain for proxy NTLM authentication |  | String
-| *proxyAuthHost* (proxy) | Optional host for proxy NTLM authentication |  | String
-| *proxyAuthMethod* (proxy) | Authentication method for proxy, either as Basic, Digest or NTLM. |  | String
-| *proxyAuthPassword* (proxy) | Password for proxy authentication |  | String
-| *proxyAuthUsername* (proxy) | Username for proxy authentication |  | String
-| *proxyHost* (proxy) | The proxy host name |  | String
-| *proxyPort* (proxy) | The proxy port number |  | Integer
 | *backoffErrorThreshold* (scheduler) | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. |  | int
 | *backoffIdleThreshold* (scheduler) | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. |  | int
 | *backoffMultiplier* (scheduler) | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. |  | int
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java
index 04b3fc2..5bfe20a 100644
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java
+++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java
@@ -19,16 +19,12 @@ package org.apache.camel.component.weather;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.component.weather.http.AuthenticationHttpClientConfigurer;
-import org.apache.camel.component.weather.http.AuthenticationMethod;
-import org.apache.camel.component.weather.http.CompositeHttpConfigurer;
-import org.apache.camel.component.weather.http.HttpClientConfigurer;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.annotations.Component;
 import org.apache.camel.support.DefaultComponent;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpConnectionManager;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
+import org.apache.camel.util.IOHelper;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
 
 /**
  * A <a href="http://camel.apache.org/weather.html">Weather Component</a>.
@@ -38,7 +34,8 @@ import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
 @Component("weather")
 public class WeatherComponent extends DefaultComponent {
 
-    private HttpClient httpClient;
+    @Metadata(label = "advanced")
+    private CloseableHttpClient httpClient;
     private String geolocationAccessKey;
     private String geolocationRequestHostIP;
 
@@ -48,74 +45,28 @@ public class WeatherComponent extends DefaultComponent {
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         WeatherConfiguration configuration = new WeatherConfiguration(this);
+        configuration.setGeolocationAccessKey(geolocationAccessKey);
+        configuration.setGeolocationRequestHostIP(geolocationRequestHostIP);
 
-        httpClient = createHttpClient(configuration);
-        geolocationAccessKey = configuration.getGeolocationAccessKey();
-        geolocationRequestHostIP = configuration.getGeolocationRequestHostIP();
         WeatherEndpoint endpoint = new WeatherEndpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
-        return endpoint;
-    }
-
-    private HttpClient createHttpClient(WeatherConfiguration configuration) {
-        HttpConnectionManager connectionManager = configuration.getHttpConnectionManager();
-        if (connectionManager == null) {
-            connectionManager = new MultiThreadedHttpConnectionManager();
-        }
-        HttpClient httpClient = new HttpClient(connectionManager);
-
-        if (configuration.getProxyHost() != null && configuration.getProxyPort() != null) {
-            httpClient.getHostConfiguration().setProxy(configuration.getProxyHost(), configuration.getProxyPort());
-        }
-
-        if (configuration.getProxyAuthUsername() != null && configuration.getProxyAuthMethod() == null) {
-            throw new IllegalArgumentException("Option proxyAuthMethod must be provided to use proxy authentication");
-        }
 
-        CompositeHttpConfigurer configurer = new CompositeHttpConfigurer();
-        if (configuration.getProxyAuthMethod() != null) {
-            configureProxyAuth(configurer, configuration.getProxyAuthMethod(), configuration.getProxyAuthUsername(), configuration.getProxyAuthPassword(),
-                               configuration.getProxyAuthDomain(), configuration.getProxyAuthHost());
+        if (httpClient == null) {
+            httpClient = HttpClients.createDefault();
         }
 
-        configurer.configureHttpClient(httpClient);
-
-        return httpClient;
+        return endpoint;
     }
 
-    private HttpClientConfigurer configureProxyAuth(CompositeHttpConfigurer configurer, String authMethod, String username, String password, String domain, String host) {
-        // no proxy auth is in use
-        if (username == null && authMethod == null) {
-            return configurer;
-        }
-
-        // validate mandatory options given
-        if (username != null && authMethod == null) {
-            throw new IllegalArgumentException("Option proxyAuthMethod must be provided to use proxy authentication");
-        }
-
-        ObjectHelper.notNull(authMethod, "proxyAuthMethod");
-        ObjectHelper.notNull(username, "proxyAuthUsername");
-        ObjectHelper.notNull(password, "proxyAuthPassword");
-
-        AuthenticationMethod auth = getCamelContext().getTypeConverter().convertTo(AuthenticationMethod.class, authMethod);
-
-        if (auth == AuthenticationMethod.Basic || auth == AuthenticationMethod.Digest) {
-            configurer.addConfigurer(AuthenticationHttpClientConfigurer.basicAutenticationConfigurer(true, username, password));
-            return configurer;
-        } else if (auth == AuthenticationMethod.NTLM) {
-            // domain is mandatory for NTML
-            ObjectHelper.notNull(domain, "proxyAuthDomain");
-            configurer.addConfigurer(AuthenticationHttpClientConfigurer.ntlmAutenticationConfigurer(true, username, password, domain, host));
-            return configurer;
-        }
-
-        throw new IllegalArgumentException("Unknown proxyAuthMethod " + authMethod);
-
+    public CloseableHttpClient getHttpClient() {
+        return httpClient;
     }
 
-    public HttpClient getHttpClient() {
-        return httpClient;
+    /**
+     * To use an existing configured http client (for example with http proxy)
+     */
+    public void setHttpClient(CloseableHttpClient httpClient) {
+        this.httpClient = httpClient;
     }
 
     public String getGeolocationAccessKey() {
@@ -134,11 +85,19 @@ public class WeatherComponent extends DefaultComponent {
     }
 
     /**
-     * The geolocation service now needs to specify the IP associated to the
-     * accessKey you're using
+     * The geolocation service now needs to specify the IP associated to the accessKey you're using
      */
     public void setGeolocationRequestHostIP(String geolocationRequestHostIP) {
         this.geolocationRequestHostIP = geolocationRequestHostIP;
     }
 
+    @Override
+    protected void doShutdown() throws Exception {
+        super.doShutdown();
+
+        if (httpClient != null) {
+            IOHelper.close(httpClient);
+            httpClient = null;
+        }
+    }
 }
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
index 3f259f8..40a4737 100644
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
+++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
@@ -27,7 +27,8 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.ObjectHelper;
-import org.apache.commons.httpclient.HttpConnectionManager;
+import org.apache.http.conn.HttpClientConnectionManager;
+
 
 import static org.apache.camel.component.weather.WeatherLanguage.en;
 import static org.apache.camel.component.weather.WeatherMode.JSON;
@@ -75,23 +76,6 @@ public class WeatherConfiguration {
     private List<String> ids;
     @UriParam(label = "filter")
     private Integer cnt;
-
-    @UriParam(label = "proxy")
-    private String proxyHost;
-    @UriParam(label = "proxy")
-    private Integer proxyPort;
-    @UriParam(label = "proxy")
-    private String proxyAuthMethod;
-    @UriParam(label = "proxy", secret = true)
-    private String proxyAuthUsername;
-    @UriParam(label = "proxy", secret = true)
-    private String proxyAuthPassword;
-    @UriParam(label = "proxy")
-    private String proxyAuthDomain;
-    @UriParam(label = "proxy")
-    private String proxyAuthHost;
-    @UriParam(label = "advanced")
-    private HttpConnectionManager httpConnectionManager;
     @UriParam(label = "security")
     @Metadata(required = true)
     private String geolocationAccessKey;
@@ -279,94 +263,6 @@ public class WeatherConfiguration {
         this.zoom = zoom;
     }
 
-    public HttpConnectionManager getHttpConnectionManager() {
-        return httpConnectionManager;
-    }
-
-    /**
-     * To use a custom HttpConnectionManager to manage connections
-     */
-    public void setHttpConnectionManager(HttpConnectionManager httpConnectionManager) {
-        this.httpConnectionManager = httpConnectionManager;
-    }
-
-    public String getProxyHost() {
-        return proxyHost;
-    }
-
-    /**
-     * The proxy host name
-     */
-    public void setProxyHost(String proxyHost) {
-        this.proxyHost = proxyHost;
-    }
-
-    public Integer getProxyPort() {
-        return proxyPort;
-    }
-
-    /**
-     * The proxy port number
-     */
-    public void setProxyPort(Integer proxyPort) {
-        this.proxyPort = proxyPort;
-    }
-
-    public String getProxyAuthMethod() {
-        return proxyAuthMethod;
-    }
-
-    /**
-     * Authentication method for proxy, either as Basic, Digest or NTLM.
-     */
-    public void setProxyAuthMethod(String proxyAuthMethod) {
-        this.proxyAuthMethod = proxyAuthMethod;
-    }
-
-    public String getProxyAuthUsername() {
-        return proxyAuthUsername;
-    }
-
-    /**
-     * Username for proxy authentication
-     */
-    public void setProxyAuthUsername(String proxyAuthUsername) {
-        this.proxyAuthUsername = proxyAuthUsername;
-    }
-
-    public String getProxyAuthPassword() {
-        return proxyAuthPassword;
-    }
-
-    /**
-     * Password for proxy authentication
-     */
-    public void setProxyAuthPassword(String proxyAuthPassword) {
-        this.proxyAuthPassword = proxyAuthPassword;
-    }
-
-    public String getProxyAuthDomain() {
-        return proxyAuthDomain;
-    }
-
-    /**
-     * Domain for proxy NTLM authentication
-     */
-    public void setProxyAuthDomain(String proxyAuthDomain) {
-        this.proxyAuthDomain = proxyAuthDomain;
-    }
-
-    public String getProxyAuthHost() {
-        return proxyAuthHost;
-    }
-
-    /**
-     * Optional host for proxy NTLM authentication
-     */
-    public void setProxyAuthHost(String proxyAuthHost) {
-        this.proxyAuthHost = proxyAuthHost;
-    }
-
     public String getZip() {
         return zip;
     }
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConsumer.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConsumer.java
index 34fe68c..e983570 100644
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConsumer.java
+++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConsumer.java
@@ -20,9 +20,11 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.support.ScheduledPollConsumer;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.util.EntityUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -47,14 +49,14 @@ public class WeatherConsumer extends ScheduledPollConsumer {
     protected int poll() throws Exception {
         LOG.debug("Going to execute the Weather query {}", query);
         HttpClient httpClient = ((WeatherComponent) getEndpoint().getComponent()).getHttpClient();
-        GetMethod getMethod = new GetMethod(query);
+        HttpGet getMethod = new HttpGet(query);
         try {
-            int status = httpClient.executeMethod(getMethod);
-            if (status != HttpStatus.SC_OK) {
-                LOG.warn("HTTP call for weather returned error status code {} - {} as a result with query: {}", status, getMethod.getStatusLine(), query);
+            HttpResponse response = httpClient.execute(getMethod);
+            if (HttpStatus.SC_OK != response.getStatusLine().getStatusCode()) {
+                LOG.warn("HTTP call for weather returned error status code {} - {} as a result with query: {}", status, response.getStatusLine().getStatusCode(), query);
                 return 0;
             }
-            String weather = getEndpoint().getCamelContext().getTypeConverter().mandatoryConvertTo(String.class, getMethod.getResponseBodyAsStream());
+            String weather = EntityUtils.toString(response.getEntity(), "UTF-8");
             LOG.debug("Got back the Weather information {}", weather);
             if (ObjectHelper.isEmpty(weather)) {
                 // empty response
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherProducer.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherProducer.java
index 009ad69..5479ed0 100644
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherProducer.java
+++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherProducer.java
@@ -19,9 +19,11 @@ package org.apache.camel.component.weather;
 import org.apache.camel.Exchange;
 import org.apache.camel.support.DefaultProducer;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.util.EntityUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,14 +52,14 @@ public class WeatherProducer extends DefaultProducer {
         }
 
         HttpClient httpClient = ((WeatherComponent) getEndpoint().getComponent()).getHttpClient();
-        GetMethod method = new GetMethod(q);
+        HttpGet method = new HttpGet(q);
         try {
             LOG.debug("Going to execute the Weather query {}", q);
-            int statusCode = httpClient.executeMethod(method);
-            if (statusCode != HttpStatus.SC_OK) {
-                throw new IllegalStateException("Got the invalid http status value '" + method.getStatusLine() + "' as the result of the query '" + query + "'");
+            HttpResponse response = httpClient.execute(method);
+            if (HttpStatus.SC_OK != response.getStatusLine().getStatusCode()) {
+                throw new IllegalStateException("Got the invalid http status value '" + response.getStatusLine().getStatusCode() + "' as the result of the query '" + query + "'");
             }
-            String weather = getEndpoint().getCamelContext().getTypeConverter().mandatoryConvertTo(String.class, method.getResponseBodyAsStream());
+            String weather = EntityUtils.toString(response.getEntity(), "UTF-8");
             LOG.debug("Got back the Weather information {}", weather);
 
             if (ObjectHelper.isEmpty(weather)) {
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/geolocation/FreeGeoIpGeoLocationProvider.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/geolocation/FreeGeoIpGeoLocationProvider.java
index fe85e46..45e377d 100644
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/geolocation/FreeGeoIpGeoLocationProvider.java
+++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/geolocation/FreeGeoIpGeoLocationProvider.java
@@ -19,10 +19,11 @@ package org.apache.camel.component.weather.geolocation;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.weather.WeatherComponent;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.util.EntityUtils;
 
 import static org.apache.camel.util.ObjectHelper.isEmpty;
 import static org.apache.camel.util.ObjectHelper.notNull;
@@ -44,15 +45,15 @@ public class FreeGeoIpGeoLocationProvider implements GeoLocationProvider {
         if (isEmpty(component.getGeolocationRequestHostIP())) {
             throw new IllegalStateException("The geolocation service requires a mandatory geolocationRequestHostIP");
         }
-        GetMethod getMethod = new GetMethod("http://api.ipstack.com/" + component.getGeolocationRequestHostIP());
-        getMethod.setQueryString(new NameValuePair[] {new NameValuePair("access_key", component.getGeolocationAccessKey()), new NameValuePair("legacy", "1"),
-                                                      new NameValuePair("output", "json")});
+
+        String url = String.format("http://api.ipstack.com/%s?access_key=%s&legacy=1&output=json", component.getGeolocationRequestHostIP(), component.getGeolocationAccessKey());
+        HttpGet getMethod = new HttpGet(url);
         try {
-            int statusCode = httpClient.executeMethod(getMethod);
-            if (statusCode != HttpStatus.SC_OK) {
-                throw new IllegalStateException("Got the unexpected http-status '" + getMethod.getStatusLine() + "' for the geolocation");
+            HttpResponse response = httpClient.execute(getMethod);
+            if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
+                throw new IllegalStateException("Got the unexpected http-status '" + response.getStatusLine().getStatusCode() + "' for the geolocation");
             }
-            String geoLocation = component.getCamelContext().getTypeConverter().mandatoryConvertTo(String.class, getMethod.getResponseBodyAsStream());
+            String geoLocation = EntityUtils.toString(response.getEntity(), "UTF-8");
             if (isEmpty(geoLocation)) {
                 throw new IllegalStateException("Got the unexpected value '" + geoLocation + "' for the geolocation");
             }
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/AuthenticationHttpClientConfigurer.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/AuthenticationHttpClientConfigurer.java
deleted file mode 100644
index 8f23bf4..0000000
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/AuthenticationHttpClientConfigurer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.weather.http;
-
-import org.apache.commons.httpclient.Credentials;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.NTCredentials;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-
-public final class AuthenticationHttpClientConfigurer implements HttpClientConfigurer {
-
-    private final boolean proxy;
-    private final Credentials credentials;
-
-    private AuthenticationHttpClientConfigurer(boolean proxy, Credentials credentials) {
-        this.proxy = proxy;
-        this.credentials = credentials;
-    }
-
-    @Override
-    public HttpClient configureHttpClient(HttpClient client) {
-        if (proxy) {
-            client.getState().setProxyCredentials(AuthScope.ANY, this.credentials);
-        } else {
-            client.getState().setCredentials(AuthScope.ANY, this.credentials);
-        }
-
-        return client;
-    }
-
-    public static HttpClientConfigurer basicAutenticationConfigurer(boolean proxy, String user, String pwd) {
-        return new AuthenticationHttpClientConfigurer(proxy, new UsernamePasswordCredentials(user, pwd));
-    }
-
-    public static HttpClientConfigurer ntlmAutenticationConfigurer(boolean proxy, String user, String pwd, String domain, String host) {
-        return new AuthenticationHttpClientConfigurer(proxy, new NTCredentials(user, pwd, host, domain));
-    }
-}
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/AuthenticationMethod.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/AuthenticationMethod.java
deleted file mode 100644
index 3812140..0000000
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/AuthenticationMethod.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.weather.http;
-
-/**
- * Authentication policy
- */
-public enum AuthenticationMethod {
-
-    Basic, Digest, NTLM
-}
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/CompositeHttpConfigurer.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/CompositeHttpConfigurer.java
deleted file mode 100644
index 179f9b0..0000000
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/CompositeHttpConfigurer.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.weather.http;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.commons.httpclient.HttpClient;
-
-public class CompositeHttpConfigurer implements HttpClientConfigurer {
-
-    private final List<HttpClientConfigurer> configurers = new ArrayList<>();
-
-    public void addConfigurer(HttpClientConfigurer configurer) {
-        if (configurer != null) {
-            configurers.add(configurer);
-        }
-    }
-
-    public void removeConfigurer(HttpClientConfigurer configurer) {
-        configurers.remove(configurer);
-    }
-
-    @Override
-    public HttpClient configureHttpClient(HttpClient client) {
-        for (HttpClientConfigurer configurer : configurers) {
-            configurer.configureHttpClient(client);
-        }
-
-        return client;
-    }
-
-    public List<HttpClientConfigurer> getConfigurers() {
-        return Collections.unmodifiableList(configurers);
-    }
-}
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/HttpClientConfigurer.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/HttpClientConfigurer.java
deleted file mode 100644
index bddd978..0000000
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/http/HttpClientConfigurer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.weather.http;
-
-import org.apache.commons.httpclient.HttpClient;
-
-/**
- * A pluggable strategy for configuring the HttpClient used by this component
- */
-public interface HttpClientConfigurer {
-
-    /**
-     * Configure the HttpClient such as setting the authentication or proxying details
-     *
-     * @param client the client
-     * @return the client
-     */
-    HttpClient configureHttpClient(HttpClient client);
-}
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WeatherComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WeatherComponentBuilderFactory.java
index 096a46b..f295840 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WeatherComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/WeatherComponentBuilderFactory.java
@@ -49,31 +49,6 @@ public interface WeatherComponentBuilderFactory {
             extends
                 ComponentBuilder<WeatherComponent> {
         /**
-         * The geolocation service now needs an accessKey to be used.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: common
-         */
-        default WeatherComponentBuilder geolocationAccessKey(
-                java.lang.String geolocationAccessKey) {
-            doSetProperty("geolocationAccessKey", geolocationAccessKey);
-            return this;
-        }
-        /**
-         * The geolocation service now needs to specify the IP associated to the
-         * accessKey you're using.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: common
-         */
-        default WeatherComponentBuilder geolocationRequestHostIP(
-                java.lang.String geolocationRequestHostIP) {
-            doSetProperty("geolocationRequestHostIP", geolocationRequestHostIP);
-            return this;
-        }
-        /**
          * Allows for bridging the consumer to the Camel routing Error Handler,
          * which mean any exceptions occurred while the consumer is trying to
          * pickup incoming messages, or the likes, will now be processed as a
@@ -127,6 +102,20 @@ public interface WeatherComponentBuilderFactory {
             doSetProperty("basicPropertyBinding", basicPropertyBinding);
             return this;
         }
+        /**
+         * To use an existing configured http client (for example with http
+         * proxy).
+         * 
+         * The option is a:
+         * <code>org.apache.http.impl.client.CloseableHttpClient</code> type.
+         * 
+         * Group: advanced
+         */
+        default WeatherComponentBuilder httpClient(
+                org.apache.http.impl.client.CloseableHttpClient httpClient) {
+            doSetProperty("httpClient", httpClient);
+            return this;
+        }
     }
 
     class WeatherComponentBuilderImpl
@@ -144,11 +133,10 @@ public interface WeatherComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "geolocationAccessKey": ((WeatherComponent) component).setGeolocationAccessKey((java.lang.String) value); return true;
-            case "geolocationRequestHostIP": ((WeatherComponent) component).setGeolocationRequestHostIP((java.lang.String) value); return true;
             case "bridgeErrorHandler": ((WeatherComponent) component).setBridgeErrorHandler((boolean) value); return true;
             case "lazyStartProducer": ((WeatherComponent) component).setLazyStartProducer((boolean) value); return true;
             case "basicPropertyBinding": ((WeatherComponent) component).setBasicPropertyBinding((boolean) value); return true;
+            case "httpClient": ((WeatherComponent) component).setHttpClient((org.apache.http.impl.client.CloseableHttpClient) value); return true;
             default: return false;
             }
         }
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WeatherEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WeatherEndpointBuilderFactory.java
index db8c9be..a8b35a8 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WeatherEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/WeatherEndpointBuilderFactory.java
@@ -405,100 +405,6 @@ public interface WeatherEndpointBuilderFactory {
             return this;
         }
         /**
-         * Domain for proxy NTLM authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyAuthDomain(
-                String proxyAuthDomain) {
-            doSetProperty("proxyAuthDomain", proxyAuthDomain);
-            return this;
-        }
-        /**
-         * Optional host for proxy NTLM authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyAuthHost(
-                String proxyAuthHost) {
-            doSetProperty("proxyAuthHost", proxyAuthHost);
-            return this;
-        }
-        /**
-         * Authentication method for proxy, either as Basic, Digest or NTLM.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyAuthMethod(
-                String proxyAuthMethod) {
-            doSetProperty("proxyAuthMethod", proxyAuthMethod);
-            return this;
-        }
-        /**
-         * Password for proxy authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyAuthPassword(
-                String proxyAuthPassword) {
-            doSetProperty("proxyAuthPassword", proxyAuthPassword);
-            return this;
-        }
-        /**
-         * Username for proxy authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyAuthUsername(
-                String proxyAuthUsername) {
-            doSetProperty("proxyAuthUsername", proxyAuthUsername);
-            return this;
-        }
-        /**
-         * The proxy host name.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyHost(String proxyHost) {
-            doSetProperty("proxyHost", proxyHost);
-            return this;
-        }
-        /**
-         * The proxy port number.
-         * 
-         * The option is a: <code>java.lang.Integer</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyPort(Integer proxyPort) {
-            doSetProperty("proxyPort", proxyPort);
-            return this;
-        }
-        /**
-         * The proxy port number.
-         * 
-         * The option will be converted to a <code>java.lang.Integer</code>
-         * type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointConsumerBuilder proxyPort(String proxyPort) {
-            doSetProperty("proxyPort", proxyPort);
-            return this;
-        }
-        /**
          * The number of subsequent error polls (failed due some error) that
          * should happen before the backoffMultipler should kick-in.
          * 
@@ -1022,34 +928,6 @@ public interface WeatherEndpointBuilderFactory {
             return this;
         }
         /**
-         * To use a custom HttpConnectionManager to manage connections.
-         * 
-         * The option is a:
-         * <code>org.apache.commons.httpclient.HttpConnectionManager</code>
-         * type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedWeatherEndpointConsumerBuilder httpConnectionManager(
-                Object httpConnectionManager) {
-            doSetProperty("httpConnectionManager", httpConnectionManager);
-            return this;
-        }
-        /**
-         * To use a custom HttpConnectionManager to manage connections.
-         * 
-         * The option will be converted to a
-         * <code>org.apache.commons.httpclient.HttpConnectionManager</code>
-         * type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedWeatherEndpointConsumerBuilder httpConnectionManager(
-                String httpConnectionManager) {
-            doSetProperty("httpConnectionManager", httpConnectionManager);
-            return this;
-        }
-        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          * 
@@ -1422,100 +1300,6 @@ public interface WeatherEndpointBuilderFactory {
             return this;
         }
         /**
-         * Domain for proxy NTLM authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyAuthDomain(
-                String proxyAuthDomain) {
-            doSetProperty("proxyAuthDomain", proxyAuthDomain);
-            return this;
-        }
-        /**
-         * Optional host for proxy NTLM authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyAuthHost(
-                String proxyAuthHost) {
-            doSetProperty("proxyAuthHost", proxyAuthHost);
-            return this;
-        }
-        /**
-         * Authentication method for proxy, either as Basic, Digest or NTLM.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyAuthMethod(
-                String proxyAuthMethod) {
-            doSetProperty("proxyAuthMethod", proxyAuthMethod);
-            return this;
-        }
-        /**
-         * Password for proxy authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyAuthPassword(
-                String proxyAuthPassword) {
-            doSetProperty("proxyAuthPassword", proxyAuthPassword);
-            return this;
-        }
-        /**
-         * Username for proxy authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyAuthUsername(
-                String proxyAuthUsername) {
-            doSetProperty("proxyAuthUsername", proxyAuthUsername);
-            return this;
-        }
-        /**
-         * The proxy host name.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyHost(String proxyHost) {
-            doSetProperty("proxyHost", proxyHost);
-            return this;
-        }
-        /**
-         * The proxy port number.
-         * 
-         * The option is a: <code>java.lang.Integer</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyPort(Integer proxyPort) {
-            doSetProperty("proxyPort", proxyPort);
-            return this;
-        }
-        /**
-         * The proxy port number.
-         * 
-         * The option will be converted to a <code>java.lang.Integer</code>
-         * type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointProducerBuilder proxyPort(String proxyPort) {
-            doSetProperty("proxyPort", proxyPort);
-            return this;
-        }
-        /**
          * The geolocation service now needs an accessKey to be used.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -1582,34 +1366,6 @@ public interface WeatherEndpointBuilderFactory {
             return this;
         }
         /**
-         * To use a custom HttpConnectionManager to manage connections.
-         * 
-         * The option is a:
-         * <code>org.apache.commons.httpclient.HttpConnectionManager</code>
-         * type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedWeatherEndpointProducerBuilder httpConnectionManager(
-                Object httpConnectionManager) {
-            doSetProperty("httpConnectionManager", httpConnectionManager);
-            return this;
-        }
-        /**
-         * To use a custom HttpConnectionManager to manage connections.
-         * 
-         * The option will be converted to a
-         * <code>org.apache.commons.httpclient.HttpConnectionManager</code>
-         * type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedWeatherEndpointProducerBuilder httpConnectionManager(
-                String httpConnectionManager) {
-            doSetProperty("httpConnectionManager", httpConnectionManager);
-            return this;
-        }
-        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          * 
@@ -1941,97 +1697,6 @@ public interface WeatherEndpointBuilderFactory {
             return this;
         }
         /**
-         * Domain for proxy NTLM authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyAuthDomain(String proxyAuthDomain) {
-            doSetProperty("proxyAuthDomain", proxyAuthDomain);
-            return this;
-        }
-        /**
-         * Optional host for proxy NTLM authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyAuthHost(String proxyAuthHost) {
-            doSetProperty("proxyAuthHost", proxyAuthHost);
-            return this;
-        }
-        /**
-         * Authentication method for proxy, either as Basic, Digest or NTLM.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyAuthMethod(String proxyAuthMethod) {
-            doSetProperty("proxyAuthMethod", proxyAuthMethod);
-            return this;
-        }
-        /**
-         * Password for proxy authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyAuthPassword(
-                String proxyAuthPassword) {
-            doSetProperty("proxyAuthPassword", proxyAuthPassword);
-            return this;
-        }
-        /**
-         * Username for proxy authentication.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyAuthUsername(
-                String proxyAuthUsername) {
-            doSetProperty("proxyAuthUsername", proxyAuthUsername);
-            return this;
-        }
-        /**
-         * The proxy host name.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyHost(String proxyHost) {
-            doSetProperty("proxyHost", proxyHost);
-            return this;
-        }
-        /**
-         * The proxy port number.
-         * 
-         * The option is a: <code>java.lang.Integer</code> type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyPort(Integer proxyPort) {
-            doSetProperty("proxyPort", proxyPort);
-            return this;
-        }
-        /**
-         * The proxy port number.
-         * 
-         * The option will be converted to a <code>java.lang.Integer</code>
-         * type.
-         * 
-         * Group: proxy
-         */
-        default WeatherEndpointBuilder proxyPort(String proxyPort) {
-            doSetProperty("proxyPort", proxyPort);
-            return this;
-        }
-        /**
          * The geolocation service now needs an accessKey to be used.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -2099,34 +1764,6 @@ public interface WeatherEndpointBuilderFactory {
             return this;
         }
         /**
-         * To use a custom HttpConnectionManager to manage connections.
-         * 
-         * The option is a:
-         * <code>org.apache.commons.httpclient.HttpConnectionManager</code>
-         * type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedWeatherEndpointBuilder httpConnectionManager(
-                Object httpConnectionManager) {
-            doSetProperty("httpConnectionManager", httpConnectionManager);
-            return this;
-        }
-        /**
-         * To use a custom HttpConnectionManager to manage connections.
-         * 
-         * The option will be converted to a
-         * <code>org.apache.commons.httpclient.HttpConnectionManager</code>
-         * type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedWeatherEndpointBuilder httpConnectionManager(
-                String httpConnectionManager) {
-            doSetProperty("httpConnectionManager", httpConnectionManager);
-            return this;
-        }
-        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          * 
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc
index 90e5f3d..96c870e 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide.adoc
@@ -744,6 +744,12 @@ For example:
 <implicitCollections key="org.apache.camel.dataformat.xstream.PurchaseHistory" value="history,adress"/>
 ----
 
+=== camel-weather
+
+This component has been upgraded from using Apache Http Client 3.x to 4.x and is therefore not fully backwards compatible.
+Some options for configurer and setting proxy is removed. You can however configure this directly on a custom `HttpClient` instance
+and set this on the `WeatherComponent` to use.
+
 === Endpoint URIs without context path
 
 Previously Camel components may work by referring to their name only without a colon and context path (eg `log`)