Nov 08
28
When using the Liferay Plugin SDK to build portlets, I’ve discovered that:
- Your portlet lib folder should contain only jars that are NOT in the Liferay portal ROOT lib folder.
- 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.
Thanks for the tip. I would include a concrete example:
portal-dependency-jars=\
jstl.jar,\
jstl-impl.jar
Jabba – thanks for providing the example. I’m sure other developers will find this helpful.
Regards,
Jeff Robinson