Over a million developers have joined DZone.

Easy Grails with IntelliJ IDEA - 3. Dealing with Grails Plugins


The list of Grails plugins is extensive, and IntelliJ IDEA 8 helps you easily explore and manage plugins without leaving the IDE.

The most customary way to find out which plugins are available is to run the Grails target list-plugins by pressing Ctrl+Alt+G, or choosing Tools | Run Grails target on the main menu:







The list of plugins is displayed in the console in the Grails tool window. The first invocation of this command takes time, because the information is being cached. Further, you can get information about a particular plugin, install or uninstall it, using the appropriate Grails targets.

As an alternative to this traditional approach, IntelliJ IDEA suggests a handy tool that helps perform the same tasks in a single Grails Plugins dialog box. This plugin manager is invoked by pressing Ctrl+Alt+K, or choosing Tools | Grails Plugins on the main menu.

Same as in case with the list-plugins Grails target, the first invocation takes time: you have to synchronize the list of plugins with the Grails repository, by clicking the refresh button on the dialog toolbar. After that, the plugin manager is ready to work.

Once you have downloaded the list of plugins, you won’t need to do it any more, because all information is cached together with your project.

Finding the desired plugin in the long list is now just a snap: in the search field, type any substring contained in the plugin name. The list narrows down to show the matching names only:








Plugin information (description, home page, etc.) is available “upon request”: you can either download it for the selected plugin only, or for all the available plugins. You can also get plugin information “on the fly”, for any plugin you select in the list, if you check the same-name check box. Mind the gap the downloading time!

Now, having found the plugins you would like to use, install them immediately in the Grails plugins dialog box. Note the Enable column: the selected check boxes denote plugins already installed on your machine. Select or clear the check boxes (use space also for this), and click Apply Changes to install and uninstall plugins.

When a plugin is installed, it becomes visible under the plugins nodes of your Grails application. So doing, the source directories of the plugin are automatically included in the source routes of your project:
















Needless to say, that all the plugin handling commands are available both on the toolbar of the Grails plugins dialog box, and on the context menus of the plugins.



The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}