[英]Adding gwteventservice as Maven dependency breaks project
I have a rather big GWT Application and I wanted to try out gwteventservice. 我有一个相当大的GWT应用程序,我想尝试gwteventservice。 For this, I took the dependency of version 1.2.1 from the Maven Repository Page :
为此,我从Maven存储库页面获取了1.2.1版的依赖项:
<dependency>
<groupId>de.novanic.gwteventservice</groupId>
<artifactId>eventservice</artifactId>
<version>1.2.1</version>
</dependency>
After adding it to my pom.xml
, updating the Maven dependencies and doing a clean-build of my project, a whole bunch of compiler errors suddenly appeared. 将其添加到我的
pom.xml
,更新了Maven依赖关系并完成了项目的全新构建后,突然出现了许多编译器错误。
I copied the relevant messages from the "Problems" tab in Eclipse (each line is a seperate entry): 我从Eclipse的“问题”选项卡中复制了相关消息(每行是一个单独的条目):
The method setCellStyleNames(String) is undefined for the type Column<T,capture#5-of ?>
The constructor SimplePager(SimplePager.TextLocation, boolean, int, boolean) is undefined
com.google.gwt.cell.client.Cell.Context cannot be resolved to a type
com.google.gwt.cell.client.Cell.Context cannot be resolved to a type
The method getSafeUri() is undefined for the type ImageResource GameSearchTable.java
The method getSafeUri() is undefined for the type ImageResource GameSearchTable.java
The method getSafeUri() is undefined for the type ImageResource GameSearchTable.java
The method getSafeUri() is undefined for the type ImageResource GameSearchTable.java
The method getSafeUri() is undefined for the type ImageResource GameSearchTable.java
The method setSortable(boolean) is undefined for the type GameSearchTable.RatingColumn
The method setSortable(boolean) is undefined for the type GameSearchTable.StatusColumn
The method setSortable(boolean) is undefined for the type TextColumn<GameDTO>
The method setSortable(boolean) is undefined for the type TextColumn<GameDTO>
The type GameSearchTable.RatingCell must implement the inherited abstract method AbstractCell<GameDTO>.render(GameDTO, Object, SafeHtmlBuilder)
The type GameSearchTable.StatusCell must implement the inherited abstract method AbstractCell<GameDTO>.render(GameDTO, Object, SafeHtmlBuilder)
com.google.gwt.cell.client.Cell.Context cannot be resolved to a type
com.google.gwt.cell.client.Cell.Context cannot be resolved to a type
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method setSortable(boolean) is undefined for the type GameTable.RatingColumn
The method setSortable(boolean) is undefined for the type GameTable.StatusColumn
The method setSortable(boolean) is undefined for the type TextColumn<GameDTO>
The type GameTable.RatingCell must implement the inherited abstract method AbstractCell<GameDTO>.render(GameDTO, Object, SafeHtmlBuilder)
The type GameTable.StatusCell must implement the inherited abstract method AbstractCell<GameDTO>.render(GameDTO, Object, SafeHtmlBuilder)
The constructor ActivityManager(ActivityMapper, EventBus) is undefined
The method register(com.google.gwt.place.shared.PlaceController, com.google.gwt.event.shared.EventBus, com.google.gwt.place.shared.Place) in the type PlaceHistoryHandler is not applicable for the arguments (com.google.gwt.place.shared.PlaceController, com.google.web.bindery.event.shared.EventBus, com.google.gwt.place.shared.Place)
The constructor PlaceController(EventBus) is undefined
com.google.gwt.cell.client.Cell.Context cannot be resolved to a type
com.google.gwt.cell.client.Cell.Context cannot be resolved to a type
com.google.gwt.cell.client.Cell.Context cannot be resolved to a type
Context cannot be resolved to a type
Context cannot be resolved to a type
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method getSafeUri() is undefined for the type ImageResource
The method setSortable(boolean) is undefined for the type PlatformTable.ProgressBarColumn
The method setSortable(boolean) is undefined for the type PlatformTable.RatingColumn
The method setSortable(boolean) is undefined for the type PlatformTable.StatusColumn
The method setSortable(boolean) is undefined for the type TextColumn<PlatformDTO>
The type PlatformTable.ProgressBarCell must implement the inherited abstract method AbstractCell<PlatformDTO>.render(PlatformDTO, Object, SafeHtmlBuilder)
The type PlatformTable.RatingCell must implement the inherited abstract method AbstractCell<PlatformDTO>.render(PlatformDTO, Object, SafeHtmlBuilder)
The type PlatformTable.StatusCell must implement the inherited abstract method AbstractCell<PlatformDTO>.render(PlatformDTO, Object, SafeHtmlBuilder)
The method setWidget(int, int, Widget) in the type HTMLTable is not applicable for the arguments (int, int, IsWidget)
The method setWidget(int, int, Widget) in the type HTMLTable is not applicable for the arguments (int, int, IsWidget)
Interestingly enough, these only show up on the client-side of the code. 有趣的是,这些仅显示在代码的客户端 。 And without the added dependency my application compiles fine.
在没有添加依赖的情况下,我的应用程序可以正常编译。
My environment: 我的环境:
What I tried so far without success: 到目前为止我没有成功尝试过的东西:
pom.xml
pom.xml
中使用gwteventservice的早期版本(1.2.0) gwt-user.jar
to my build path gwt-user.jar
添加到我的构建路径中 gwt-user
to my pom.xml
gwt-user
添加到我的pom.xml
pom.xml
) pom.xml
) So the question is: 所以问题是:
If nothing else helps, I might look into gwt-comet
instead. 如果没有其他帮助,我可能会改用
gwt-comet
。
Try exclude dependency transitively inherited from event service. 尝试排除从事件服务中继承而来的依赖关系。
<dependencies>
....
<dependency>
<groupId>de.novanic.gwteventservice</groupId>
<artifactId>eventservice</artifactId>
<version>1.2.1</version>
<exclusions>
<exclusion>
<artifactId>gwt-servlet</artifactId>
<groupId>com.google.gwt</groupId>
</exclusion>
<exclusion>
<artifactId>gwt-user</artifactId>
<groupId>com.google.gwt</groupId>
</exclusion>
</exclusion>
</dependency>
<dependency>
<artifactId>gwt-user</artifactId>
<groupId>com.google.gwt</groupId>
<version>2.6.0</version>
</dependency>
<dependency>
<artifactId>gwt-servlet</artifactId>
<groupId>com.google.gwt</groupId>
<version>2.6.0</version>
</dependency>
....
</dependencies>
But you need to provide dependencies for both of them (even if you don't need them), while eventservice
will look for them. 但是您需要为它们两者提供依赖关系(即使您不需要它们),而
eventservice
会寻找它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.