Creating Portlet In Liferay 7 DXP
To Create Portlet in liferay 7 DXP we must have a liferay workspace if we are using gradle as a build tool. If you are using maven as a build you don't need to have a liferay workspace. If you are not familiar on creating liferay workspace please refer my previous post Liferay 7 DXP Setup In Eclipse
Environment
Liferay IDE Milestone 3.0.1 M2
Liferay CE Portal Tomcat 7 GA3
JDK 8
MySql 5.7
Step 1 : Create Module Project
After creating a new liferay workspace right click on the liferay workspace created, in my case the workspace name is 'LiferayWorkspace' if you want to create a new portlet click on the 'New Liferay Module Project' option as shown in the below.Step 2 : Select Project Template
After selecting the above option a new wizard window will be shown for giving the Portlet module details as shown below.
Give the Project Name, select build type as grade and project template as mvc-portlet then click next.
Step 3 : Provide Component Class Name and Package Name
Enter the portlet class name and package name then click on finish, a new portlet project will be created in the modules folder of the Liferay Workspace folder.