服务构建器:构建失败
Service builder: BUILD FAILED
我在尝试制作 CRUD portlet 时遇到了 Service Builder 的问题。
首先,我创建了一个项目和 Liferay portlet("This is bla-bla-bla in view mode")。之后我创建了 new->new Service Builder
xml 文件。
我在那里插入了以下代码:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd">
<service-builder package-path="com.proliferay.sbuilder">
<author>Alexandr</author>
<namespace>crudportlet</namespace>
<entity name="Book" table="BOOK_PORTLET" local-service="true" remote-service="true">
<column name="bookId" type="long" primary="true" id-type="increment"/>
<column name="bookName" type="String" />
<column name="description" type="String" />
<column name="authorName" type="String" />
<column name="isbn" type="int" />
<column name="price" type="int" />
</entity>
接下来,我单击 overview
选项卡并按下 Build Service
按钮。 5 秒后我得到 HTTP Authorization failure
错误。 经过 5 小时 的谷歌搜索和 Whosebuging 我得出结论来评论这一行
#ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar
并粘贴这一行
ivy.jar.url=https://repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/
正如他们在 build.Sasha.properties
文件中的其他线程中所说的那样。但是我现在的错误是:
Unable to obtain resource from D:\LiferayWorkSpace\liferay-plugins-sdk- 6.2\.ivy\ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar: java.util.zip.ZipException: error in opening zip file
[taskdef] Unable to obtain resource from D:\LiferayWorkSpace\liferay-plugins-sdk-6.2\.ivy\ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar:
...
[taskdef] Could not load definitions from resource org/apache/ivy/ant/antlib.xml. It could not be found.
BUILD FAILED
我该怎么办??请帮我!我应该怎么做才能使用 Service Builder 创建最简单的 CRUD portlet?
我用的是Liferay 6.2 GA5, sdk 6.2.
我的 build.xml 文件:
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="CRUD-portlet" basedir="." default="deploy">
<import file="../build-common-portlet.xml" />
<property file="build.properties"/>
</project>
它似乎是一个损坏的 jar 文件。
希望您尝试删除有问题的 jar 文件并使用干净的下载重建?尝试从给定路径手动下载 jar org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar 并放入在各自的文件夹中并重建您的服务
哦哦,太简单了!
要解决这个问题我们应该
替换此行:
ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar
对此:
ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar
我在尝试制作 CRUD portlet 时遇到了 Service Builder 的问题。
首先,我创建了一个项目和 Liferay portlet("This is bla-bla-bla in view mode")。之后我创建了 new->new Service Builder
xml 文件。
我在那里插入了以下代码:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd">
<service-builder package-path="com.proliferay.sbuilder">
<author>Alexandr</author>
<namespace>crudportlet</namespace>
<entity name="Book" table="BOOK_PORTLET" local-service="true" remote-service="true">
<column name="bookId" type="long" primary="true" id-type="increment"/>
<column name="bookName" type="String" />
<column name="description" type="String" />
<column name="authorName" type="String" />
<column name="isbn" type="int" />
<column name="price" type="int" />
</entity>
接下来,我单击 overview
选项卡并按下 Build Service
按钮。 5 秒后我得到 HTTP Authorization failure
错误。 经过 5 小时 的谷歌搜索和 Whosebuging 我得出结论来评论这一行
#ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar
并粘贴这一行
ivy.jar.url=https://repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/
正如他们在 build.Sasha.properties
文件中的其他线程中所说的那样。但是我现在的错误是:
Unable to obtain resource from D:\LiferayWorkSpace\liferay-plugins-sdk- 6.2\.ivy\ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar: java.util.zip.ZipException: error in opening zip file
[taskdef] Unable to obtain resource from D:\LiferayWorkSpace\liferay-plugins-sdk-6.2\.ivy\ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar:
...
[taskdef] Could not load definitions from resource org/apache/ivy/ant/antlib.xml. It could not be found.
BUILD FAILED
我该怎么办??请帮我!我应该怎么做才能使用 Service Builder 创建最简单的 CRUD portlet?
我用的是Liferay 6.2 GA5, sdk 6.2.
我的 build.xml 文件:
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="CRUD-portlet" basedir="." default="deploy">
<import file="../build-common-portlet.xml" />
<property file="build.properties"/>
</project>
它似乎是一个损坏的 jar 文件。 希望您尝试删除有问题的 jar 文件并使用干净的下载重建?尝试从给定路径手动下载 jar org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar 并放入在各自的文件夹中并重建您的服务
哦哦,太简单了!
要解决这个问题我们应该
替换此行: ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar 对此:
ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar