Using the Pluto Maven Archetypes

There are four Maven archetypes available to quickly get you started developing a portlet application.

  • mvcbean-jsp-portlet-archetype
  • mvcbean-thymeleaf-portlet-archetype
  • bean-portlet-archetype
  • generic-portlet-archetype

The mvcbean-jsp-portlet-archetype can be used to create an MVCBean portlet project that utilizes features from MVC 1.0, Bean Validation 2.0, Portlet 3.0, and @Inject via CDI. HTML views are processed by Pluto's JavaServer™ Pages (JSP) view engine.

mvn archetype:generate \
    -DarchetypeGroupId=org.apache.portals.pluto.archetype \
    -DarchetypeArtifactId=mvcbean-jsp-portlet-archetype \
    -DarchetypeVersion=3.1.1 \
    -DgroupId=com.mycompany \
    -DartifactId=com.mycompany.my.mvcbean.jsp.portlet
        

The mvcbean-thymeleaf-portlet-archetype can be used to create an MVCBean portlet project that utilizes features from MVC 1.0, Bean Validation 2.0, Portlet 3.0, and @Inject CDI. HTML views are processed by Pluto's Thymeleaf view engine.

mvn archetype:generate \
    -DarchetypeGroupId=org.apache.portals.pluto.archetype \
    -DarchetypeArtifactId=mvcbean-thymeleaf-portlet-archetype \
    -DarchetypeVersion=3.1.1 \
    -DgroupId=com.mycompany \
    -DartifactId=com.mycompany.my.mvcbean.thymeleaf.portlet
        

The bean-portlet-archetype can be used to create a "bean portlet" that utilizes Portlet 3.0 features such as dependency injection with @Inject via CDI.

mvn archetype:generate \
    -DarchetypeGroupId=org.apache.portals.pluto.archetype \
    -DarchetypeArtifactId=bean-portlet-archetype \
    -DarchetypeVersion=3.1.1 \
    -DgroupId=com.mycompany \
    -DartifactId=com.mycompany.my.bean.portlet
        

The generic-portlet-archetype can be used to create a traditional portlet project which has a class that extends GenericPortlet.

mvn archetype:generate \
    -DarchetypeGroupId=org.apache.portals.pluto.archetype \
    -DarchetypeArtifactId=generic-portlet-archetype \
    -DarchetypeVersion=3.1.1 \
    -DgroupId=com.mycompany \
    -DartifactId=com.mycompany.my.generic.portlet
        

Archetypes are available in Maven Central here.