You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/12/04 14:56:20 UTC

[3/4] httpcomponents-client git commit: Removed OSGi module

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties b/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties
deleted file mode 100644
index 888a023..0000000
--- a/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties
+++ /dev/null
@@ -1,94 +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.
-#
-
-proxyconfigurator.name = Apache HTTP Components Proxy Configurator
-proxyconfigurator.description = Factory configuration for transparent proxies used by every HTTP Client.
-
-proxyconfig.name = Apache HTTP Components Proxy Configuration
-proxyconfig.description = Proxy configuration for central and transparent proxying of http client connections.
-
-proxy.enabled.name = Enable HTTP Proxy
-proxy.enabled.description = Whether to enable or disable this particular proxy configuration. \
-The default value is false.
-
-proxy.host.name = HTTP Proxy Host
-proxy.host.description = Host name (or IP Address) of the HTTP Proxy. This property is ignored if \
- this proxy configuration is disabled. This property does not have a default value. Enabling \
- this proxy but not setting the HTTP Proxy Host effectively disables this configuration.
-
-proxy.port.name = HTTP Proxy Port
-proxy.port.description = TCP port of the HTTP Proxy. This property is ignored if \
- this proxy configuration is disabled. This property does not have a default value. Enabling \
- this proxy but not setting the HTTP Proxy Port effectively disables this configuration.
-
-proxy.user.name =  HTTP Proxy User
-proxy.user.description = The name of the user to authenticate as with the HTTP \
- Proxy Host. If this field is empty, the proxy is considered to not be \
- authenticated. The default is empty. This property is ignored if proxying is \
- disabled or the proxy host is not properly configured.
-
-proxy.password.name = HTTP Proxy Password
-proxy.password.description = The password of the HTTP Proxy user to authenticate \
- with. The default is empty. This property is ignored if proxying is \
- disabled or the proxy host is not properly configured.
-
-proxy.ntlm.host.name = HTTP Proxy NTLM Host
-proxy.ntlm.host.description = The host the authentication request is \
- originating from.  Essentially, the computer name for this machine. By default \
- the credentials assume simple username password authentication. If the proxy \
- happens to be a Microsoft IIS Server using NTLM authentication this property \
- must be set to the NT Domain name  of the user to authenticate as. This is \
- not set by default.
-
-proxy.ntlm.domain.name = HTTP Proxy NTLM Domain
-proxy.ntlm.domain.description = The NTLM domain to authenticate within. By \
- default the credentials assume simple username password authentication. If \
- the proxy happens to be a Microsoft IIS Server using NTLM authentication this \
- property must be set to the NT Domain name of the user to authenticate as. \
- This is not set by default.
-
-proxy.exceptions.name = No Proxy For
-proxy.exceptions.description = Lists domain names, host names, IP Addresses or \
- or network addresses for which this proxy configuration should not be used. A domain \
- name indicating all hosts of a domain is indicated by a leading dot, e.g. \
- ".day.com". A network address is indicated with subnet mask notation indicating \
- the number of bits make up the network address, e.g 192.168.1.0/24 means the \
- class C network "192.168.1". Note that for proxy selection, the host name of \
- URL is not resolved but directly compared to the list of exceptions. For this \
- reason you might want to indicate both the network address and the domain for \
- targets which should not be passed through the proxy. This property has no \
- effect if this proxy configuration is disabled. The default value is [ localhost, \
- 127.0.0.1 ].
-
-trustedhosts.name = Apache HTTP Client Trusted Hosts Configuration
-trustedhosts.description = SSL configuration for trusted SSL connections with server self-signed certificates.
-
-trustedhosts.enabled.name = SSL configuration enabled
-trustedhosts.enabled.description = Mark this SSL configuration be taken in consideration \
- when creating a new HTTP CLient instance.
-
-trustedhosts.trustAll.name = Trust all SSL certificates
-trustedhosts.trustAll.description = Allows the new HTTP Client instance to \
- blindly trust all SSL certificates.\
- Pay attention on no enabling this feature in production environment as it is totally insecure!
-
-trustedhosts.hosts.name = Trust SSL self-signed certificates only for specified hosts
-trustedhosts.hosts.description = Allows the new HTTP Client instance to \
- trust all SSL self-signed certificates coming only from the specified hosts. \
- The default value is [ localhost, 127.0.0.1 ].

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.xml
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.xml b/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.xml
deleted file mode 100644
index 8f481ed..0000000
--- a/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   ====================================================================
-   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.
-   ====================================================================
-
-   This software consists of voluntary contributions made by many
-   individuals on behalf of the Apache Software Foundation.  For more
-   information on the Apache Software Foundation, please see
-   <http://www.apache.org />.
- -->
-<metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0" localization="metatype">
-
-  <OCD id="org.apache.hc.client5.http.proxyconfigurator"
-     name="%proxyconfig.name"
-     description="%proxyconfig.description">
-
-    <AD id="proxy.enabled"
-      type="Boolean"
-      default="false"
-      name="%proxy.enabled.name"
-      description="%proxy.enabled.description" />
-
-    <AD id="proxy.host"
-      type="String"
-      default=""
-      name="%proxy.host.name"
-      description="%proxy.host.description" />
-
-    <AD id="proxy.port"
-      type="Integer"
-      default="8080"
-      name="%proxy.port.name"
-      description="%proxy.port.description" />
-
-    <AD id="proxy.user"
-      type="String"
-      default=""
-      name="%proxy.user.name"
-      description="%proxy.user.description" />
-
-    <AD id="proxy.password"
-      type="String"
-      default=""
-      name="%proxy.password.name"
-      description="%proxy.password.description" />
-
-    <AD id="proxy.exceptions"
-      type="String"
-      default="localhost,127.0.0.1"
-      cardinality="2147483647"
-      name="%proxy.exceptions.name"
-      description="%proxy.exceptions.description" />
-
-    <AD id="webconsole.configurationFactory.nameHint"
-      type="String"
-      default="{proxy.host}:{proxy.port} (enabled = {proxy.enabled})"/>
-
-  </OCD>
-
-  <OCD id="org.apache.hc.client5.http.trustedhosts"
-     name="%trustedhosts.name"
-     description="%trustedhosts.description">
-
-    <AD id="trustedhosts.enabled"
-      type="Boolean"
-      default="true"
-      name="%trustedhosts.enabled.name"
-      description="%trustedhosts.enabled.description" />
-
-    <AD id="trustedhosts.trustAll"
-      type="Boolean"
-      default="false"
-      name="%trustedhosts.trustAll.name"
-      description="%trustedhosts.trustAll.description" />
-
-    <AD id="trustedhosts.hosts"
-      type="String"
-      default="localhost,127.0.0.1"
-      cardinality="2147483647"
-      name="%trustedhosts.hosts.name"
-      description="%trustedhosts.hosts.description" />
-
-  </OCD>
-
-  <Designate pid="org.apache.hc.client5.http.proxyconfigurator" factoryPid="org.apache.hc.client5.http.proxyconfigurator">
-    <Object ocdref="org.apache.hc.client5.http.proxyconfigurator" />
-  </Designate>
-  <Designate pid="org.apache.hc.client5.http.trustedhosts">
-    <Object ocdref="org.apache.hc.client5.http.trustedhosts" />
-  </Designate>
-
-</metatype:MetaData>

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/HostMatcherTest.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/HostMatcherTest.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/HostMatcherTest.java
deleted file mode 100644
index f5acde9..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/HostMatcherTest.java
+++ /dev/null
@@ -1,87 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import org.apache.hc.client5.http.osgi.impl.HostMatcher.DomainNameMatcher;
-import org.apache.hc.client5.http.osgi.impl.HostMatcher.HostMatcherFactory;
-import org.apache.hc.client5.http.osgi.impl.HostMatcher.HostNameMatcher;
-import org.apache.hc.client5.http.osgi.impl.HostMatcher.IPAddressMatcher;
-import org.apache.hc.client5.http.osgi.impl.HostMatcher.NetworkAddress;
-import org.junit.Test;
-
-public final class HostMatcherTest {
-
-    @Test
-    public void testNetworkAddress() {
-        final NetworkAddress nullNetworkAddress = NetworkAddress.parse("www.apache.org");
-        assertNull(nullNetworkAddress);
-
-        final NetworkAddress na = NetworkAddress.parse("127.0.0.1");
-        assertEquals(2130706433, na.address);
-        assertEquals(-2147483648, na.mask);
-    }
-
-    @Test
-    public void testIPAddressMatcher() {
-        final NetworkAddress na = NetworkAddress.parse("127.0.0.1");
-        final IPAddressMatcher ipam = new IPAddressMatcher(na);
-        assertFalse(ipam.matches("127.0.0.255"));
-    }
-
-    @Test
-    public void testDomainNameMatcher() {
-        final DomainNameMatcher dnm = new DomainNameMatcher(".apache.org");
-        assertTrue(dnm.matches("www.apache.org"));
-        assertTrue(dnm.matches("hc.apache.org"));
-        assertTrue(dnm.matches("commons.apache.org"));
-        assertTrue(dnm.matches("cocoon.apache.org"));
-        assertFalse(dnm.matches("www.gnu.org"));
-    }
-
-    @Test
-    public void testHostNameMatcher() {
-        final HostNameMatcher hnm = new HostNameMatcher("www.apache.org");
-        assertTrue(hnm.matches("www.apache.org"));
-        assertTrue(hnm.matches("WwW.APACHE.org"));
-        assertTrue(hnm.matches("wWw.apache.ORG"));
-        assertTrue(hnm.matches("WWW.APACHE.ORG"));
-        assertFalse(hnm.matches("www.gnu.org"));
-    }
-
-    @Test
-    public void testHostMatcherFactory() {
-        assertTrue(HostMatcherFactory.createMatcher("127.0.0.1") instanceof IPAddressMatcher);
-        assertTrue(HostMatcherFactory.createMatcher(".apache.org") instanceof DomainNameMatcher);
-        assertTrue(HostMatcherFactory.createMatcher("www.apache.org") instanceof HostNameMatcher);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiCredentialsProviderTest.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiCredentialsProviderTest.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiCredentialsProviderTest.java
deleted file mode 100644
index 43b7e0a..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiCredentialsProviderTest.java
+++ /dev/null
@@ -1,105 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static java.util.Arrays.asList;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.junit.Assert.assertThat;
-
-import java.util.Hashtable;
-
-import org.apache.hc.client5.http.auth.AuthScope;
-import org.apache.hc.client5.http.auth.Credentials;
-import org.apache.hc.client5.http.auth.CredentialsProvider;
-import org.apache.hc.client5.http.auth.NTCredentials;
-import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
-import org.apache.hc.client5.http.osgi.services.ProxyConfiguration;
-import org.apache.hc.core5.http.protocol.BasicHttpContext;
-import org.apache.hc.core5.http.protocol.HttpContext;
-import org.junit.Test;
-
-public class OSGiCredentialsProviderTest {
-
-    private static final String HOST = "proxy.example.org";
-
-    private static final int PORT = 8080;
-
-    private static final HttpContext HTTP_CONTEXT = new BasicHttpContext();
-
-    @Test
-    public void basicAuthentication() {
-        final CredentialsProvider provider = credentialsProvider(proxy("user", "secret"));
-        final Credentials credentials = provider.getCredentials(new AuthScope("http", HOST, PORT, null, "BASIC"), HTTP_CONTEXT);
-        assertThat(credentials, instanceOf(UsernamePasswordCredentials.class));
-        assertCredentials((UsernamePasswordCredentials) credentials, "user", "secret");
-    }
-
-    @Test
-    public void ntlmAuthenticationWithoutDomain() {
-        final CredentialsProvider provider = credentialsProvider(proxy("user", "secret"));
-        final Credentials credentials = provider.getCredentials(new AuthScope("http", HOST, PORT, null, "NTLM"), HTTP_CONTEXT);
-        assertThat(credentials, instanceOf(NTCredentials.class));
-        assertCredentials((NTCredentials) credentials, "user", "secret", null);
-    }
-
-    @Test
-    public void ntlmAuthenticationWithDomain() {
-        final CredentialsProvider provider = credentialsProvider(proxy("DOMAIN\\user", "secret"));
-        final Credentials credentials = provider.getCredentials(new AuthScope("http", HOST, PORT, null, "NTLM"), HTTP_CONTEXT);
-        assertThat(credentials, instanceOf(NTCredentials.class));
-        assertCredentials((NTCredentials) credentials, "user", "secret", "DOMAIN");
-    }
-
-    private CredentialsProvider credentialsProvider(final ProxyConfiguration... proxies) {
-        return new OSGiCredentialsProvider(asList(proxies));
-    }
-
-    private void assertCredentials(final UsernamePasswordCredentials credentials, final String user, final String password) {
-        assertThat("Username mismatch", credentials.getUserName(), equalTo(user));
-        assertThat("Password mismatch", credentials.getPassword(), equalTo(password.toCharArray()));
-    }
-
-    private void assertCredentials(final NTCredentials credentials, final String user, final String password, final String domain) {
-        assertThat("Username mismatch", credentials.getUserName(), equalTo(user));
-        assertThat("Password mismatch", credentials.getPassword(), equalTo(password.toCharArray()));
-        assertThat("Domain mismatch", credentials.getDomain(), equalTo(domain));
-    }
-
-    private ProxyConfiguration proxy(final String username, final String password) {
-        final OSGiProxyConfiguration proxyConfiguration = new OSGiProxyConfiguration();
-        final Hashtable<String, Object> config = new Hashtable<>();
-        config.put("proxy.enabled", true);
-        config.put("proxy.host", HOST);
-        config.put("proxy.port", PORT);
-        config.put("proxy.user", username);
-        config.put("proxy.password", password);
-        config.put("proxy.exceptions", new String[0]);
-        proxyConfiguration.update(config);
-        return proxyConfiguration;
-    }
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiProxyConfigurationTest.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiProxyConfigurationTest.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiProxyConfigurationTest.java
deleted file mode 100644
index 7d99ff4..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/OSGiProxyConfigurationTest.java
+++ /dev/null
@@ -1,61 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.junit.Assert.assertThat;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.junit.Test;
-
-public class OSGiProxyConfigurationTest {
-
-    @Test
-    public void testToString() {
-
-        final Dictionary<String, Object> config = new Hashtable<>();
-        config.put("proxy.enabled", false);
-        config.put("proxy.host", "h");
-        config.put("proxy.port", 1);
-        config.put("proxy.user", "u");
-        config.put("proxy.password", "p");
-        config.put("proxy.exceptions", new String[]{"e"});
-
-        final OSGiProxyConfiguration configuration = new OSGiProxyConfiguration();
-        configuration.update(config);
-
-        final String string = configuration.toString();
-        assertThat(string, containsString("enabled=false"));
-        assertThat(string, containsString("hostname=h"));
-        assertThat(string, containsString("port=1"));
-        assertThat(string, containsString("username=u"));
-        assertThat(string, containsString("password=p"));
-        assertThat(string, containsString("proxyExceptions=[e]"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiHttpRoutePlanner.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiHttpRoutePlanner.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiHttpRoutePlanner.java
deleted file mode 100644
index 57fb99a..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiHttpRoutePlanner.java
+++ /dev/null
@@ -1,117 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static java.util.Arrays.asList;
-import static java.util.Collections.singletonList;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.net.InetAddress;
-import java.util.Hashtable;
-
-import org.apache.hc.client5.http.osgi.services.ProxyConfiguration;
-import org.apache.hc.core5.http.HttpHost;
-import org.junit.Test;
-
-/**
- * @since 4.4.3
- */
-public class TestOSGiHttpRoutePlanner {
-
-    private final ProxyConfiguration pc1 = proxy("proxy1", 8080, "localhost", "127.0.0.1", ".apache.org");
-    private final ProxyConfiguration pc2 = proxy("proxy2", 9090, "localhost", "127.0.0.1", ".oracle.com", "12.34.34.8");
-
-    @Test
-    public void testDeterminProxy() throws Exception {
-        OSGiHttpRoutePlanner planner = new OSGiHttpRoutePlanner(singletonList(pc1));
-
-        HttpHost proxy = planner.determineProxy(new HttpHost("localhost", 8090), null);
-        assertNull(proxy);
-
-        proxy = planner.determineProxy(new HttpHost("there", 9090), null);
-        assertNotNull(proxy);
-        assertTrue(proxy.getHostName().equals("proxy1"));
-
-        proxy = planner.determineProxy(new HttpHost("10.2.144.23", 4554), null);
-        assertNotNull(proxy);
-        assertTrue(proxy.getHostName().equals("proxy1"));
-
-        final InetAddress addr = InetAddress.getByName("localhost");
-        proxy = planner.determineProxy(new HttpHost(addr, 4554), null);
-        assertNull(proxy);
-
-        proxy = planner.determineProxy(new HttpHost("hc.apache.org", 4554), null);
-        assertNull(proxy);
-
-
-        // test with more than one registration of proxyConfiguration
-        planner = new OSGiHttpRoutePlanner(asList(pc1, pc2));
-        proxy = planner.determineProxy(new HttpHost("localhost", 8090), null);
-        assertNull(proxy);
-
-        proxy = planner.determineProxy(new HttpHost("there", 9090), null);
-        assertNotNull(proxy);
-        assertTrue(proxy.getHostName().equals("proxy1")); // the first one
-
-        proxy = planner.determineProxy(new HttpHost(addr, 4554), null);
-        assertNull(proxy);
-
-        proxy = planner.determineProxy(new HttpHost("hc.apache.org", 4554), null);
-        assertNull(proxy);
-
-        proxy = planner.determineProxy(new HttpHost("docs.oracle.com", 4554), null);
-        assertNull(proxy);
-    }
-
-    @Test
-    public void testMasking() throws Exception {
-        final OSGiHttpRoutePlanner planner = new OSGiHttpRoutePlanner(singletonList(pc2));
-
-        HttpHost proxy = planner.determineProxy(new HttpHost("12.34.34.2", 4554), null);
-        assertNotNull(proxy);
-        assertTrue(proxy.getHostName().equals("proxy2"));
-
-        proxy = planner.determineProxy(new HttpHost("12.34.34.8", 4554), null);
-        assertNotNull(proxy);
-    }
-
-    private ProxyConfiguration proxy(final String host, final int port, final String... exceptions) {
-        final OSGiProxyConfiguration proxyConfiguration = new OSGiProxyConfiguration();
-        final Hashtable<String, Object> config = new Hashtable<>();
-        config.put("proxy.enabled", true);
-        config.put("proxy.host", host);
-        config.put("proxy.port", port);
-        config.put("proxy.user", "");
-        config.put("proxy.password", "");
-        config.put("proxy.exceptions", exceptions);
-        proxyConfiguration.update(config);
-        return proxyConfiguration;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiTrustedHostsConfiguration.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiTrustedHostsConfiguration.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiTrustedHostsConfiguration.java
deleted file mode 100644
index 73d7cbc..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestOSGiTrustedHostsConfiguration.java
+++ /dev/null
@@ -1,73 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.apache.hc.client5.http.osgi.services.TrustedHostsConfiguration;
-import org.junit.Test;
-import org.osgi.service.cm.ConfigurationException;
-
-public final class TestOSGiTrustedHostsConfiguration {
-
-    @Test
-    public void testSetValues() throws ConfigurationException {
-        final TrustedHostsConfiguration configuration = getTrustedHostsConfiguration();
-
-        assertEquals(true, configuration.isEnabled());
-        assertEquals(false, configuration.trustAll());
-        assertArrayEquals(new String[]{ "localhost" }, configuration.getTrustedHosts());
-    }
-
-    @Test
-    public void testToString() throws ConfigurationException {
-        final TrustedHostsConfiguration configuration = getTrustedHostsConfiguration();
-
-        final String string = configuration.toString();
-        assertThat(string, containsString("enabled=true"));
-        assertThat(string, containsString("trustAll=false"));
-        assertThat(string, containsString("trustedHosts=[localhost]"));
-    }
-
-    private TrustedHostsConfiguration getTrustedHostsConfiguration() throws ConfigurationException {
-        final Dictionary<String, Object> config = new Hashtable<>();
-        config.put("trustedhosts.enabled", true);
-        config.put("trustedhosts.trustAll", false);
-        config.put("trustedhosts.hosts", new String[]{ "localhost" });
-
-        final OSGiTrustedHostsConfiguration configuration = new OSGiTrustedHostsConfiguration();
-        configuration.updated(config);
-        return configuration;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestPropertiesUtils.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestPropertiesUtils.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestPropertiesUtils.java
deleted file mode 100644
index a64218b..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestPropertiesUtils.java
+++ /dev/null
@@ -1,132 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static org.apache.hc.client5.http.osgi.impl.PropertiesUtils.to;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-/**
- * @since 4.3
- */
-@SuppressWarnings("boxing") // test code
-public final class TestPropertiesUtils {
-
-    @Test
-    public void toBoolean() {
-        assertConverted(true, null, boolean.class, true);
-        assertConverted(true, null, Boolean.class, true);
-        assertConverted(false, "false", boolean.class, null);
-        assertConverted(false, "false", Boolean.class, null);
-        // whatever value is interpreted as `false` by Boolean.valueOf
-        assertConverted(false, "not a boolean", boolean.class, true);
-        assertConverted(false, "not a boolean", Boolean.class, true);
-    }
-
-    @Test
-    public void toSingleString() {
-        assertConverted("fallback to default value", null, String.class, "fallback to default value");
-        // use an object which represents the string
-        assertConverted("use the passed value", new StringBuilder("use the passed value"), String.class, null);
-        // use the "identity" converter
-        assertConverted("use the passed value", "use the passed value", String.class, null);
-        // convert another object
-        assertConverted("456789", 456789, String.class, null);
-    }
-
-    @Test
-    public void toStringArray() {
-        assertConvertedArray(new String[]{"fallback to default value"},
-                             null,
-                             String[].class,
-                             new String[]{"fallback to default value"});
-        // a string is converted to an array with 1 element
-        assertConvertedArray(new String[]{"a single string"},
-                             "a single string",
-                             String[].class,
-                             null);
-        // use an object which represents the string
-        assertConvertedArray(new String[]{"null objects", "will be ignored"},
-                             new Object[]{new StringBuilder("null objects"), null, new StringBuilder("will be ignored")},
-                             String[].class,
-                             null);
-        // use the "identity" converter
-        assertConvertedArray(new String[]{"null objects", "will be ignored"},
-                             new Object[]{"null objects", null, "will be ignored"},
-                             String[].class,
-                             null);
-        assertConvertedArray(new String[]{"fallback to default value"},
-                             456789,
-                             String[].class,
-                             new String[]{"fallback to default value"});
-    }
-
-    @Test
-    public void toInt() {
-        assertConverted(123, null, int.class, 123);
-        assertConverted(123, null, Integer.class, 123);
-        assertConverted(456, "456", int.class, null);
-        assertConverted(456, "456", Integer.class, null);
-        assertConverted(789, "not an integer", int.class, 789);
-        assertConverted(789, "not an integer", Integer.class, 789);
-    }
-
-    @Test
-    public void toLong() {
-        assertConverted(123l, null, long.class, 123l);
-        assertConverted(123l, null, Long.class, 123l);
-        assertConverted(456l, "456", long.class, null);
-        assertConverted(456l, "456", Long.class, null);
-        assertConverted(789l, "not a long", long.class, 789l);
-        assertConverted(789l, "not a long", Long.class, 789l);
-    }
-
-    @Test
-    public void toDouble() {
-        assertConverted(123d, null, double.class, 123d);
-        assertConverted(123d, null, Double.class, 123d);
-        assertConverted(456d, "456", double.class, null);
-        assertConverted(456d, "456", Double.class, null);
-        assertConverted(789d, "not a double", double.class, 789d);
-        assertConverted(789d, "not a double", Double.class, 789d);
-    }
-
-    private static <T> void assertConverted(
-            final T expected, final Object propValue, final Class<T> targetType, final T defaultValue) {
-        final T actual = to(propValue, targetType, defaultValue);
-        assertEquals(expected, actual);
-    }
-
-    private static <T> void assertConvertedArray(
-            final T[] expected, final Object propValue, final Class<T[]> targetType, final T[] defaultValue) {
-        final T[] actual = to(propValue, targetType, defaultValue);
-        assertArrayEquals(expected, actual);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestRelaxedLayeredConnectionSocketFactory.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestRelaxedLayeredConnectionSocketFactory.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestRelaxedLayeredConnectionSocketFactory.java
deleted file mode 100644
index 94980ff..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/TestRelaxedLayeredConnectionSocketFactory.java
+++ /dev/null
@@ -1,127 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static org.junit.Assert.assertSame;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.apache.hc.client5.http.socket.LayeredConnectionSocketFactory;
-import org.apache.hc.core5.http.HttpHost;
-import org.apache.hc.core5.http.protocol.BasicHttpContext;
-import org.apache.hc.core5.http.protocol.HttpContext;
-import org.apache.hc.core5.util.TimeValue;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.osgi.service.cm.ConfigurationException;
-
-public class TestRelaxedLayeredConnectionSocketFactory {
-
-    @Mock
-    Socket insecureSocket;
-
-    @Mock
-    Socket secureSocket;
-
-    private final HttpContext context = new BasicHttpContext();
-
-    @Test
-    public void testTrustedAllConnections() throws Exception {
-        final LayeredConnectionSocketFactory socketFactory = getLayeredConnectionSocketFactory(true, true);
-        final Socket socket = socketFactory.createSocket(context);
-        final Socket secureSocket = socketFactory.createLayeredSocket(socket, "localhost", 9999, context);
-        assertSame(this.secureSocket, secureSocket);
-    }
-
-    @Test
-    public void testTrustedConnections() throws Exception {
-        final LayeredConnectionSocketFactory socketFactory = getLayeredConnectionSocketFactory(true, false, "localhost");
-        final Socket socket = socketFactory.createSocket(context);
-        final Socket localSecureSocket = socketFactory.createLayeredSocket(socket, "localhost", 9999, context);
-        assertSame(this.insecureSocket, localSecureSocket);
-
-        final Socket apacheSecureSocket = socketFactory.createLayeredSocket(socket, "www.apache.org", 9999, context);
-        assertSame(this.secureSocket, apacheSecureSocket);
-    }
-
-    @Test
-    public void testNotEabledConfiguration() throws Exception {
-        final LayeredConnectionSocketFactory socketFactory = getLayeredConnectionSocketFactory(false, true);
-        final Socket socket = socketFactory.createSocket(context);
-        final Socket secureSocket = socketFactory.createLayeredSocket(socket, "localhost", 9999, context);
-        assertSame(this.secureSocket, secureSocket);
-    }
-
-    private LayeredConnectionSocketFactory getLayeredConnectionSocketFactory(
-            final boolean enabled, final boolean trustAll, final String... trustedHosts) throws ConfigurationException {
-        final OSGiTrustedHostsConfiguration configuration = new OSGiTrustedHostsConfiguration();
-        configuration.updated(createConfig(enabled, trustAll, trustedHosts));
-
-        final LayeredConnectionSocketFactory defaultSocketFactory = new LayeredConnectionSocketFactory() {
-
-            @Override
-            public Socket createSocket(final HttpContext context) throws IOException {
-                return insecureSocket;
-            }
-
-            @Override
-            public Socket connectSocket(final TimeValue connectTimeout,
-                                        final Socket sock,
-                                        final HttpHost host,
-                                        final InetSocketAddress remoteAddress,
-                                        final InetSocketAddress localAddress,
-                                        final HttpContext context ) throws IOException {
-                // not needed in this version
-                return insecureSocket;
-            }
-
-            @Override
-            public Socket createLayeredSocket(final Socket socket,
-                                              final String target,
-                                              final int port,
-                                              final HttpContext context) throws IOException {
-                return secureSocket;
-            }
-
-        };
-
-        return new RelaxedLayeredConnectionSocketFactory(configuration, defaultSocketFactory);
-    }
-
-    private Dictionary<String, Object> createConfig(final boolean enabled, final boolean trustAll, final String... trustedHosts) {
-        final Dictionary<String, Object> config = new Hashtable<>();
-        config.put("trustedhosts.enabled", enabled);
-        config.put("trustedhosts.trustAll", trustAll);
-        config.put("trustedhosts.hosts", trustedHosts);
-        return config;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/WeakListTest.java
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/WeakListTest.java b/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/WeakListTest.java
deleted file mode 100644
index ff0f9c7..0000000
--- a/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/WeakListTest.java
+++ /dev/null
@@ -1,73 +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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.osgi.impl;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import org.junit.Test;
-
-public class WeakListTest {
-
-    @Test
-    public void testWeakList() {
-        final WeakList<Object> list = new WeakList<>();
-        list.add("hello");
-        list.add(null);
-
-        // null objects are seen as GC'd, so we only expect a size of 1
-        assertEquals(1, list.size());
-
-        final Iterator<Object> it = list.iterator();
-        assertTrue(it.hasNext());
-        assertEquals("hello", it.next());
-        assertFalse(it.hasNext());
-        boolean thrown = false;
-        try {
-            it.next();
-        } catch (final NoSuchElementException e) {
-            thrown = true;
-        }
-        assertTrue(thrown);
-    }
-
-    @Test
-    public void clearSupported() {
-        final WeakList<Object> list = new WeakList<>();
-
-        list.add("hello");
-        assertEquals(1, list.size());
-
-        list.clear();
-        assertEquals(0, list.size());
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/httpclient5-osgi/src/test/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/test/resources/log4j2.xml b/httpclient5-osgi/src/test/resources/log4j2.xml
deleted file mode 100644
index 0c9bfe2..0000000
--- a/httpclient5-osgi/src/test/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<Configuration status="WARN" name="XMLConfigTest">
-  <Appenders>
-    <Console name="STDOUT">
-      <PatternLayout pattern="%d %-5level [%t][%logger]%notEmpty{[%markerSimpleName]} %msg%n%xThrowable" />
-    </Console>
-  </Appenders>
-  <Loggers>
-    <Root level="WARN">
-      <AppenderRef ref="STDOUT" />
-    </Root>
-  </Loggers>
-</Configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/5797e247/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e0a47d1..5e439a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,7 +176,6 @@
     <module>httpclient5-cache</module>
     <module>httpclient5-win</module>
     <module>httpclient5-testing</module>
-    <module>httpclient5-osgi</module>
   </modules>
 
   <build>