Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy third-party jar files in liferay?

I am using some third-party jar files in my liferay portal. These jar files will be used from multiple portlets in my portal.

I know that I can put my jar file inside my-portlet/WEB-INF/lib. But the problem here is it will accessible only inside that portlet. I want the jar file to be available to all portlets in my portal. How can i do this? Is there any global library where i can deploy my jar file and it can be accessed from anywhere?

Also, how to deploy this third-party jar file to production instance?

like image 563
Rajesh Pantula Avatar asked Feb 23 '23 01:02

Rajesh Pantula


1 Answers

You can do it by two ways (for Tomcat distribution):

  1. Manualy copy your *.jar to tomcat/lib/ext directory and restart Liferay
  2. Write Liferay extension and put *.jar files to docroot/WEB-INF/ext-lib/global and deploy it before Liferay start. It's more preferable way that independent from Web server.

Vim

like image 128
vim Avatar answered Mar 03 '23 14:03

vim