Skip to content
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

greclipse('4.33') not working #2285

Closed
king-tyler opened this issue Sep 30, 2024 · 1 comment
Closed

greclipse('4.33') not working #2285

king-tyler opened this issue Sep 30, 2024 · 1 comment

Comments

@king-tyler
Copy link

Running spotless with greclipse('4.33') is failing with a SecurityException. The same build is working with greclipse('4.32') and greclipse()

Step 'eclipse groovy formatter' found problem in 'build.gradle':
class "org.eclipse.jface.text.ITextSelection"'s signer information does not match signer information of other classes in the same package
java.lang.SecurityException: class "org.eclipse.jface.text.ITextSelection"'s signer information does not match signer information of other classes in the same package
        at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1158)
        at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:902)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
        at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
        at com.diffplug.spotless.FeatureClassLoader.findClass(FeatureClassLoader.java:79)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
        at java.base/java.lang.Class.getConstructor0(Class.java:3578)
        at java.base/java.lang.Class.getConstructor(Class.java:2271)
        at com.diffplug.spotless.extra.groovy.GrEclipseFormatterStep.apply(GrEclipseFormatterStep.java:89)
        at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:80)
        at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:103)
        at com.diffplug.spotless.Formatter.compute(Formatter.java:246)
        at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:203)
        at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:190)
        at com.diffplug.gradle.spotless.SpotlessTaskImpl.processInputFile(SpotlessTaskImpl.java:105)
        at com.diffplug.gradle.spotless.SpotlessTaskImpl.performAction(SpotlessTaskImpl.java:89)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        ...

build.gradle:

plugins {
  id 'com.diffplug.spotless' version '6.25.0'
}

repositories {
  mavenCentral()
}

spotless {
  groovyGradle {
    target buildFile
    greclipse('4.33')
  }
}

Spotless Version: 2.45.0 / Gradle 6.25.0
Gradle Version: 8.10.2
Java Version: 17.0.2
OS: Windows 11

@king-tyler
Copy link
Author

This seems to be the underlying issue: eclipse-platform/eclipse.platform.ui#2312

The workaround:

configurations.matching { it.name.startsWith 'spotless' }.all {
  resolutionStrategy.force 'org.eclipse.platform:org.eclipse.jface.text:3.25.100'
}

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

No branches or pull requests

1 participant