You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happens is that the execution of the Mojo fails with:
Caused by: java.lang.ClassCastException: class org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to class org.eclipse.tycho.ReactorProject (org.eclipse.tycho.core.osgitools.DefaultReactorProject is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @dd2856e; org.eclipse.tycho.ReactorProject is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @27187450)
at org.eclipse.tycho.core.osgitools.DefaultReactorProject.adapt (DefaultReactorProject.java:63)
at org.eclipse.tycho.osgi.configuration.MavenContextConfigurator.afterFrameworkStarted (MavenContextConfigurator.java:67)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.doStart (DefaultEquinoxEmbedder.java:179)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.start (DefaultEquinoxEmbedder.java:70)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted (DefaultEquinoxEmbedder.java:297)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:273)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:268)
at org.eclipse.tycho.plugins.p2.P2MetadataMojo.getService (P2MetadataMojo.java:136)
at org.eclipse.tycho.plugins.p2.P2MetadataMojo.attachP2Metadata (P2MetadataMojo.java:171)
at org.eclipse.tycho.plugins.p2.P2MetadataMojo.execute (P2MetadataMojo.java:131)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
This is due to tycho is doing some setup already in the preparation phase of the build, and if not both projects share the same class space (e.g. extension versus project realm, OSGi versus maven and alike).
It seems we require something to separate things here in case of classloader isolation some thoughts about this:
Make the generation of P2 metadata an independent step (see Create a p2-mavenplugin #711) that do not requires special tycho interaction, e.g. we could attatch the discovered units as a XML data that is later on loaded by tycho
Tycho probably could, if it encounters a project without p2 metadata, simply generates this without the need for special mojos
We probably find some way for the DefaultEquinoxEmbedder to be shared across class realms
...
The text was updated successfully, but these errors were encountered:
We recently saw a problem in https://git.eclipse.org/r/c/mylyn/org.eclipse.mylyn.docs/+/191739 and I also have the same problem in another build here: faktorips/faktorips.base#28
What happens is that the execution of the Mojo fails with:
This is due to tycho is doing some setup already in the preparation phase of the build, and if not both projects share the same class space (e.g. extension versus project realm, OSGi versus maven and alike).
It seems we require something to separate things here in case of classloader isolation some thoughts about this:
DefaultEquinoxEmbedder
to be shared across class realmsThe text was updated successfully, but these errors were encountered: