我尝试使用Liferay-IDE 2.0创建新的Lifreay-Plugin项目。但我得到常春藤网络问题。我认为有必要为Ivy配置代理,但我不知道在哪里这样做。
这里是例外:
[Console output redirected to file:D:\Liferays\6.2.CE-RC5\workspace\.metadata\.plugins\com.liferay.ide.sdk.core\sdk.log]
Buildfile: D:\Liferays\6.2.CE-RC5\liferay-plugins-sdk-6.2.0\themes\build.xml
[get] Getting: http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar
[get] To: D:\Liferays\6.2.CE-RC5\liferay-plugins-sdk-6.2.0\.ivy\ivy-2.3.0.jar
[get] Error getting http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar to D:\Liferays\6.2.CE-RC5\liferay-plugins-sdk-6.2.0\.ivy\ivy-2.3.0.jar
BUILD FAILED
D:\Liferays\6.2.CE-RC5\liferay-plugins-sdk-6.2.0\themes\build.xml:5: The following error occurred while executing this line:
D:\Liferays\6.2.CE-RC5\liferay-plugins-sdk-6.2.0\build-common-plugins.xml:5: The following error occurred while executing this line:
D:\Liferays\6.2.CE-RC5\liferay-plugins-sdk-6.2.0\build-common.xml:47: The following error occurred while executing this line:
D:\Liferays\6.2.CE-RC5\liferay-plugins-sdk-6.2.0\build-common-ivy.xml:17: java.net.UnknownHostException: repo1.maven.org
对于maven,行为很好。
答案 0 :(得分:6)
将代理定义放到Liferay-SDK / build-common-ivy.xml
e.g。有:
<if>
<not>
<available file="${ivy.home}/ivy-${ivy.version}.jar" />
</not>
<then>
<mkdir dir="${ivy.home}" />
<setproxy proxyhost="PROXY_SERVER_XX.XX..." proxyport="e.g.8080" proxyUser="USER-if-not-annonym" proxyPassword="USER-password-if-necessary"/>
<get
dest="${ivy.home}"
src="${ivy.jar.url}"
/>
</then>
</if>