2013-12-09 56 views
1

我有这个问题,我无法修复。我有一个ext-plugin,它覆盖了我的portal-ext.rpoperties文件(我不希望这个覆盖)与另一个空白portal-ext文件。我的ext-plugin中没有portal-ext.properties文件,但每次部署时都会发生这种情况。如何停止覆盖portal-ext文件?

任何形式的帮助,将不胜感激。

谢谢。

+0

你在日志中门户网站开始是YOUT门户-EXT看到的是加载? –

+0

在您的ext中创建portal-ext文件并粘贴您的ext设置there.hope您的问题将得到解决 –

+0

EXT的portal-ext.properties必须总是覆盖Portal的portal-ext.properties属性。因此,如果您创建了plugin-ext,则必须在其中添加portal-ext.properties文件,否则它将继续使用空文件进行覆盖。 –

回答

4

这是我从Liferay支持部门获得的回复,它解决了我的问题。我在这里分享,所以对任何其他人都有帮助。


“哪里portal-ext.properties文件位于系统?

在WEB-INF/classes中或在$ {} liferay.home /portal-ext.properties?”

如果是在WEB-INF/classes中,只需将portal-ext.properties进入$ {} liferay.home /portal-ext.properties位置。如果相同,您可以将您的portal-ext.properties放入您的EXT插件中,这样原件将被复制到系统中而不是空的。

您还可以添加包括和重写的线路中的空portal-ext.properties和重命名原始文件被加载portal-ext.properties后,也可以使用不同的属性文件,并指定它给JVM加载。从portal.properties文件请参阅相关的部分:

属性覆盖

# 
# Specify where to get the overridden properties. Updates should not be made 
# on portal.properties or on portal-bundle.properties, but in 
# portal-ext.properties. 
# 
# The default read order is: portal.properties, portal-bundle.properties, 
# portal-ext.properties, and then portal-setup-wizard.properties. 
# 
include-and-override=portal-bundle.properties 
include-and-override=${liferay.home}/portal-bundle.properties 
include-and-override=portal-ext.properties 
include-and-override=${liferay.home}/portal-ext.properties 
include-and-override=portal-setup-wizard.properties 
include-and-override=${liferay.home}/portal-setup-wizard.properties 

# 
# Each portal instance can have its own overriden property file following 
# the convention portal-companyWebId.properties. To enable this feature, set 
# the "company-id-properties" system property to true. 
# 
# To enable: 
# 
#  java ... -Dcompany-id-properties=true 
# 
# The read order will now be: portal.properties, then portal-ext.properties, 
# and then portal-liferay.com.properties. 
# 
# Note that not all properties can have different values per company. This 
# functionality is only available for legacy reasons. The preferred way to 
# configure a portal instance is through the Control Panel. 
# 
include-and-override=portal-${easyconf:companyId}.properties 
include-and-override=${liferay.home}/portal-${easyconf:companyId}.properties 

# 
# Additional property files can be used by setting the "external-properties" 
# system property. 
# 
# A common use case is to keep legacy property values when upgrading to 
# newer versions of Liferay. To enable: 
# 
#  java ... -Dexternal-properties=portal-legacy-5.1.properties 
# 
# The read order will now be: portal.properties, then portal-ext.properties, 
# and then portal-legacy-5.1.properties. 
# 
include-and-override=${external-properties} 
include-and-override=${liferay.home}/${external-properties}