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
  •  | 
  •  

Question

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")
Was it helpful?

Solution

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')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top