I have a groovy script (source.groovy) that needs to call a method from another groovy script (external.groovy). The problem is external.groovy imports a library that does not exists so I get an error. Here is an example:
Source.groovy:
new GroovyShell().parse( new File( 'external.groovy' ) ).with {
method()
}
Here is external.groovy:
import com.foo.doesnotexsist
def method() {println "test"}
When I run Source.groovy I get an error because com.foo.doesnotexsist does not exist. I don't care that it does not exists because it does not effect the method() function. Is there a way I can call the method() function?