Deploying a Portlet Application

New Java portlets are available in Portlet Applications: packaged .war files that deploy to their own web context and include one or more portlets.  Before you can publish a portlet contained within a new portlet application, you must deploy it.  There are two common ways to do that.

Deploy Using deployPortletApp

You can deploy a portlet using an Ant task.  Run the following command from your uPortal source directory (add your portlet war path file)

ant deployPortletApp -DportletApp=/path/to/yourProject.war

Bundling a Portlet

The other common approach is called Bundling:  use a Maven sub-project (typically in uportal-portlets-overlay) to include your portlet application in the uportal-ear artifact so it will be deployed automatically whenever the deploy-ear target executes.  The bundled portlet is typically a Maven Overlay project and should use the maven-pluto-plugin.  (Portlet applications deployed with deployPortletApp must not use this plugin.)  Remember to reference your sub-project both in uportal-portlets-overlay/pom.xml and in uportal-ear/pom.xml.