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

liferay-exploded: Quick deployment to Liferay

  • Tags: /
  • Latest: 0.8
  • Last Updated: 25 June 2009
  • Grails version: 1.1 > *
  • Authors: Brian McGinnis
1 vote
compile "org.grails.plugins:liferay-exploded:0.8"




You need to setup LIFERAY_HOME environment variable to point the top directory of liferay-portal installation.

(set up the environment variable. For example, add the following line
  in $HOME/.profile in case of sh/bash)
export LIFERAY_HOME=/path_to/liferay-portal-5.2.2

The plugin can be installed with the following command.

grails install-plugin liferay-exploded

portlets and portlets-liferay plugins are also installed.


Portlets plugins source code has migrated from svn repo to github If you plan to improve the codebase, please create a JIRA ticket to request github access with your github id. If you join the team, you can update the codebase directly rather than creating a pull request.


This plugin allows the changes made to grails project to be reflected to the portlet running on Liferay without packaging and manual deployment.

This plugin is designed for development use only. The hot deployment feature of Tomcat causes memory leak and you'll get OutOfMemoryError due to the exhaustion of PermGen space after several re-deployments. In that case, please restart Tomcat. Bumping up -XX:MaxPermSize in JVM parameter may defer the error.



This commands performs the following three steps.

  1. Invoke grails war , and explode the war file into target/exploded directory.
  2. Generate Liferay specific configurations in the exploded war, and make modifications to the existing configuration files such as web.xml .
  3. Generate Tomcat context xml file, and copy it to $LIFERAY_HOME/tomcat-x.x.x/conf/Catalina/localhost directory.


This command detects the changes made to grails-app/portlets , grails-app/views , and grails-app/i18n , copy them to the exploded war file. Liferay's hot deployer automatically picks up the changes and re-deploy the portlet.


First, you need to start up a Liferay Portal server.

cd $LIFERAY_HOME/tomcat-5.5.27/bin

This plugin leverages Liferay's HotDeployer for Tomcat. It doesn't work with other application servers.

grails create-project Test1
cd Test1
grails install-plugin liferay-exploded
grails create-portlet My
grails generate-portlet-views My
grails liferay-deploy

Make some changes to your portlet and/or GSPs, and invoke the following command.

grails liferay-update

Please don't refresh the browser until you see the following message in catalina.out .

23:29:17,868 INFO  [PortletHotDeployListener:219] Registering portlets for Test1
23:29:18,379 INFO  [PortletHotDeployListener:303] 2 portlets for Test1 are available for use

You may get an exception if you send HTTP request during the redeployment. In that case, you need to bounce Liferay server.


Version 0.8 (06-25-2009)

  • Fixed the issue that LIFERAY_HOME is not found on Windows.