Running groovy script that uses AntBuilder (via right click / 'Run') results in NoClassDef org/apache/tools/ant/BuildLogger

Hi.

I have a groovy  script that works fine when i run  it from the command line (on linux using groovy 2.3.0).  

but when i try to run the same script in intellij  [ 12.1.6  Build: #IU-129.1359 ]  i get the following error:

Caught: java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildLogger

 at Fio.class$(Fio.groovy)

 at Fio.$get$$class$groovy$util$AntBuilder(Fio.groovy)

 at Fio.run(Fio.groovy:1)


Process finished with exit code 1

Here is the script.  it's a very simple one..

def ant = new AntBuilder()



def zipfile = 'test.zip'

def current = '.'

ant.zip(destfile: zipfile) {

    fileset(dir: current) {

        include(name: '**/*.txt')

    }

}

Please sign in to leave a comment.