简体   繁体   English

如何在liferay中部署第三方jar文件?

[英]How to deploy third-party jar files in liferay?

I am using some third-party jar files in my liferay portal. 我在liferay门户网站中使用了一些第三方jar文件。 These jar files will be used from multiple portlets in my portal. 这些jar文件将在我的门户网站中的多个portlet中使用。

I know that I can put my jar file inside my-portlet/WEB-INF/lib. 我知道我可以把我的jar文件放在my-portlet / WEB-INF / lib中。 But the problem here is it will accessible only inside that portlet. 但问题是它只能在该portlet中访问。 I want the jar file to be available to all portlets in my portal. 我希望jar文件可用于门户网站中的所有portlet。 How can i do this? 我怎样才能做到这一点? Is there any global library where i can deploy my jar file and it can be accessed from anywhere? 有没有可以部署我的jar文件的全局库,可以从任何地方访问它?

Also, how to deploy this third-party jar file to production instance? 另外,如何将此第三方jar文件部署到生产实例?

You can do it by two ways (for Tomcat distribution): 您可以通过两种方式完成此操作(对于Tomcat分发):

  1. Manualy copy your *.jar to tomcat/lib/ext directory and restart Liferay 手动将* .jar复制到tomcat / lib / ext目录并重新启动Liferay
  2. Write Liferay extension and put *.jar files to docroot/WEB-INF/ext-lib/global and deploy it before Liferay start. 编写Liferay扩展并将* .jar文件放到docroot / WEB-INF / ext-lib / global并在Liferay启动之前部署它。 It's more preferable way that independent from Web server. 独立于Web服务器的方式更为可取。

Vim VIM

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM