You need to setup
LIFERAY_HOMEenvironment variable to point the top directory of liferay-portal installation.
The plugin can be installed with the following command.
(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
grails install-plugin liferay-exploded
portlets-liferayplugins are also installed.
Portlets plugins source code has migrated from svn repo https://svn.codehaus.org/grails-plugins to github https://github.com/grails-portlets-plugin. 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.
OverviewThis 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
OutOfMemoryErrordue to the exhaustion of PermGen space after several re-deployments. In that case, please restart Tomcat. Bumping up
-XX:MaxPermSizein JVM parameter may defer the error.
liferay-deployThis commands performs the following three steps.
grails war, and explode the war file into
- Generate Liferay specific configurations in the exploded war, and make modifications to the existing configuration files such as
- Generate Tomcat context xml file, and copy it to
liferay-updateThis command detects the changes made to
grails-app/i18n, copy them to the exploded war file. Liferay's hot deployer automatically picks up the changes and re-deploy the portlet.
UsageFirst, you need to start up a Liferay Portal server.
cd $LIFERAY_HOME/tomcat-5.5.27/bin ./startup.sh
This plugin leverages Liferay's HotDeployer for Tomcat. It doesn't work with other application servers.
Make some changes to your portlet and/or GSPs, and invoke the following command.
grails create-project Test1 cd Test1 grails install-plugin liferay-exploded grails create-portlet My grails generate-portlet-views My grails liferay-deploy
Please don't refresh the browser until you see the following message in
You may get an exception if you send HTTP request during the redeployment. In that case, you need to bounce Liferay server.
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
Version 0.8 (06-25-2009)
- Fixed the issue that LIFERAY_HOME is not found on Windows.