“HTTP授权失败”在Eclipse中构建Liferay portlet

时间:2016-06-09 07:26:50

标签: ant liferay spring-portlet-mvc

这是我的build.xml

<?xml version="1.0"?>
<!DOCTYPE project>

<project name="build-common-portlet">
    <import file="../build-common-plugin.xml" />
</project>

我在Eclipse中使用Liferay portlet。当我将build.xml作为Ant构建运行时,它会失败。

这是错误跟踪:

Buildfile: G:\softwares\lifeRay_CMS\plugin\liferay-plugins-sdk-6.2\portlets\Sample-portlet\build.xml
  [get] Getting: http://mirrors.lax.liferay.com/cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
  [get] To: C:\Users\user\.liferay\mirrors\cdn.repository.liferay.com\nexus\content\repositories\liferay-snapshots-ce\com\liferay\org.apache.ivy\2.4.0.LIFERAY-PATCHED-1-SNAPSHOT\org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
  [get] Error getting http://mirrors.lax.liferay.com/cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar to C:\Users\user\.liferay\mirrors\cdn.repository.liferay.com\nexus\content\repositories\liferay-snapshots-ce\com\liferay\org.apache.ivy\2.4.0.LIFERAY-PATCHED-1-SNAPSHOT\org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
  [get] Getting: http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
  [get] To: C:\Users\user\.liferay\mirrors\cdn.repository.liferay.com\nexus\content\repositories\liferay-snapshots-ce\com\liferay\org.apache.ivy\2.4.0.LIFERAY-PATCHED-1-SNAPSHOT\org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar

BUILD FAILED
G:\softwares\lifeRay_CMS\plugin\liferay-plugins-sdk-6.2\portlets\Sample-portlet\build.xml:5: The following error occurred while executing this line:
G:\softwares\lifeRay_CMS\plugin\liferay-plugins-sdk-6.2\portlets\build-common-portlet.xml:5: The following error occurred while executing this line:
G:\softwares\lifeRay_CMS\plugin\liferay-plugins-sdk-6.2\build-common-plugin.xml:5: The following error occurred while executing this line:
G:\softwares\lifeRay_CMS\plugin\liferay-plugins-sdk-6.2\build-common.xml:60: The following error occurred while executing this line:
G:\softwares\lifeRay_CMS\plugin\liferay-plugins-sdk-6.2\build-common-ivy.xml:130: The following error occurred while executing this line:
G:\softwares\lifeRay_CMS\plugin\liferay-plugins-sdk-6.2\build-common-ivy.xml:81: HTTP Authorization failure

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,您需要检查liferay_plugins / build.myUser.properties中的 build。[username] .properties 文件。

首先检查这是否指向正确的目录

app.server.parent.dir = ../liferay-portal-6.2-ce-ga6

然后改变这个:

ivy.version = 2.3.0  
ivy.jar.url =http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar

此链接很有用liferay 6.2 ivy problem