[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] "Nested Equinox instance is not supported" in a custom mojo

Maven does not have proper support for sharing classloaders among
different plugins. Most likely Maven decided it needed separate tycho
extensions plugin instance, but I can't tell why without debugging your
specific case.


On 12-10-05 8:02 AM, Mickael Istria wrote:
On 10/05/2012 12:50 PM, Igor Fedorenko wrote:
You should be able to consume Equinox and Tycho services from thirdparty
mojos, just don't try to force multiple instances of singleton
components. For Equinox this means you need to contribute additional
bundles to the same framework instance used by tycho, not start new one.
IIRC, Equinox and P2 use system properties quite heavily, so all users
must share the same framework instance to work properly.
Thanks, I understand better the error, but cannot find its root cause.

I injected equinox with

     /** @component */
     protected EquinoxServiceFactory equinox;

I see it's done the same way in other Mojos.
But I also noticed that the plugin works when it is the only plugin
using an equinox in the reactor. If it's alone, it works; if it's in
executed in a reactor which also executes TPValidationMojo (which also
requires an equinox @component) it fails with the error described.
So it seems that both Mojo don't receive the same equinox, leading to
the error. Do you know any reason why it happens like that? Do you have
any hint for troubleshooting/debugging ?

Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets

_______________________________________________ tycho-user mailing list tycho-user@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/tycho-user