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

Base plugin does not work with Gradle 8.8 #452

Open
robertpanzer opened this issue Aug 11, 2024 · 0 comments
Open

Base plugin does not work with Gradle 8.8 #452

robertpanzer opened this issue Aug 11, 2024 · 0 comments

Comments

@robertpanzer
Copy link

To reproduce try to build the following project with Gradle 8.8:

buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
        mavenCentral()
    }
    dependencies {
        classpath("com.github.jruby-gradle:jruby-gradle-plugin:2.0.1") {
            exclude module: 'grolifant'
            exclude module: 'okhttp-digest'
        }
        classpath 'org.ysb33r.gradle:grolifant:0.17.0'
        classpath 'io.github.rburgst:okhttp-digest:1.21'
    }
}

apply plugin: 'com.github.jruby-gradle.base'

group = 'org.example'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    ruby.gems()
}

dependencies {
    gems "rubygems:slim:4.1.0"
}

This gives the following error:

gradle jrubyPrepare
exception thrown for request to /rubygems/slim/4.1.0/ivy.xml
java.lang.NoClassDefFoundError: org/gradle/wrapper/ExclusiveFileAccessManager
        at java.base/java.lang.Class.getDeclaredFields0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3473)
        at java.base/java.lang.Class.getDeclaredFields(Class.java:2542)
        at org.codehaus.groovy.reflection.CachedClass$1.lambda$initValue$2(CachedClass.java:59)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:62)
        at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:54)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:50)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:37)
        at org.codehaus.groovy.reflection.CachedClass.getFields(CachedClass.java:256)
        at groovy.lang.MetaClassImpl.addFields(MetaClassImpl.java:2488)
        at groovy.lang.MetaClassImpl.inheritFields(MetaClassImpl.java:2483)
        at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2369)
        at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3409)
        at groovy.lang.MetaClassImpl.reinitialize(MetaClassImpl.java:3383)
        at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3376)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:273)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:315)
        at org.ysb33r.grolifant.api.ExclusiveFileAccess.$getStaticMetaClass(ExclusiveFileAccess.groovy)
        at org.ysb33r.grolifant.api.ExclusiveFileAccess.<init>(ExclusiveFileAccess.groovy)
        at com.github.jrubygradle.internal.core.AbstractIvyXmlProxyServer.createIvyXml(AbstractIvyXmlProxyServer.groovy:116)
        at com.github.jrubygradle.internal.core.AbstractIvyXmlProxyServer.getIvyXml(AbstractIvyXmlProxyServer.groovy:155)
        at com.github.jrubygradle.internal.core.IvyXmlRatpackProxyServer.lambda$run$0(IvyXmlRatpackProxyServer.java:76)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.MethodHandler.handle(MethodHandler.java:44)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.DefaultContext.insert(DefaultContext.java:179)
        at ratpack.path.internal.PathHandler.handle(PathHandler.java:61)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.DefaultContext.lambda$start$4(DefaultContext.java:104)
        at ratpack.exec.internal.DefaultExecution.lambda$new$0(DefaultExecution.java:82)
        at ratpack.exec.internal.DefaultExecution$InitialExecStream.exec(DefaultExecution.java:403)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:224)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:217)
        at ratpack.exec.internal.DefaultExecution.drain(DefaultExecution.java:187)
        at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
        at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
        at ratpack.exec.internal.DefaultExecController$ExecControllerBindingThreadFactory.lambda$newThread$0(DefaultExecController.java:137)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.ExclusiveFileAccessManager
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader.findClass(VisitableURLClassLoader.java:187)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        ... 44 more
exception thrown for request to /rubygems/slim/4.1.0/ivy.xml
java.lang.NoClassDefFoundError: org/gradle/wrapper/ExclusiveFileAccessManager
        at java.base/java.lang.Class.getDeclaredFields0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3473)
        at java.base/java.lang.Class.getDeclaredFields(Class.java:2542)
        at org.codehaus.groovy.reflection.CachedClass$1.lambda$initValue$2(CachedClass.java:59)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:62)
        at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:54)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:50)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:37)
        at org.codehaus.groovy.reflection.CachedClass.getFields(CachedClass.java:256)
        at groovy.lang.MetaClassImpl.addFields(MetaClassImpl.java:2488)
        at groovy.lang.MetaClassImpl.inheritFields(MetaClassImpl.java:2483)
        at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2369)
        at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3409)
        at groovy.lang.MetaClassImpl.reinitialize(MetaClassImpl.java:3383)
        at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3376)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:273)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:315)
        at org.ysb33r.grolifant.api.ExclusiveFileAccess.$getStaticMetaClass(ExclusiveFileAccess.groovy)
        at org.ysb33r.grolifant.api.ExclusiveFileAccess.<init>(ExclusiveFileAccess.groovy)
        at com.github.jrubygradle.internal.core.AbstractIvyXmlProxyServer.createIvyXml(AbstractIvyXmlProxyServer.groovy:116)
        at com.github.jrubygradle.internal.core.AbstractIvyXmlProxyServer.getIvyXml(AbstractIvyXmlProxyServer.groovy:155)
        at com.github.jrubygradle.internal.core.IvyXmlRatpackProxyServer.lambda$run$0(IvyXmlRatpackProxyServer.java:76)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.MethodHandler.handle(MethodHandler.java:44)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.DefaultContext.insert(DefaultContext.java:179)
        at ratpack.path.internal.PathHandler.handle(PathHandler.java:61)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.DefaultContext.lambda$start$4(DefaultContext.java:104)
        at ratpack.exec.internal.DefaultExecution.lambda$new$0(DefaultExecution.java:82)
        at ratpack.exec.internal.DefaultExecution$InitialExecStream.exec(DefaultExecution.java:403)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:224)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:217)
        at ratpack.exec.internal.DefaultExecution.drain(DefaultExecution.java:187)
        at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
        at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
        at ratpack.exec.internal.DefaultExecController$ExecControllerBindingThreadFactory.lambda$newThread$0(DefaultExecController.java:137)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.ExclusiveFileAccessManager
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader.findClass(VisitableURLClassLoader.java:187)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        ... 44 more
exception thrown for request to /rubygems/slim/4.1.0/ivy.xml
java.lang.NoClassDefFoundError: org/gradle/wrapper/ExclusiveFileAccessManager
        at java.base/java.lang.Class.getDeclaredFields0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3473)
        at java.base/java.lang.Class.getDeclaredFields(Class.java:2542)
        at org.codehaus.groovy.reflection.CachedClass$1.lambda$initValue$2(CachedClass.java:59)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:62)
        at org.codehaus.groovy.reflection.CachedClass$1.initValue(CachedClass.java:54)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:50)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:37)
        at org.codehaus.groovy.reflection.CachedClass.getFields(CachedClass.java:256)
        at groovy.lang.MetaClassImpl.addFields(MetaClassImpl.java:2488)
        at groovy.lang.MetaClassImpl.inheritFields(MetaClassImpl.java:2483)
        at groovy.lang.MetaClassImpl.setupProperties(MetaClassImpl.java:2369)
        at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3409)
        at groovy.lang.MetaClassImpl.reinitialize(MetaClassImpl.java:3383)
        at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3376)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:273)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:315)
        at org.ysb33r.grolifant.api.ExclusiveFileAccess.$getStaticMetaClass(ExclusiveFileAccess.groovy)
        at org.ysb33r.grolifant.api.ExclusiveFileAccess.<init>(ExclusiveFileAccess.groovy)
        at com.github.jrubygradle.internal.core.AbstractIvyXmlProxyServer.createIvyXml(AbstractIvyXmlProxyServer.groovy:116)
        at com.github.jrubygradle.internal.core.AbstractIvyXmlProxyServer.getIvyXml(AbstractIvyXmlProxyServer.groovy:155)
        at com.github.jrubygradle.internal.core.IvyXmlRatpackProxyServer.lambda$run$0(IvyXmlRatpackProxyServer.java:76)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.MethodHandler.handle(MethodHandler.java:44)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.DefaultContext.insert(DefaultContext.java:179)
        at ratpack.path.internal.PathHandler.handle(PathHandler.java:61)
        at ratpack.handling.internal.DefaultContext.next(DefaultContext.java:157)
        at ratpack.handling.internal.DefaultContext.lambda$start$4(DefaultContext.java:104)
        at ratpack.exec.internal.DefaultExecution.lambda$new$0(DefaultExecution.java:82)
        at ratpack.exec.internal.DefaultExecution$InitialExecStream.exec(DefaultExecution.java:403)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:224)
        at ratpack.exec.internal.DefaultExecution.exec(DefaultExecution.java:217)
        at ratpack.exec.internal.DefaultExecution.drain(DefaultExecution.java:187)
        at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
        at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:474)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
        at ratpack.exec.internal.DefaultExecController$ExecControllerBindingThreadFactory.lambda$newThread$0(DefaultExecController.java:137)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.ExclusiveFileAccessManager
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader.findClass(VisitableURLClassLoader.java:187)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        ... 44 more
> Task :jrubyPrepare FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jrubyPrepare'.
> Could not resolve all files for configuration ':gems'.
   > Could not resolve rubygems:slim:4.1.0.
     Required by:
         project :
      > Could not resolve rubygems:slim:4.1.0.
         > Could not get resource 'http://localhost:63141/rubygems/slim/4.1.0/ivy.xml'.
            > Could not HEAD 'http://localhost:63141/rubygems/slim/4.1.0/ivy.xml'. Received status code 500 from server: Internal Server Error

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 33s
1 actionable task: 1 executed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant