Monday, March 5, 2012

Liferay's Maven Archetypes

Been googling a bit for Liferay maven archetypes available, well typically for 6.1.0 as pre 6.1.0 does not have any maven archetypes in public repositories, and they aren't just listed in one web page. Putting them all down here in one place just so it's easier for whoever that's googling for this piece of information. This is the official Liferay blog that list down all the possible Liferay Maven archetypes, which are :-

  • liferay-ext-archetype
  • liferay-hook-archetype
  • liferay-layouttpl-archetype
  • liferay-portlet-archetype
  • liferay-theme-archetype
  • liferay-web-archetype
with the following properties
 liferay.version
 liferay.auto.deploy.dir
through my profile settings in ~/.m2/settings.xml

  ...
  
    ...
    
       liferay-plugins-development
       
          ...
          ...
       
    
    ...
  
  ...

with the mvn command to invoke them as follows
mvn archetype:generate 
         -DarchetypeArtifactId=liferay-portlet-archetype 
         -DarchetypeGroupId=com.liferay.maven.archetypes 
         -DarchetypeVersion=6.1.0 
         -DarchetypeCatalog=local,remote 
         -DartifactId=sample-portlet 
         -DgroupId=com.liferay.sample 
         -Dversion=1.0-SNAPSHOT
and the following mvn command just to install the whatever resultant artifacts using the 'liferay-plugins-development' profile
mvn install -P liferay-plugins-development

1 comment: