Closed jachinte closed 1 year ago
There are logs in C:/Users/<user>/.goomph/p2-bootstrap/4.7.2/configuration/
which gives a hint where the problem lies.
I think the main issue is
!ENTRY org.eclipse.osgi 4 0 2019-05-05 12:16:50.928
!MESSAGE error loading hook: org.eclipse.core.runtime.internal.adaptor.EclipseLogHook
!STACK 0
java.lang.SecurityException: class "org.eclipse.core.runtime.adaptor.LocationManager"'s signer information does not match signer information of other classes in the same package
and that it's related to these issues: https://github.com/eclipse/xtext-maven/issues/42 https://github.com/eclipse/xtext/issues/1231 https://github.com/eclipse/xtext/issues/1249 https://github.com/xtext/xtext-gradle-plugin/issues/121
goomph constructs a classpath-jar c:\users\<user>\AppData\Local\Temp\long-classpath*.jar
which includes everything you have in your build.gradle file (plugins, dependencies, etc.) and uses that for the eclipse runtime which mirrors the p2 repo. I think org.eclipse.core.runtime.adaptor.LocationManager of xtext-builder clashes with the eclipse runtime (bootstrap v4.7.2).
I could not found a workaround easily but there are several SO posts for similar issues.
p2AsMaven should not hang, but i think thats another issue.
Interesting... The fact that p2asmaven is hanging is bad, but very hard to fix from goomph's side. It's a common complaint, but I believe it's hanging inside of p2 code.
The fact that you're getting signer information does not match signer information of other classes in the same package
, is very important, and almost definitely the root problem. Might be tricky to fix.
goomph constructs a classpath-jar c:\users\
\AppData\Local\Temp\long-classpath*.jar which includes everything you have in your build.gradle file (plugins, dependencies, etc.) and uses that for the eclipse runtime which mirrors the p2 repo
There's some important details here. Let's step through it:
This is where we download the resources, and the hang occurs:
Which calls this:
Which calls this:
So the interesting thing is P2BootstrapInstallation.latest().outsideJvmRunner()
. The P2BootstrapInstallation.latest()
means that it will download a stripped-down version of eclipse to use for running p2 tasks. Right now, goomph is using 4.7.2
. It's possible to override this here:
The outsideJvmRunner
means that it willl use this class to run those jars. It's true that it will create a long classpath, but look at this filter:
This should mean that every eclipse jar is getting loaded exclusively from the p2bootstrap
folder except for the OSGi jar. So here are the things I would try, from easiest to hardest:
som
group with everything, have a som
group and an xtext
group. They'll each resolve on their own.repoEclipse
that you are using. The linked issues indicate you want whichever version contained equinox 3.10.0
, whichever that is.outsideJvmRunner()
for insideJvmRunner()
. Starting a fresh JVM is harder to debug, but OSGi sets weird state in the JVM that makes it hard/impossible to run multiple parallel OSGi applications in one JVM, thus starting a fresh JVM is safer and more repeatable. But swap them out while you're debugging :)Wow, thanks for all those pointers. I'll work on it as soon as I can and will let you know how it goes.
This issue is solved in dev.equo.p2deps
.
Hi, Thank you very much for working on this project! I don't have much experience with Gradle, but I think I found a rather odd issue. The following code works as expected:
However, when I add Xtext's builder plugin it fails silently. Gradle will continue waiting for the download to finish, but it never does:
I'm using Gradle 5.3.1. You can find a minimal failing example here: https://github.com/jachinte/goomph-minimal-issue
I noticed that when it works (without Xtext's plugin), the plugin prints out the path to the build.xml file:
Otherwise, it doesn't: