Liferay ant部署失败

时间:2014-08-19 07:37:00

标签: deployment build liferay

我正在尝试为Liferay部署我的第一个“hello-world”-portlet 但在部署时我得到了“建立失败”。

我的文件夹如下所示:

D:\[Code Home]\bundles\liferay-portal-6.2-ce-ga2

and 

D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets

我的构建。[用户名] .properties文件包含:

app.server.portal.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\tomcat-    7.0.42\\webapps\\ROOT
app.server.lib.global.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\lib\\ext
app.server.deploy.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\tomcat-7.0.42\\webapps
app.server.type = tomcat
app.server.dir = D:\\[Code Home]\\bundles\\liferay-portal-6.2-ce-ga2\\tomcat-7.0.42

部署portlet时,我得到了这个:

D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets>ant deploy
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; sup
port was removed in 8.0
Buildfile: D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets\build.xml


deploy:

BUILD FAILED
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common-plugins.xml:57: The
following error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:1387: The follow
ing error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:1392: The follow
ing error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:235: The followi
ng error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:993: The followi
ng error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:299: The followi
ng error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:1766: The follow
ing error occurred while executing this line:
D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\build-common.xml:175: D:\[Code Ho
me]\bundles\liferay-portal-6.2-ce-ga2\lib\ext does not exist.

Total time: 0 seconds

D:\[Code Home]\plugins\liferay-plugins-sdk-6.2\portlets>

知道问题出在哪里?

2 个答案:

答案 0 :(得分:0)

似乎您缺少auto.deploy.dir值。 这是我的build.properties值。

app.server.type=tomcat
app.server.parent.dir=/home/maleen/workspace/liferay

app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.40
app.server.tomcat.deploy.dir=${app.server.tomcat.dir}/webapps
app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/lib/ext
app.server.tomcat.portal.dir=${app.server.tomcat.dir}/webapps/ROOT

auto.deploy.dir=${app.server.parent.dir}/deploy

希望这有帮助。

答案 1 :(得分:0)

错误消息显示

D:\[Code Home]\bundles\liferay-portal-6.2-ce-ga2\lib\ext does not exist.
是吗?如果不是:您需要创建它(例如,在该位置解压缩包)或配置您的构建。用户名 .properties - 这是什么?

查看build.properties - 您会在其中找到许多值。就像Liferay中的其他属性文件一样,您应该确定要从默认值更改的值,创建名为build的文件。 username .properties(替换为您的实际用户名)并覆盖该值你想改变 - 例如app.server.parent.dir是指向解压缩包的好人选。

请注意,Liferay尚未正式支持Java8:这是一个在许多现有应用服务器上运行的门户,在采用新环境时速度稍慢。这并不是说它不起作用 - 只有当你遇到与Java8相关的问题时,你可能想尝试Java7,并且采用新功能的速度很慢,这样你就可以轻松地向后移植。