November 16, 2009

Running Grails Commands in NetBeans

NetBeans has some great support for developing Grails applications. We can run an arbitrary Grails command by right-clicking on the project and select Run Grails Command... from the pop-up menu. NetBeans opens a dialog where we can type in the command we want to use with parameters if needed.

To get quick access to this dialog we can assign our own shortcut key combination to the command. We go to Tools | Options | Keymap. In the Search field we type run grails and we get the Run Grails Command... in the Actions list. We click on the ... button to assign our own shortcut key combination (I choose Ctrl+Shift+G).

We close the Options window and now we can press our shorcut key combination and we can run Grails commands immediately.