留言板

Why portal-ext.properties is copied to webapps/xxx-ext/WEB-INF/ext-web/...

xun ren,修改在12 年前。

Why portal-ext.properties is copied to webapps/xxx-ext/WEB-INF/ext-web/...

Junior Member 帖子: 81 加入日期: 08-4-1 最近的帖子
Hi all,
I am developping under Liferay 6.0.6 CE. I want to override some properties of liferay, so I put my portal-ext.properties in the folder ext/my-ext/docroot/WEB-INF/ext-impl/src.
When I deployed my ext and restart my tomcat server. It is not taken into consideration.
Then I found that the file portal-ext.properties is copied to webapps/xxx-ext/WEB-INF/ext-web/docroot/WEB-INF/classes instead of webapps/ROOT/WEB-INF/classes

Did I make any mistake? If not how can I override liferay's defaut properties correctly in Liferay 6? Thanks a lot.
thumbnail
Mika Koivisto,修改在12 年前。

RE: Why portal-ext.properties is copied to webapps/xxx-ext/WEB-INF/ext-web/

Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
That is correct. It's packaged within the ext plugin. Now if you tried to redeploy the plugin that doesn't work. Try running ant direct-deploy when you are developing the plugin. That will automatically copy everything to it's right place as if you had just done a hot deploy.
xun ren,修改在12 年前。

RE: Why portal-ext.properties is copied to webapps/xxx-ext/WEB-INF/ext-web/

Junior Member 帖子: 81 加入日期: 08-4-1 最近的帖子
Thanks Mika, I got it. I noticed that in the build.xml, the direct-deploy will copy directly the files to the right place.

For the others, if you want, I made a little ant task to copy the properties files after the hot deploy which you can put in the build file of your own ext.

In this case, it will call "deploy" first then it will copy the properties under ext-impl/src to the correct place of your server.


<project name="cibox-ext" basedir="." default="deploy-ext">
	<import file="../build-common-ext.xml" />
	
	<target name="deploy-ext" depends="deploy">
		<antcall target="deploy-properties" />
	</target>
</project>