Is there a way in Grails to Detect that a plugin is installed. For example I need to know if the "Acegi" plugin is installed. If it is then I can run different Code. If the plugin is not installed (which is a viable option) then I can run different code.
Thanks in Advance.
By default the plugins are in . grails/<version>/<project>/plugins . You can change it by setting grails. project.
Grails plugin which allows you to view files stored on the file system.
You can use the plugin manager for this:
import org.codehaus.groovy.grails.plugins.PluginManagerHolder
if (PluginManagerHolder.pluginManager.hasGrailsPlugin('acegi')) {
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With