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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With