Setting up Liferay portlet Maven Eclipse Project

Wikis > Setting up Liferay portlet Maven Eclipse Project

Setting up Liferay portlet Maven Eclipse Project Required dependencies to get started

1.Liferay Tomcat

2.Liferay SDK
Add the SDK home to the eclipse.
0

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.

CLick to Enlarge

 

Starting with Maven as Build Platform. Starting with Liferay Ide,create a new Liferay Plugin Project.

2

 

Give the Project name,build type as Maven,Give your groupid,artifactid or go with the default.

3

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.

5

 

6

 

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.

Note:
Use the user created by you on the last step or just login with test@Liferay.com that is inbuilt web Administrator user.