1.按照上一篇文章的步骤create liferay portlet plugins project.
eclipse console 报错:
BUILD FAILED
.../liferay-plugins-sdk-6.2.0/layouttpl\build.xml:5: The following error occurred while executing this line:
.../liferay-plugins-sdk-6.2.0/liferay-plugins-sdk-6.2.0\build-common-plugins.xml:5: The following error occurred while executing this line:
.../liferay-plugins-sdk-6.2.0/liferay-plugins-sdk-6.2.0\build-common.xml:47: The following error occurred while executing this line:
.../liferay-plugins-sdk-6.2.0/liferay-plugins-sdk-6.2.0\build-common-ivy.xml:17: java.net.ConnectException: Connection timed out: connect
是一个连接超时的错误,估计是代理的问题。公司访问外网用的是代理,所以需要修改build-common-ivy.xml设置代理:
cd /usr/local/liferay-plugins-sdk-6.2
sudo vi build-common-ivy.xml
第61行下面添加代理:
<if>
<not>
<available file="${ivy.home}/ivy-${ivy.version}.jar" />
</not>
<then>
<mkdir dir="${ivy.home}" />
<setproxy proxyhost="172.26.100.238" proxyport="64000" proxyUser="steven_xu" proxyPassword="Newuser03"/>
<get
dest="${ivy.home}/ivy-${ivy.version}.jar"
src="${ivy.jar.url}"
/>
</then>
</if>