How to use an OSGi bundle which is not included by default

I also tried to load another version of Apache Http Client, but with no luck.

I am downloading the OSGI bundle version from here Apache HttpComponents – HttpComponents Downloads, copy the jar in my lucee-server/bundles folder, and try to this:

    CreateObject("java", "org.apache.http.impl.client.HttpClients", "org.apache.httpcomponents.httpclient", "4.5.5")
            .custom()
            .build()

Which throws the following error:

Unable to resolve org.apache.httpcomponents.httpclient [78](R 78.0): missing requirement 
[org.apache.httpcomponents.httpclient [78](R 78.0)] osgi.wiring.package; (&
(osgi.wiring.package=org.osgi.framework)(version>=1.5.0)(!(version>=2.0.0)))
Unresolved requirements: 
[[org.apache.httpcomponents.httpclient [78](R 78.0)] osgi.wiring.package; (&
(osgi.wiring.package=org.osgi.framework)(version>=1.5.0)(!(version>=2.0.0)))]

A little googling pointed to the path that this bundle has been built with a higher version of OSGI, that is not compatible with the current one Lucee has. Is this the case or am I missing something obvious?

I’ve added a ticket about supporting directly downloading from maven via createObject()

https://luceeserver.atlassian.net/browse/LDEV-3569