How to Share Common JARs with Various Portlets in Liferay

Do the following steps to share common jars with various portlets in Liferay:

  1. Deposit your common jars at ${liferay folder}/${tomcat}/webapps/ROOT/WEB-INF/lib
  2. Locate your “liferay-plugin-package.properties” file in your portlet and add in the follow line:
    portal-dependency-jars=canon-commons.jar (in this case, canon-commons.jar is our common jar’s name)

    For multiple jars, add in “,” as its seperator:
    portal-dependency-jars=canon-commons.jar,commons-lang3-3.1.jar

 

2 thoughts on “How to Share Common JARs with Various Portlets in Liferay”

    1. Hi James, do you have some of the example of the complications that we might be looking at? And the “library names into them” is referring to?

Leave a Reply

Your email address will not be published. Required fields are marked *