Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] org.eclipse.m2e.maven.runtime exports "com.google.inject"

FYI, see what Igor wrote about the m2e mandatory provider: https://git.eclipse.org/c/m2e/m2e-core.git/commit/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml?id=7e198c6ae5cffbd6fc45e0cb3b54492123d7e2e4

m2e maven runtime and related bundles embed a number of thirdpaty libraries that are meant to be used in conjunction with m2e and are not general purpose providers of these libraries. To signify and enforce such usage, annotate exported package definitions with mandatory provider=m2e attribute. this prevents accidental wired of these packages to unrelated OSGi bundles running inside the same OSGi framework instance and solves the problem of inconsistent classpath described in bug 403243 and similar.

See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=403243 




On Fri, May 17, 2019 at 8:03 AM Mickael Istria <mistria@xxxxxxxxxx> wrote:
Hi,

On Fri, May 17, 2019 at 10:36 AM Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx> wrote:
I was wondering if:
a) the export of this repackaged dependency is really needed

I don't know. Best thing to try is probably to remove it and see whether it breaks something. You can push a patch to Gerrit and it will test everything.
But it could be that m2e uses some Guice classes to tweak the embedded Maven at runtime, and we shouldn't have m2e using a different Guice than the embedded one for that, or we'll have some "ClassCastException: com.google.inject.Blah cannot be cast to com.google.inject.Blah".

b) or the repackaging could be removed and and replaced with a
dependency on google.inject from Orbit

Nope. m2e ships a Maven "embedder" as produced, packaged and tested by the Maven project. At the moment, m2e doesn't have the resource to build and test different packages (using different version of this or that library) of Maven; and the internal Maven instance may also be used in a separate "flat classpath" mode when forking some executions.
Changing this would be a huge effort and will introduce a lot of risk in m2e.

HTH
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/m2e-dev


--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5

Back to the top