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

StackOverflow https://stackoverflow.com/questions/15253070

  •  18-03-2022
  •  | 
  •  

문제

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')
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top