Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liferay new portlet vs plugin project difference

I'm using Eclipse and have the Liferay plugin installed and trying to create a new portlet. I want the Liferay IDE to pre-generate as much code as possible

Does anyone know what the main differences are between creating a new Liferay Portlet and a Liferay Plugin Project?

like image 712
steven35 Avatar asked Sep 30 '14 14:09

steven35


People also ask

What is plugin in Liferay?

Plugin is an umbrella term for installable portlet, theme, layout template, hook, Ext and web module Java EE . war files. Though Liferay comes bundled with a number of functional portlets, themes, layout templates, hooks and web modules, plugins provide a means of extending Liferay to be able to do almost anything.

What is portlet in Liferay?

Web apps in Liferay DXP are called portlets. Like many web apps, portlets process requests and generate responses. In the response, the portlet returns content (e.g. HTML, XHTML) for display in browsers.

What are the different module types supported in Liferay 7?

Module: Liferay 7 supports building modules with Gradle (by default), Maven, or Ant / Ivy. Plugin: On the other hand, Plugins can be built with Maven or Ant / Ivy.


2 Answers

Liferay Plugin Project allows you to create a project (of type portlet, theme, hook etc..), with all dependencies and settings that you need to start coding (or almost).

Liferay portlet adds to one of your plugin projects of type portlet a class (the portlet class) and optionally a JSP. But you have to tell the portlet how use this class and jsp, and probably many other missing settings.

I suggest you always use the Liferay Plugin Project, its simpler and fast.

like image 153
Marco Mercuri Avatar answered Oct 21 '22 05:10

Marco Mercuri


I'd rather use a different explanation than Marco:

A plugin project is what you add to the IDE - This is where your actual plugins live. Eclipse organizes around projects, and the projects are what makes up a plugin for Liferay. As the IDE interprets different kinds of projects in a different way (e.g. standalone Java Applications vs. "Dynamic Web projects" etc), a "Portlet Project" or "Theme Project" just adds to this list.

Once you have a plugin project (of type "Portlet") you can add as many portlets to it as you like. Thus, if you're developing portlets, you'll always have a minimum of one portlet plugin. This portlet plugin can hold any number of portlets.

You'll always deploy the whole plugin to Liferay - this fact might influence which portlets you want to group into a single plugin.

like image 25
Olaf Kock Avatar answered Oct 21 '22 04:10

Olaf Kock