-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
equinoxLaunch problem with Eclipse 4.8 Targetplatform #69
Comments
in the folder
Import-Package: org.osgi.service.component; version="1.3.0" is contained in org.eclipse.osgi.services_3.7.0.v20180223-1712.jar So to me it seems all required bundles copied in place. |
Is the issue perhaps related to runlevels? These are the defaults: goomph/src/main/java/com/diffplug/gradle/eclipserunner/EquinoxLauncher.java Lines 219 to 229 in 5de48d5
These defaults haven't changed, but if you've upgraded your eclipse dependencies, perhaps the newer version of eclipse requires a different set of startlevels? |
How can i overwrite those "osgi.bundles" from within the build.gradle. I cannot figure out the syntax. |
I think the easiest way is to set system properties for the launched Equinox, but there wasn't a way to do this in 3.15. I just added this ability in 3.16.0-SNAPSHOT, which allows you to do this: task runWithEquinox(type: EquinoxLaunchTask) {
vmArgs = ['-Dosgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start']
} Since your eclipse launch works, I would try to tinker with the runlevels there first, to make sure that you can reproduce and fix the problem there. That can confirm that the problem is runlevel-related. |
Thanks for the addition.
In the working eclipse launch directory, i found the information:
and the osgi.bundles.defaultStartLevel=4 |
Gradle gives me:
|
buildscript { repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
} }
equinoxLaunch {
headlessAppSetup {
source.addProject(project(':castle.testenv.sysgen'))
// creates an EquinoxLaunchTask named 'headlessApp' which depends on 'headlessAppSetup'
launchTask 'sysgenApp', {
it.args = ['-consoleLog', '-application', 'castle.testenv.sysgen.application']
it.workingDir = file(sysgenWorkdir)
it.vmArgs = ['-Dosgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.runtime@start']
}
}
}
} |
Changing this in build.gradle did no change in the error output. When I add |
So you can reproduce the error in eclipse? That's a good sign. The trick is what should the runlevels be for your application. The eclipse launch configuration should say what the start levels are that are working. Maybe something like this?
|
Eclipse creates in the location
This works, so i try to get the
But the error message in gradle seems to be always the same. |
Perhaps this? There must be some default which is different between EquinoxLauncher and eclipse. Confusing that it's a new issue with 4.8... goomph/src/main/java/com/diffplug/gradle/eclipserunner/EquinoxLauncher.java Lines 132 to 145 in af5fc92
|
I could find a workaround. The problem is triggered by the latest org.eclipse.update.configurator. |
Interesting! Not much has changed in it: https://github.com/eclipse/eclipse.platform/commits/master/update/org.eclipse.update.configurator Are you running on Java 9 perhaps? https://github.com/eclipse/eclipse.platform/commit/0afed29e9fab7a169ac8eaaa733c8cf8e356b9b6#diff-c70a817762e12d58a72e93d56f5dfbe6 |
my gradle runs with java.version=1.8.0_92 |
Hi, I've just come across this problem when trying to launch my Eclipse-based RCP application (see archimatetool/archi#429) with this config.ini file:
Like you, I replaced I'm running Java 1.8. Did you figure out what could cause this? Is it a bug in org.eclipse.update.configurator? |
Sorry, I have no more information, I just live with the older configurator in my SW. And I hope future Eclipse updates will not have problems with this. |
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=542706 - is this the issue? |
If you're having trouble launching OSGi applications, it's worth checking out Solstice. |
Hi Ned,
i use the equinoxLaunch task to start a code generator application in the build.
This worked with diffplug 3.14 plugin.
Now i updated the bundles for my application and adjusted the runtime dependencies.
It fails, also with diffplug 3.15.
The javax.inject did not changed at all.
I double checked all jar name changes.
Now I am a bit lost, if this is a build.gradle problem, a problem with the updated jars, or a problem with the diffplug.
Can you give a hint how to go on from here?
Frank
The text was updated successfully, but these errors were encountered: