Installing a Grails plugin

publish on

The new way to install a Grails plugin since version 2.3

As the Grails plugin manager as been deprecated in the version 2.3. The new way to install a plugin is to add a new dependency via the dependency DSL. For example to install the searchable plugin add the following line in the /conf/BuildConfig.groovy file :

    plugins {
		compile ":searchable:0.6.5"

Then launch your app using Grails run-app command in a console.
{project_root_path}/ grails run-app

If you have any depencies errors like one of those:
Error Fatal error during compilation org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
SearchableGrailsPlugin.groovy: 25: unable to resolve class org.compass.gps.device.hibernate.HibernateGpsDevice
SearchableGrailsPlugin.groovy: 26: unable to resolve class org.compass.gps.impl.SingleCompassGps

Try refreshing depency using Grails refresh-depencies command:
{project_root_path}/ grails refresh-depencies

Then you should be able to launch your app with the newly installed plugin.

comments powered by Disqus