我正在尝试使用Ant创建一个liferay 7插件项目,我总是收到以下错误,有人可以帮忙吗?
服务器mirror.lax.liferay.com似乎已关闭
[Console output redirected to file:/Users/yjradeh/foo/java/workspace/.metadata/.plugins/com.liferay.ide.sdk.core/sdk.log]
Buildfile: /Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/portlets/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: /Users/yjradeh/.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 /Users/yjradeh/.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: /Users/yjradeh/.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
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/portlets/build.xml:5: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common-plugins.xml:5: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common.xml:57: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common-ivy.xml:130: The following error occurred while executing this line:
/Users/yjradeh/foo/java/liferay-plugins-sdk-7.0/build-common-ivy.xml:81: HTTP Authorization failure
Total time: 1 second
答案 0 :(得分:4)
我在尝试编译SDK时遇到了同样的问题,您可以尝试使用此网址:https://repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/。而不是旧的。 他们显然更改了Liferay的存储库,您可以在日期修改上查看它:https://repository.liferay.com/nexus/content/repositories/。
答案 1 :(得分:2)
Windows上liferay的步骤/先决条件:
ANT_HOME
,ANT_OPTS
,CATLINA_HOME
,JAVA_HOME
和JRE_HOME
,并在路径字段中相应地附加其路径。build.username.properties
复制该文件。例如,在我的情况下它将是build.Jennis.properties
,请记住您的PC /笔记本电脑用户名的情况。并在文件末尾添加以下代码行
app.server.dir=path_to_sdk../bundles/path_to_tomcat
in
build.username.porperties
。在我的情况下,附加的行将是
app.server.dir=C:\Users\Jennis\Documents\Downloads\com.liferay.portal.plugins.sdk-7.0/../bundles/tomcat-8.0.32
Eclipse →Help →Install New Software
。从浏览按钮找到liferay IDE存档。liferay →liferay7.x
配置它并给出tomcat8.0.32包的路径。localhost:8080
,使用默认值(非强制性)配置它,我们的示例默认值很好。Window →Appearance → Show Toolbar
中找到它。现在点击上面的图标,然后点击新的liferay插件项目!Ant(liferay-plugins-sdk)
。答案 2 :(得分:1)
我也遇到过这个问题。在我的情况下,解决方案是更改build.properties
(在插件SDK根目录中)中的常春藤设置,如下所示:
ivy.version=2.4.0
ivy.jar.url=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar
但我不熟悉Liferay在常春藤的PATCHET版本中所做的更改,因此可能会导致其他一些问题。但它显然适用于portlet。