Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invocation exception for p2.asmaven plugin #166

Closed
simlei opened this issue Oct 17, 2021 · 2 comments
Closed

Invocation exception for p2.asmaven plugin #166

simlei opened this issue Oct 17, 2021 · 2 comments
Labels

Comments

@simlei
Copy link

simlei commented Oct 17, 2021

I am trying to give the p2.asmaven Plugin a spin.

  • Gradle 7.2
  • Java 1.8 (in env + gradle.properties)
  • My build.gradle is:
plugins {
  id "com.diffplug.p2.asmaven" version "3.33.1"
  id 'java-library'
}

apply plugin: 'com.diffplug.p2.asmaven'
p2AsMaven {
    // the maven group they shall have
    group 'eclipse-deps', {
        // the repositories and artifacts to download
        repoEclipse '4.17.0'
        iu          'org.eclipse.jdt.core'
    }
}

dependencies {
    implementation 'eclipse-deps:org.eclipse.jdt.core:+'
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(8)
    }
}

version = '1.2.1'

I am getting this stack trace

with this being the interesting part I imagine:

Caused by: java.lang.SecurityException: Signers of 'org.osgi.service.log.LogLevel' do not match signers of other classes in package
        at org.eclipse.osgi.internal.log.EquinoxLogServices.<init>(EquinoxLogServices.java:94)
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:78)
        at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:34)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:315)
        at com.diffplug.gradle.eclipserunner.EquinoxLauncher$Running.<init>(EquinoxLauncher.java:196)
        at com.diffplug.gradle.eclipserunner.EquinoxLauncher$Running.<init>(EquinoxLauncher.java:189)
        at com.diffplug.gradle.eclipserunner.EquinoxLauncher.open(EquinoxLauncher.java:174)
        at com.diffplug.gradle.eclipserunner.EquinoxLauncher.run(EquinoxLauncher.java:179)

Am I on the right track?
My goal is to use this plugin to package locally-built RCP product p2 artifacts into a local .m2 repo, so that other, purely maven-configured projects can resolve them and compile against them without fuzz.

@nedtwigg nedtwigg transferred this issue from diffplug/spotless Oct 17, 2021
@nedtwigg
Copy link
Member

Hmm... I have encountered something like that before. Eclipse signs all their jars, and at some point their signing information changed. If your classpath has some jars from before the change, and other jars from after the change, then you get this error. It could be that a newer version of Gradle core is pulling in OSGi jars with signing information that disagrees with what Goomph pulls in.

It was very frustrating to fix, and I'm surprised that you're hitting it now. I would follow this protocol:

  • go back to older versions of Gradle and/or Goomph until you have a known-working state
  • bisect from there to figure out which version breaks things

Goomph uses Goomph in its own build, so Gradle 6.8.2 would be a good starting point. If that doesn't get you to a working state, I would use Goomph 3.28.0, since that's what Goomph is using for its own build.

As far as fixing this, I'm happy to merge PR's and help point users in the right direction, but the only parts we are proactively maintaining are the mavencentral and apt plugins.

@nedtwigg nedtwigg added the bug label Oct 17, 2021
@nedtwigg
Copy link
Member

There is a new dev.equo.p2deps plugin which solves this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants