Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cross-project-issues-dev] Mars M3: Wiring problems with HttpClient/Core 4.2.x and 4.3.x both present

Hi,

we at Eclipse Code Recommenders recently got a bug report [1] about a
bundle resolution failure in Mars M3.

Apparently, the fact that Mars M3 ships Apache HttpClient/Core 4.3.x
rather than 4.2.x causes Eclipse Aether (which Code Recommenders uses
internally) to not resolve properly:

>   org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.aether.transport.http [osgi.identity; osgi.identity="org.eclipse.aether.transport.http"; type="osgi.bundle"; version:Version="1.0.0.v20140518"] because it is exposed to package 'org.apache.http.entity' from resources org.apache.httpcomponents.httpcore [osgi.identity; osgi.identity="org.apache.httpcomponents.httpcore"; type="osgi.bundle"; version:Version="4.2.5.v201311072007"] and org.apache.httpcomponents.httpcore [osgi.identity; osgi.identity="org.apache.httpcomponents.httpcore"; type="osgi.bundle"; version:Version="4.3.2.v201409180530"] via two dependency chains.
> 
> Chain 1:
>   org.eclipse.aether.transport.http [osgi.identity; osgi.identity="org.eclipse.aether.transport.http"; type="osgi.bundle"; version:Version="1.0.0.v20140518"]
>     import: (&(osgi.wiring.package=org.apache.http.entity)(&(version>=4.2.1)(!(version>=4.3.0))))
>      |
>     export: osgi.wiring.package: org.apache.http.entity
>   org.apache.httpcomponents.httpcore [osgi.identity; osgi.identity="org.apache.httpcomponents.httpcore"; type="osgi.bundle"; version:Version="4.2.5.v201311072007"]
> 
> Chain 2:
>   org.eclipse.aether.transport.http [osgi.identity; osgi.identity="org.eclipse.aether.transport.http"; type="osgi.bundle"; version:Version="1.0.0.v20140518"]
>     import: (&(osgi.wiring.package=org.apache.http.conn.ssl)(&(version>=4.2.1)(!(version>=4.3.0))))
>      |
>     export: osgi.wiring.package=org.apache.http.conn.ssl; uses:=org.apache.http.entity
>   org.apache.httpcomponents.httpclient [osgi.identity; osgi.identity="org.apache.httpcomponents.httpclient"; type="osgi.bundle"; version:Version="4.2.6.v201311072007"]
>     import: (&(osgi.wiring.package=org.apache.http.entity)(version>=4.2.5))
>      |
>     export: osgi.wiring.package: org.apache.http.entity
>   org.apache.httpcomponents.httpcore [osgi.identity; osgi.identity="org.apache.httpcomponents.httpcore"; type="osgi.bundle"; version:Version="4.3.2.v201409180530"]

This wiring problem may affect other projects beyond Eclipse Aether as
well (hence the cross-post to cross-project-issues), if they import a
specific *minor* version of Apache HttpClient/Core (Aether requires 4.2.x).

What I don't quite understand is why the bundles are wired as they are,
though, as a solution to the uses constraint problem seems to exist:
Wire org.apache.httpcomponents.httpclient 4.2.6 to
org.apache.httpcomponents.httpcore 4.2.5 rather than 4.3.2. Is it
because of the open-ended Import-Package of [4.2.5,) in
org.apache.httpcomponents.httpclient 4.2.6? (FWIW, 4.3.2 doesn't use
open-ended Import-Packages anymore. :-)

Any advice in how to best proceed with this issue? Should
org.eclipse.aether.transport.http use a broader Import-Package range
including 4.3.x (provided that there were no breaking API changes
between 4.2.x and 4.3.x)?

Best wishes,

Andreas

[1] <https://bugs.eclipse.org/bugs/show_bug.cgi?id=450738>

-- 
Codetrails GmbH
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top