2014-01-15 49 views
0

我嘗試使用Liferay-IDE 2.0創建新的Lifreay-Plugin項目。但我得到常春藤網絡問題。我認爲有必要爲艾維配置代理,但我不知道該在哪裏做。帶有Ivy的Liferay IDE的代理配置

這裏的例外:

[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的行爲是很好。

回答

6

將代理定義放到Liferay-SDK/build-common-ivy.xml中

例如,有:

<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>