Many Jasig portlets are packaged as completely separate projects from uPortal. This packaging allows adopters to mix and match portlet versions, as well as ensures that we have clean separation and strong adherence to portlet APIs. Portlets distributed as separate projects may be included in the uPortal build via a maven overlay. This strategy ensures that even though you may be working with multiple Jasig projects, you can have one source code base capable of configuring and building all those projects, leading to more repeatable builds.
A maven overlay is a strategy for including a separately packaged project, potentially replacing certain files along the way. For example, we might want to update the project to use a particular database driver or modify a Spring configuration file. These overlay files can additionally make use of maven filtering to pick up information such as database or CAS configuration parameters from the main uPortal filter files.
More background information:
- Maven Overlays: http://maven.apache.org/plugins/maven-war-plugin/overlays.html
- Maven Filtering: http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
- uPortal Filter Configuration: Building & Deploying uPortal
Adding a New Portlet Overlay
Step 1: Define the portlet version property
Open the main (top-level) uPortal pom.xml file and add a new property representing the version for your new portlet. This property is often named something like PortletName.version. The value should be equal to the version of the external portlet project you'd like to add to uPortal.
<properties> . . . <CalendarPortlet.version>2.1.0</CalendarPortlet.version> . . . </properties>
Step 2: Add a new directory to uportal-portlet-overlays
Step 3: Add the new directory name to the modules list in uportal-portlet-overlays/pom.xml.
Step 4: Add the portlet to uportal-ear/pom.xml
Step 5: Redeploy the portal
Use "ant deploy-ear" to deploy all portlet overlays and test your new build.