Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Eclipse Code Recommenders and m2e 1.5

I don't have a solution, unfortunately, but let me know if you come up
with something workable and I'll see if I can accommodate it from m2e end.

--
Regards,
Igor

On 11/12/2013, 6:06, Andreas Sewe wrote:
Hi,

- Require-Bundle org.eclipse.m2e.maven.runtime 1.4 as an immediate
   workaround

FYI, this solution seems straight-forward but doesn't work as smoothly
as one would hope. :-(

The big problem is that Require-Bundle imports everything -- including
stuff like javax.inject and com.google.inject which
o.e.m2e.maven.runtime for some reason exports. And this causes a
uses-conflict for us, as the bundles needing m2e classes also need to
depend on our own o.e.r.injection bundle which re-exports a different
javax.inject and com.google.inject.

And wiring (through Import-Package) o.e.r.injection to
org.eclipse.m2e.maven.runtime's javax.inject and com.google.inject
doesn't work, since AFAIK we need our own (i.e., Orbit's)
com.google.inject bundle since we attach two fragments to it:
com.google.inject.assistedinject and com.google.inject.multibindings.
And fragments require a *specific* host bundle; you cannot just attach
them to o.e.m2e.maven.runtime as well.

Previously, with us just importing the packages we were interested in
(org.sonatype.aether, org.apache.maven.*) this wasn't a problem. We
could still obtain our com.google.inject package from the bundle with
the same name. But with Require-Bundle, we have to obtain it from
o.e.m2e.maven.runtime.

Now, maybe changing the order of bundles in Require-Bundle would work,
although it seems a bit fragile. Either way, I'll give that a try.

Best wishes,

Andreas



Back to the top