Share

Why restart required for deploying Ext plugins?

What happens during the deployment of Ext under hood. It's not same as what happens when other plugins deployed.Let's have a look.Before that please go thorough the Anatomy of Ext to get clear idea
The deploy process creates
  1. ext-impl.jar from the compiled code of ext-impl/src - if  you customize the impl classes
  2. ext-service.jar from the compiled code of ext-service/src - if you customize the service classes
  3. ext-util*.jar from the ext-util-* source folders - if you customize the tag library or utility
  4. Now the deployer starts to copy jars to Liferay's WEB-INF/lib
  5. Before that the first step is deploy portal-*.properties and systeam-*.properties files to Liferay's WEB-INF/classes
  6. At last not but least copies ext-web folder into the deployed liferay's folder
  7. Here i am not using ant for build process so the work done by deployer. If you are using ant you can use ant-deploy(war will be created then manually copy into Liferay deploy folder) and ant direct-deploy(Ext plugin is directly copy to the running Liferay instance and will restart).
Hope you understand why you need to restart the server.

Anatomy of an Ext plugin

The following table represents a Anatomy of Ext.This is a simple structure and purpose of the each directory



Directory
Purpose
xxx-ext/docroot/WEB-INF
All the folders that make up the plugin are in the WEB-INF folder
ext-impl
It contains all source and configuration files except those related to the web application. When an Ext plugin is created, several important files are placed in subdirectories. The most significant are as follows:
  • /src/portal-ext.properties – Used to override the values of the properties in portal.properties
  • /src/system-ext.properties – Used to override the values of the properties in system.properties
  • /src/content/Language-ext.properties – Used to add your own internationalized text messages that ship with liferay portal
ext-lib
Contains any extra dependency libraries
ext-service
Contains the classes that are generated by Liferay’s service builder
ext-util-bridges
Corresponds to the util-bridges folder in the Liferay source
ext-util-java
Corresponds to the util-java folder in the Liferay source
ext-util-taglib
Corresponds to the util-taglib folder in the Liferay source
ext-web
Contains your JSPs, HTML, images JavaScript, and all other web application related files in the subdirectory
  • To add entries to the web application configuration file,edit/docroot/WEB-INF/web.xml
  • To add a portlet,edit /docroot/WEB-INF/portlet-ext.xml, /docroot/WEB-INF/liferay-portlet-ext.xml and docroot/WEB-INF/liferay-display.xml
  • Customizing some of Liferay’s internal StrutsPortlets, the following files will also be of interest to you: docroot/WEB-INF/struts-config.xml and docroot/WEB-INF/tiles-defs.xml