简体   繁体   中英

Grails include custom script

I have two script in my grails application, how can I need a target of a script into another one, how can I do it?

I tried doing:

includeTargets << grailsScript("FirstScript")

but grails throws an Exception...I tried also with:

includeTargets << FirstScript

but this one says that grails can't find the class...
How can I do?

Thanks

您需要将文件句柄移到脚本中:

includeTargets << new File("${basedir}/scripts/_FirstScript.groovy)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM