我有一个相当大的GWT应用程序,我想尝试gwteventservice。为此,我从Maven Repository Page:
中获取了版本1.2.1的依赖关系<dependency>
<groupId>de.novanic.gwteventservice</groupId>
<artifactId>eventservice</artifactId>
<version>1.2.1</version>
</dependency>
将其添加到我的pom.xml
,更新Maven依赖项并对项目进行干净构建后,突然出现了一大堆编译错误。
我复制了&#34; Problems&#34;中的相关消息。 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)
有趣的是,这些只会出现在代码的客户端上。没有添加依赖项,我的应用程序编译得很好。
我的环境:
到目前为止我尝试的内容没有成功:
pom.xml
gwt-user.jar
添加到我的构建路径gwt-user
添加到我的pom.xml
pom.xml
中拥有所有内容)所以问题是:
如果没有其他帮助,我可能会调查gwt-comet
。
答案 0 :(得分:1)
gwteventservice
依赖于gwt 2.1.0,因为您可以看到here。我不认为你可以在GWT 2.6.0中使用它。
答案 1 :(得分:1)
尝试从事件服务传递继承的排除依赖项。
<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>
但是你需要为它们提供依赖关系(即使你不需要它们),而eventservice
会寻找它们。