title: Getting Class Not Found: org.apache.ivy.core.report.ResolveReport when using GroovyClassLoader in Java
body: <p>I have a groovy script like so:</p>
  
  <pre><code>@Grab('com.univocity:univocity-parsers:2.0.0')
  import com.univocity.parsers.csv.*;
  
  class MyCsvParser {
  
  }
  </code></pre>
  
  <p>And I want to load this class in my java application via <code>GroovyClassLoader</code>. But the <code>@Grab</code> somehow yields in an ivy exception:</p>
  
  <pre><code>SomeJavaClass {
      void someMethod() {
           String script = FileUtils.readFileToString("the groovy File");
           Class c = new GroovyClassLoader(this.getClass().getClassLoader())).parse(script);
      }
  }
  </code></pre>
  
  <p>Stack:</p>
  
  <pre><code>Caused by: java.lang.ClassNotFoundException: org.apache.ivy.core.report.ResolveReport
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 41 more
  </code></pre>
  
  <p>When I comment out the <code>@Grab</code> everything works just fine. How can I enable the Grapes in <code>GroovyClassLoader</code>?</p>