如何使用 Liferay Tomcat 减少部署时间

发布于 2024-12-22 18:31:34 字数 678 浏览 3 评论 0原文

我使用 Liferay 6 并结合 Struts2。 我正在使用 Liferay Bundled Tomcat 7。 它工作正常。 我的问题是,每当资源(portlet.xml 或 java 文件)发生更改并且单击 build.xml 时,部署就会花费大量时间。 请告诉我如何减少部署时间

INFO: Server startup in 60602 ms
14:04:00,328 INFO [AutoDeployDir:167] Processing HelloStruts2-portlet-6.0.6.1.war
14:04:00,375 INFO [PortletAutoDeployListener:71] Copying portlets for E:\liferaytomcat\liferay-portal-6.1.0-ce-b4\deploy\HelloStruts2-portlet-6.0.6.1.war
14:04:00,484 INFO [PortletAutoDeployListener:81] Portlets for E:\liferaytomcat\liferay-portal-6.1.0-ce-b4\deploy\HelloStruts2-portlet-6.0.6.1.war copied successfully. Deployment will start in a few seconds.

服务器在这一行之后花费了很多时间

I am using Liferay 6 with the combination of Struts2.
I am using Liferay Bundled Tomcat 7.
Its working fine .
My question , whenever a change in the resource (portlet.xml or a java file ) and when i click the build.xml , the deployment takes a lot of time .
Please tell me how to decrease deployment time

INFO: Server startup in 60602 ms
14:04:00,328 INFO [AutoDeployDir:167] Processing HelloStruts2-portlet-6.0.6.1.war
14:04:00,375 INFO [PortletAutoDeployListener:71] Copying portlets for E:\liferaytomcat\liferay-portal-6.1.0-ce-b4\deploy\HelloStruts2-portlet-6.0.6.1.war
14:04:00,484 INFO [PortletAutoDeployListener:81] Portlets for E:\liferaytomcat\liferay-portal-6.1.0-ce-b4\deploy\HelloStruts2-portlet-6.0.6.1.war copied successfully. Deployment will start in a few seconds.

The server takes a lot of time after this line

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

轻拂→两袖风尘 2024-12-29 18:31:34

在最新版本中,JRebel 包含了一些 Liferay 特定的集成,因此它现在工作得更加流畅
http://www.liferay.com/community/projects/jrebel/overview

In the latest versions JRebel included some Liferay-specific integrations so it works now even smoother
http://www.liferay.com/community/projects/jrebel/overview

澉约 2024-12-29 18:31:34

除了实际重新部署应用程序之外,没有其他方法可以将 portlet.xml、liferay-portlet.xml 和其他部署描述符中的更改传播到门户中(正如您所描述的,这需要相当长的时间)。

然而,使用 JSP 有一些可能性可以做到这一点 - 设置开发人员属性,并且更改在重新加载后立即可见。

还有一个名为 jRebel 的工具,可以对 java 类和框架配置执行相同的操作。与 spring 和 spring mvc 无缝协作。 Struts 也列在受支持的框架中,因此它也应该可以工作。正确设置后,场景如下:

更改java文件
ctrl + s 保存并编译文件(你的IDE必须支持此功能)
重新加载浏览器(jrebel 自动获取类文件中的更改并立即重新加载它们)。

不幸的是 jRebel 不是免费的。

如果您有大量 portlet,那么将它们拆分为更多 Web 应用程序可能会有所帮助。这通常会减少重新部署所需的时间。

希望有帮助..

There is no other way to propagate changes in portlet.xml, liferay-portlet.xml and other deployment descriptors into the portal than to actually redeploy the application (as you described this takes quite long).

However, there are some possibilities to do that with JSPs - set the developer properties and the changes are visible immediately after reload.

There is also a tool called jRebel that can do the same for java classes and framework configuration. Works seamlessly with spring and spring mvc. Struts is listed in supported frameworks as well so it should work too. After proper set up the scenario is as follows:

change the java file
ctrl + s to save and compile file (your IDE must support this)
reload the browser (jrebel automaticaly pick ups changes in class files and reloads them immediately).

Unfortunately jRebel is not free.

If you have large number of portlets then splitting them into more web applications might help. This usually reduces time needed for redeploy.

Hope it helps..

峩卟喜欢 2024-12-29 18:31:34

删除您的应用程序未使用的过滤器。在门户属性中初始化了超过 25 个过滤器。

Remove the filters not used by your application. There are more than 25 filters initialized in portal-properties.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文