一、热部署
在不停止应用的情况下,发布liferay的plugins。需要应用服务器本身支持(如weblogic。tomcat本身是不支持热部署的)。特别的:如果是采用liferay hook开发的话,热部署没效果。因为liferay的jsp hook覆盖是依赖于应用服务器:1.发布已经解压的portal war包。2.在运行时加载修改后的jsp页面。采用“生产”或者“领域”模式发布的应用是不支持热部署能力的。因为此时war包没有解压。
问题:才用hooks如何在必须使用未解压的war包的情况下覆盖jsp?
在构建过程中,注入一个前置过程,允许修改portal的war包,发布hooks文件。然后重新达成war包,并且使用应用服务器的发布工具进行发布。(具体操作后续等进行了hook开发再补充)
二、自动部署
用ant脚本进行构建。不进行具体描述。
ant做了哪些事情:
- Picks up a Liferay recognized archive (e.g.,
*-portlet.*
,*-theme.*
,*-web.*
,*.lpkg
) - Injects required libraries (e.g.,
util-java.jar
,util-taglib.jar
) - Injects dependent JAR files (specified in
liferay-plugins.properties
) - Injects required taglib descriptors (e.g.,
liferay-theme.tld
) - Injects required deployment descriptors (e.g., app server specific descriptors)
- Injects any missing Liferay specific deployment descriptors (e.g.,
liferay-portlet.xml
)