MovingBlocks / groovy-wrapper

Groovy Wrapper extension for the Gradle Wrapper - execute Groovy scripts as easily as Gradle scripts!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using @Grab causes an error about Ivy not being available

Cervator opened this issue · comments

Apparently not a particularly uncommon issue when you get creative with the context within you run Groovy - happens in some cases when using Groovy from inside Jenkins for instance.

Caught: java.lang.NoClassDefFoundError: org/apache/ivy/core/report/ResolveReport
java.lang.NoClassDefFoundError: org/apache/ivy/core/report/ResolveReport
        at org.gradle.wrapper.GroovyBootstrapMainStarter.start(GroovyBootstrapMainStarter.java:34)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
        at org.gradle.wrapper.GroovyWrapperMain.main(GroovyWrapperMain.java:61)
Caused by: java.lang.ClassNotFoundException: org.apache.ivy.core.report.ResolveReport
        ... 3 more

So Ivy just isn't on the classpath in the way Groovy gets loaded via the wrapper. It is hiding inside the Gradle dist just fine so it is just digging it up and adding it in.