cjstehno / ersatz

🤖 A simulated HTTP server for testing client code with configurable responses.
https://cjstehno.github.io/ersatz
Apache License 2.0
47 stars 5 forks source link

safe JAR should not contain groovy-all extension module manifest #86

Closed musketyr closed 6 years ago

musketyr commented 6 years ago

when I try to upgrade to 1.6.0.@safe version I got following error:

...
Caused by: java.lang.ExceptionInInitializerError
        at org.gradle.api.internal.classloading.GroovySystemLoaderFactory.forClassLoader(GroovySystemLoaderFactory.java:44)
        at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:97)
        at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:56)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkerAdapter.execute(AbstractDaemonCompiler.java:73)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkerAdapter.execute(AbstractDaemonCompiler.java:64)
        at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:29)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerDaemonServer.execute(AbstractDaemonCompiler.java:91)
        at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:88)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:147)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:129)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
        ... 2 more
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.4.12 and you are trying to load version 2.4.10
        ... 15 more

The problem is that safe JAR contains META-INF/services/org.codehaus.groovy.runtime.ExtensionModule which may point to a different Groovy version which is used in the project.

If possible it would be great if safe jar won't contain Groovy distribution as this is not the library causing issues. or at least it should not contain the ExtensionModule manifest.

cjstehno commented 6 years ago

Oops.. I had a hard-coded Groovy version being excluded, which was not the current version being used. :-/

musketyr commented 6 years ago

sadly the safe JAR 1.6.1 published on Bintray does not help. it still contains groovy classes.

cjstehno commented 6 years ago

Sorry. I meant that 1.6.2 will fix this. Coming today.

On Thu, Feb 8, 2018, 12:27 AM Vladimir Orany notifications@github.com wrote:

sadly the safe JAR 1.6.1 published on Bintray does not help. it still contains groovy classes.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cjstehno/ersatz/issues/86#issuecomment-364015192, or mute the thread https://github.com/notifications/unsubscribe-auth/AALMKhrylhG-83wxG4-ir4l5JT384Zmhks5tSpO7gaJpZM4R9C5n .

--

Christopher J Stehno chris.stehno@gmail.com http://stehno.com