Setting up Liferay portlet Maven Eclipse Project Required dependencies to get started
3.Liferay IDE Eclipse
All dependencies will be available to download at https://www.liferay.com/downloads/liferay-portal/overview. Download all community edition dependencies Liferay support build platforms such as ANT and Maven.
Starting with Maven as Build Platform. Starting with Liferay Ide,create a new Liferay Plugin Project.
Give the Project name,build type as Maven,Give your groupid,artifactid or go with the default.
Choose the Portlet Framework. I’ll use Liferay’s inbuilt MVC. Other options are JSF and Vaidin.
Finish and you will have your Project created. Below is the Project structure. portlet.xml : configuration file where all the portlet configurations :
my-portlet1 My Portlet1 com.test.MyPortlet1 view-template /html/myportlet1/view.jsp 0 text/html view My Portlet1 My Portlet1 administrator guest power-user user
liferay-portlet.xml that contains the referance to the CSS/JS/icon etc.
my-portlet1 /icon.png /css/main.css /js/main.js my-portlet1-portlet administrator Administrator guest Guest power-user Power User user User
Define the Liferay tomcat server from New Server Wizard.
Start the server.
Hit localhost on your browser.
Liferay portal will open.
It will ask you for some information like username,organization name,password,database type etc.
By default Liferay is pointed to Hypersonic database. You can make it point to some other database as well.[Covered in next post]
After done will with filling ,all click finish and accept the terms and condition page to go to the Liferay portal Home.
Use the user created by you on the last step or just login with test@Liferay.com that is inbuilt web Administrator user.