在Grails 2中,如何从应用程序依赖的插件中包含Gant脚本的Targets? [英] In Grails 2, how do you includeTargets from Gant scripts from a plugin your app is dependent upon?
本文介绍了在Grails 2中,如何从应用程序依赖的插件中包含Gant脚本的Targets?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想重用_ShiroInternal.groovy中定义的目标,但我不知道用什么Grails变量来访问它:
includeTargets<<新文件($ {** what-goes-here **} / scripts / _ShiroInternal.groovy)
解决方案
为每个安装的插件添加了一个属性, fooPluginDir
。因此,对于shiro插件,它将是
includeTargets<<新文件(shiroPluginDir,'scripts / _ShiroInternal.groovy')
In Grails 2, I am creating a company specific authentication plugin that depends on the shiro plugin. I would like to reuse shiro's gant scripts in my plugin's gant scripts. My challenge is that I do not know how to access shiro's gant scripts in my includeTargets.
I would like to reuse targets defined in _ShiroInternal.groovy but I do not know what Grails variable to use to access it:
includeTargets << new File ("${**what-goes-here**}/scripts/_ShiroInternal.groovy")
解决方案
There is a property added for each installed plugin, fooPluginDir
. So for the shiro plugin it would be
includeTargets << new File(shiroPluginDir, 'scripts/_ShiroInternal.groovy')
这篇关于在Grails 2中,如何从应用程序依赖的插件中包含Gant脚本的Targets?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文