In Grails 2, how do you includeTargets from Gant scripts from a plugin your app is dependent upon?

北城以北 提交于 2019-12-24 00:58:58

问题


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")

回答1:


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')


来源:https://stackoverflow.com/questions/15253070/in-grails-2-how-do-you-includetargets-from-gant-scripts-from-a-plugin-your-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!