Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cross-project-issues-dev] Weird wiring issue with Code Recommenders and m2e (affects Luna packages)

Hi all,

we encountered a weird wiring issue which affects everyone who uses
the latest version of Code Recommenders (2.1.0-SNAPSHOT) and m2e
(1.5.0-SNAPSHOT) respectively, which will both be aboard the Luna
release train.

The issue was initially reported and described in [1]. It manifests
itself as follows:

Installing the latest Code Recommenders Developer Tools feature from [2]
into a fresh Luna M6 Standard package (which contains neither Code
Recommenders nor m2e) works fine (all org.eclipse.recommenders bundles
resolve). But if you thereafter install the latest Maven Integration for
Eclipse feature from [3], large parts of Code Recommenders cease
working, as many org.eclipse.recommenders bundles cannot be resolved
anymore. Strangely, all org.eclipse.m2e bundles can be resolved, but
o.e.r bundles which previously resolved cannot be resolved anymore due
to a uses conflict.

> 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.v20140417-0727"; 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.20140428-1210"; 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.v20140417-0727"; 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.v20140417-0727"; 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.v20140322-2105"]
>     import: (osgi.wiring.package=org.eclipse.aether.impl)
>      |
>     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.20140428-1210"; singleton:="false"]

This behavior mystifies both me and Benjamin Bentmann (who works on
org.eclipse.aether), in particular as changing the installation order
(m2e first, Code Recommenders second) works fine, as does restarting
with "-clean". Similarly, installing both features at the same time works.

That being said, we have found a workaround [4]: not making
org.eclipse.recommenders.models a singleton (it doesn't need to be one
anyway). Once the singleton flag is removed, the wiring seems to work. I
would really like to understand why, though.

It would therefore be helpful if someone with more knowledge of OSGi
wiring rules than myself could investigate this one or explain to me
what's going on. If any more information is needed to reproduce the
problem, please comment on Bug 432022.

Best wishes,

Andreas

[1] <https://bugs.eclipse.org/bugs/show_bug.cgi?id=432022#c3>
[2] <http://download.eclipse.org/recommenders/updates/head/>
[3]
<http://repository.takari.io:8081/nexus/content/sites/m2e.extras/m2e/1.5.0/N/LATEST/>
[4] <https://git.eclipse.org/r/#/c/25728/>

-- 
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