Getting Class Not Found: org.apache.ivy.core.report.ResolveReport when using GroovyClassLoader in Java

前端 未结 1 731
囚心锁ツ
囚心锁ツ 2021-02-13 11:09

I have a groovy script like so:

@Grab(\'com.univocity:univocity-parsers:2.0.0\')
import com.univocity.parsers.csv.*;

class MyCsvParser {

}

An

相关标签:
1条回答
  • 2021-02-13 11:13

    You should add the ivy dependency. It's not added by default because it's declared as non-transitive. Ivy is the library which manages the dependencies loaded by @Grab:

    <dependency>
      <groupId>org.apache.ivy</groupId>
      <artifactId>ivy</artifactId>
      <version>2.4.0</version>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题