PVBRaju
PVBRaju

Reputation: 95

How to use a global-portlet in liferay?

I am new to liferay ,I got one doubt ,if we want to use a global level service layer we need to place the specific portlet xxxxservice.jar file into lib/ext from webapps/portletname/lib folder. But is there any solution automatically place the jar file into lib/ext folder while deploying it self?

Upvotes: 0

Views: 108

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48057

There's no automatism, but if you need the services of one plugin (A) within another plugin (B), you can declare in B's WEB-INF/liferay-plugin-package.properties the following property:

required-deployment-contexts=A

This will only deploy B when A has already been deployed. Further, it will copy A/WEB-INF/lib/A-service.jar into B/WEB-INF/lib/ upon deployment of A. Thus the library will be available, but it will not be on the global classpath. Note that changes to the global classpath (assuming you use tomcat) would require a restart of the appserver.

Upvotes: 1

Related Questions