How to reduce deployment time with Liferay Tomcat

I am using Liferay 6 with a combination of Struts2. I use Liferay Bundled Tomcat 7. His work is beautiful. My question is, whenever a resource change (portlet.xml or java file), and when I click on build.xml, the deployment takes a lot of time. Please tell me how to reduce 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 long time after this line

+4
source share
3 answers

In recent versions, JRebel has included some specialized Liferay integrations, so now it works even more smoothly http://www.liferay.com/community/projects/jrebel/overview

+3
source

There is no other way to propagate changes to portlet.xml, liferay-portlet.xml and other deployment descriptors in the portal than to actually relocate the application (as you described it takes a lot of time).

However, there are some possibilities to do this with JSP - set developer properties, and the changes will be visible immediately after reboot.

There is also a jRebel tool that can do the same for Java classes and wireframe configurations. It works without problems with spring and spring mvc. Struts is listed in a supported framework, so it should work too. After properly configured, the script looks like this:

change java ctrl + s file to save and compile the file (your environment should support this) reload the browser (jrebel automatically deletes changes in class files and reloads them immediately).

Unfortunately, jRebel is not free.

If you have a large number of portlets, then dividing them into more web applications can help. This usually reduces the time required to redeploy.

Hope this helps.

+1
source

Remove filters not used by your application. The portal has more than 25 filters.

+1
source

Source: https://habr.com/ru/post/1387877/


All Articles