How to create Liferay Plugin Portlets

1. How to Create plugin portlet by own

Navigate to your portlets directory inside your pluginsSDK



use ./ “portletname” “portletdisplayname”


/home/kanakarajr/liferaypluginsSDK5.2.1/portlets> ./ “MyPluginPortletTest” “My Liferay Plugin Portlet Test Work”

Now you have created files necessary to create plugin portlet.

2. How to import portlet directory in your Eclipse IDE

Navigate to your pluginportlet directory .. just created

/home/kanakarajr/liferaypluginsSDK5.2.1/portlets/MyPluginPortletTest> ant setup-eclipse

This will create eclipse project files

Import this into your workspace as project.

Using File-> Import -> Existing Projects Into WorkSpace -> Browse your directory -> Finish

3.How to deploy these portlets

3.1 Create build file

Inside your pluginsSDK modify by making copy of, rename the file to


location: /home/kanakarajr/liferaypluginsSDK5.2.1/

3.2 Configure server location in

Specify liferay tomcat location



3.3 Specify Auto Deploy directory for your plugin portlets



3.4 How to build portlets

Navigate to your pluginportlet directory and use “ant deploy” to build portlets


/home/kanakarajr/liferaypluginsSDK5.2.1/portlets/MyPluginPortletTest> ant deploy

finally you will get message like this ..

12:16:45,642 INFO  [PortletHotDeployListener:351] 1 portlet1 for MyPluginPortletTest- are available for use

Now you know how to build liferay plugin portlets and how to use it in EclipseIDE and finally how to deploy the developed portlets into liferay



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s