Plugins You can find out about all the publicly available Grails plugins.

Scripting plugin

  • Authors: null
0 vote
compile "org.grails.plugins:scripting:0.1.1"




Just execute following from your application directory:
grails install-plugin scripting


You can create Groovy scripts as CRUDs and run them. You can use it for updating entities dynamically, integrate with jobs, find specific entities persisted, export part of codes, admin stuff, among others. Currently, a Script is something with a label and a content (code).

Admin view

You can add Groovy scripts and run them using the default CRUD view. It is available at /script.


There is a service available called ScriptService. The service provides two methods.

def run(Script script, params)

def run(String scriptContent, params)

  • script:model entity
  • scriptContent: string with the script
  • params: hashtable of params

Finding a script

You can use Script.findByLabel() to get your Script object.


For example, add the following script code and run it. You will get the script list.

import scripting.Script;
return Script.findAll();


If you want to contributte, feel free:

  • Add new languages support.
  • Improve current view (eg: adding language syntax editor)
  • Improve unit/integration tests