[keycloak-user] keycloak-adapter-core-4.0.0.Final: Invalid version of org.apache.httpcore imported
Dmitry Telegin
dt at acutus.pro
Wed Jul 4 22:33:51 EDT 2018
Hi Thai,
Believe it or not, but I've stumbled upon exactly the same issue just a
couple of days ago. TL;DR: install org.keycloak:keycloak-osgi-
thirdparty bundle.
(non-TL;DR) Just like you, I'm experimenting with Keycloak and OSGi.
The difference is, I'm trying to deploy to Felix keycloak-servlet-
filter-adapter (the one that is truly generic and not tied to Pax Web).
The ultimate goal is to integrate Keycloak with Apache Sling. Just FYI,
I'll be doing a talk about it at adaptTo()'2018 (see my announcement on
keycloak-dev from June 12 and the discussion below that post, you may
find some interesting info).
The org.apache.http;version="4.5.2" dependency is indeed bogus, and I'm
going to write to keycloak-dev about it in a couple of days (and also
about some other problems that arose with the adapter on Felix), so
stay tuned. The dependency is however provided by keycloak-osgi-
thirdparty bundle, so you could use it as a workaround. The keycloak-
osgi-thirdparty was created to bundle the deps that didn't have OSGi
metadata at that time. Today, all of the above 3rd-party deps are
available as OSGi bundles, so I'd speculate that keycloak-osgi-
thirdparty can be deprecated.
If possible, please let me know of your progress with OSGi adapter on
Felix, since my case is closely related to yours. I hope we can help
each other here.
Cheers,Dmitry Telegin
CTO, Acutus s.r.o.
Keycloak Consulting and Training
Pod lipami street 339/52, 130 00 Prague 3, Czech Republic
+ 42 (022) 888-30-71E-mail: info at acutus.pro
On Tue, 2018-07-03 at 10:54 -0400, Nhut Thai Le wrote:
> Hello,
>
> I'm trying to add keycloak adapter to OSGI container Felix using bnd,
> but I
> got error when resolving dependency:
>
> Resolution failed. Capabilities satisfying the following requirements
> could
> not be found:
> [<<INITIAL>>]
> ⮡ osgi.identity: (osgi.identity=org.keycloak.keycloak-pax-web-
> jetty94)
> ⮡ [org.keycloak.keycloak-pax-web-jetty94
> version=4.0.0.Final]
> ⮡ osgi.wiring.package:
> (&(osgi.wiring.package=org.keycloak.adapters.jetty)(version>=4.0.0.Fi
> nal))
> ⮡ [org.keycloak.keycloak-jetty94-adapter
> version=4.0.0.Final]
> ⮡ osgi.wiring.package:
> (&(osgi.wiring.package=org.keycloak.adapters)(version>=4.0.0.Final))
> ⮡ [org.keycloak.keycloak-adapter-core
> version=4.0.0.Final]
> ⮡ osgi.wiring.package:
> (&(osgi.wiring.package=org.apache.http)(version>=4.5.2))
>
> Opening up manifest of keycloak-adapter-core-4.0.0.Final.jar i found
> this
> in Import-Packages section: org.apache.http;version="4.5.2"
>
> As i understand org.apache.http is found in
> org.apache.httpcomponents:httpcore-osgi, this bundle has max version
> at
> 4.4.10 as of today on Maven central. So this requirement will never
> be
> resolved by bnd.
>
> I also looked at the keycloak-adapter-core-4.0.0.Final.pom and found
> the
> import of all org.apache.http.* require the same version:
> org.apache.http.*;version=${apache.httpcomponents.version},
> this is wrong because org.apache.http is provided in both
> apache.httpcomponents.httpclient
> and apache.httpcomponents.httpcore.
>
> Could anyone verify if this is a build issue and apply a fix?
>
> Thank you
>
> Thai Le
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
More information about the keycloak-user
mailing list