Maven (build tool and a Trickster) provides several Liferay specific archetypes with com.liferay.maven.archetypes
archetypeGroupId. Some of these are tied to MVC frameworks to be used in Liferay portlet (e.g liferay-portlet-jsf-archetype), others assembled for more generic functionality. Sample command line to generate Liferay portlet project structure without any MVC specifics added:
mvn archetype:generate \ -DarchetypeGroupId=com.liferay.maven.archetypes \ -DarchetypeArtifactId=liferay-portlet-archetype \ -DarchetypeVersion=6.2.10.6 \ -DgroupId=thecompany.com \ -DartifactId=company-portlet-one \ -Dversion=0.1-SNAPSHOT \ -DinteractiveMode=false
The list of all available Maven archetypes can be seen with: mvn archetype:generate
command. Following MVC agnostic archetypes are available in com.liferay.maven.archetypes
group.
liferay-ext-archetype — for creating customizations as Liferay extension, also called ext plugin. With ext plugins Liferay core functionality can be replaced with modifications separate from Liferay's code. Jamie L Sammons writes:
Liferay Ext Plugins are often considered a last resort in the Liferay Plugin world due to the complexity and the lack of hot deploy as well as the inability to remove them once they are deployed.
liferay-hook-archetype — for Liferay customization, a hook has advantage of hot deploy. Web resources, JSPs, portal services, etc can be overridden with hooks. Hooks can also be defined in portlets.
liferay-layouttpl-archetype — layout templates allow definition of new page layouts, embedding commonly used portlets in layouts, specifying CSS, etc.
liferay-portlet-archetype — minimalistic Liferay portlet to be deployed in portal.
liferay-servicebuilder-archetype — to generate a basic service layer. It comes with promise of CRUD and SOAP all in place for the entities.
liferay-theme-archetype — Liferay theme plugin archetype for user interface customization of sites in Liferay.
liferay-web-archetype — creates a minimal web application skeleton, Liferay specific addition being WEB-INF/liferay-plugin-package.properties file, allowing to manage that application from Liferay Control Panel.
No comments:
Post a Comment