Building SDK Portlets

When using the Liferay Plugin SDK to build portlets, I’ve discovered that:

  1. Your portlet lib folder should contain only jars that are NOT in the Liferay portal ROOT lib folder.
  2. If your portlet needs access to jars already in Liferay, edit the WEB-INFliferay-plugin-package.properties file and add those jars to the portal-dependency.jars area.

During the build, those jars are temporarily copied to the porlet lib area and deleted afterwards.  During deployment, those jars are copied from Liferay’s lib folder to the deployed portlet lib folder.

Problem:  if you’ve already copied the jars yourself, Liferay won’t do the copy.  This could lead to version headaches and all kinds of strange Exception errors within Liferay.

2 Responses to "Building SDK Portlets"