Configure Liferay with Eclipse

Eclipse is most popular IDE for Java developer today. Liferay eclipse plugin is used to develop various Liferay plugins(Portlets, hooks, layouts, themes and Ext). It makes Java developer life very easy. In this article, we will see how to configure liferay with Eclipse. In other words we will see how to configure eclipse plugin for Liferay.

Install Liferay Eclipse Plugin

You need to install eclipse on your machine first.You can download latest version of eclipse from (click on first link Eclipse IDE for Java EE Developer and download it).

In Liferay IDE section, select Liferay IDE XXXXX Archived from Other Downloads drop down  and click on download button. This will download zip file which contains Liferay eclipse plugin. If you want to download latest Eclipse + Liferay, select other options in dropdown.
Start eclipse and click on help->Install New Software menu.

Install Liferay eclipse plugin - Install New Software

Click on ‘Add’ button which will open small window with title Add Repository as per below screenshot.

Install Liferay eclipse plugin - install new repository


Click on Local button and give the path where you have unzip the eclipse plugin zip file. Give Liferay in name field and click on OK button. This will show two entries as below

Install Liferay eclipse plugin - available software 

Select these check box and click on Next till it ask finish. Click finish and it will start installing the plugin.
After successful installation, it may ask to restart eclipse. Once its restarted, you can observe liferay icon on toolbar as below. Alternately, you can click File–> New–>Project menu and open Liferay folder to verify Liferay plugin Project entry.

Install Liferay eclipse plugin - Liferay project

Configure Liferay Plugin SDK in Eclipse

Before starting any work, we have to configure the Liferay plugin SDK in eclipse. Click on Window–>Preferences menu and click on Liferay->Installed Plugin SDK from left side tree menu. This is the place from where we can configure multiple Liferay plugin SDK. However only one SDK can be active at a time. Click on Add.. button and point to Liferay plugin SDK folder from browse as per below screenshot.
Install Liferay eclipse plugin - Configure Liferay Plugin SDK


Give the location where you have installed plugin sdk and click on OK button.This is just one part. Liferay server (Liferay Tomcat bundle) needs to be configured in eclipse in order to compile plugins like portlets,hooks, themes, layouts and ext.

Configure Liferay Server in Eclipse

Download Liferay server from (Choose appropriate value from drop down). Liferay + tomcat is most common server bundle.
Download Liferay server and unzip it. and configure it by clicking liferay icon from toolbar and click on New Liferay Server (Just below New Liferay SDK option)it will open following screen.

Install Liferay eclipse plugin- Add new Liferay Server
select appropriate version of  Liferay and click on next button and give the path where you have unzip server (tomcat liferay bundle).Install Liferay eclipse plugin - Add new Liferay Server 
click Next->Next and finish.

Your Eclipse is ready to create Liferay Plugin Project. You can create Liferay proejct by clicking File->New->Project from top menu and select Liferay Project under Liferay category.
Install Liferay eclipse plugin - Add new Liferay plugin project
I would recommend looking to look at index page ‘A Complete Liferay Guide‘ to browse all topics about liferay.

Recommended For You

About the Author: Nilang

Nilang Patel is a technology evangelist who loves to spread knowledge and helping people in all possible ways. He is an author of two technical books - Java 9 Dependency and Spring 5.0 Projects.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.