I need some utility classes that will be common for three different Liferay portlets so I will develop them in one project that should be shared for my portlets.
I am using Eclipse with Liferay IDE plugin and my question is what kind of project is that one that I need?
I mean is it a simple Java project or any kind of Liferay project?
There are ways you can do this:
../tomcat-7.0.27/lib/ext/
.service
package so that the utility classes go in the [name-of-your-project]-service.jar
. And then in the portletswhich would need these classes specify the property
required-deployment-contexts=[name-of-your-project]in
liferay-plugin-package.properties` of each of the portlet.service
package so that the utility classes go in the [name-of-your-project]-service.jar
and then put the [name-of-your-project]-service.jar
in the global class-path and remove it from the WEB-INF/lib
of your portlet project so that it does not conflict.Hooks
since it is in the global classpathSo here I have listed pros & cons for you to decide for yourself. I would love to know if there are more ways (& much cleaner) to do this in liferay from experts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With