Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] OSGi wiring issue (was Release of Aether Core 0.9.1)

Hi Benjamin,

> I deployed a tweaked org.eclipse.aether.maven bundle to [0]. Besides the
> missing version range on the import for o.e.aether.impl that you
> mentioned earlier, I dropped all references to Plexus to reduce uses
> constraints.
> 
> When you get a chance, please report back how this works out for your
> current wiring issue which I frankly don't understand . Given the
> install sequence m2e, code recommenders works, I take it there is a
> solution to the wiring problem.

Yes, a solution exists and is found, e.g., by a "eclipse -clean".

> Why isn't that solution found for the
> other install sequence? More specifically, why is the import of
> o.e.aether.impl from o.e.aether.maven rewired to m2e.maven.runtime when
> it was previously happy with importing from Aether proper?

I have no idea (and asked on equinox-dev already, but didn't get a reply
so far), but I am afraid that even with your tweaks the issue still
persists:

> osgi> diag 281
> org.eclipse.recommenders.models [281]
>   Bundle was not resolved because of a uses contraint violation.
>   org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.recommenders.models [osgi.identity; osgi.identity="org.eclipse.recommenders.models"; type="osgi.bundle"; version:Version="2.1.0.v20140401-1644"; singleton:="true"] because it is exposed to package 'org.eclipse.aether.impl' from resources org.eclipse.aether.impl [osgi.identity; osgi.identity="org.eclipse.aether.impl"; type="osgi.bundle"; version:Version="0.9.1.v20140329"] and org.eclipse.m2e.maven.runtime [osgi.identity; osgi.identity="org.eclipse.m2e.maven.runtime"; type="osgi.bundle"; version:Version="1.5.0.20140325-1231"; singleton:="false"] via two dependency chains.
> 
> Chain 1:
>   org.eclipse.recommenders.models [osgi.identity; osgi.identity="org.eclipse.recommenders.models"; type="osgi.bundle"; version:Version="2.1.0.v20140401-1644"; singleton:="true"]
>     import: (&(osgi.wiring.package=org.eclipse.aether.impl)(&(version>=0.9.1)(!(version>=1.0.0))))
>      |
>     export: osgi.wiring.package: org.eclipse.aether.impl
>   org.eclipse.aether.impl [osgi.identity; osgi.identity="org.eclipse.aether.impl"; type="osgi.bundle"; version:Version="0.9.1.v20140329"]
> 
> Chain 2:
>   org.eclipse.recommenders.models [osgi.identity; osgi.identity="org.eclipse.recommenders.models"; type="osgi.bundle"; version:Version="2.1.0.v20140401-1644"; singleton:="true"]
>     import: (&(osgi.wiring.package=org.apache.maven.repository.internal)(&(version>=3.1.0)(!(version>=3.2.0))))
>      |
>     export: osgi.wiring.package=org.apache.maven.repository.internal; uses:=org.eclipse.aether.impl
>   org.eclipse.aether.maven [osgi.identity; osgi.identity="org.eclipse.aether.maven"; type="osgi.bundle"; version:Version="3.1.0.v20140405-2015"]
>     import: (&(osgi.wiring.package=org.eclipse.aether.impl)(&(version>=0.9.0)(!(version>=1.0.0))))
>      |
>     export: osgi.wiring.package: org.eclipse.aether.impl
>   org.eclipse.m2e.maven.runtime [osgi.identity; osgi.identity="org.eclipse.m2e.maven.runtime"; type="osgi.bundle"; version:Version="1.5.0.20140325-1231"; singleton:="false"]

The only layman's explanation I have is that Equinox sees an opportunity
to "upgrade" the org.eclipse.aether.impl package from 0.9.1 (provided by
the org.eclipse.aether.impl bundle) to version 0.0.0 supplied by
org.eclipse.m2e.maven.runtime. Why it doesn't give up on this "upgrade"
when it discovers the uses conflict, however, is beyond me.

But the upgrade hypothesis at least might explain why the install order
matters and why installing m2e after Code Recommenders breaks the
latter, as it is perceived as an upgrade. But I haven't found something
in the OSGi spec to back up this hypothesis yet. :-(

Best wishes,

Andreas

-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

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

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


Back to the top