Some problem with AntBuilder?

When I deploy the grails application, it shows a classnotfound Exception in the AntBuilder? Class. Do I need to add any jar files for the project? Thanks in advance.

java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.tools.ant.Project.initProperties(Project.java:308) at org.apache.tools.ant.Project.init(Project.java:295) at com.cabot.reader.BookController$_closure5.doCall(BookController.groovy:109) at com.cabot.reader.BookController$_closure5.doCall(BookController.groovy) at java.lang.Thread.run(Unknown Source) 
+4
source share
2 answers

Ant tanks are available in run-app because they are needed to run scripts. But banks are not included in the war, because Ant is not used by the web application at all. But you can enable them by declaring the dependency in grails-app/conf/BuildConfig.groovy :

 dependencies { compile 'org.apache.ant:ant:1.7.1' compile 'org.apache.ant:ant-launcher:1.7.1' } 
+8
source

You might want to check out http://grails.org/plugin/grails-ant .

It does what Burt suggests, plus adds the dynamic ant property to your controller and other artifacts.

+2
source

All Articles