У меня довольно большое приложение GWT, и я хотел попробовать gwteventservice. Для этого я взял зависимость версии 1.2.1 от Maven Repository Page:Добавление gwteventservice в качестве проекта зависимости зависимости Maven project
<dependency>
<groupId>de.novanic.gwteventservice</groupId>
<artifactId>eventservice</artifactId>
<version>1.2.1</version>
</dependency>
После добавления его к моим pom.xml
, обновлению зависимостей Maven и делать очистку сборки моего проекта, целую кучу ошибок компилятора неожиданно появился.
Я скопировал соответствующие сообщения на вкладке «Проблемы» в Затмении (каждая строка является отдельной записью):
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)
Интересно, что они появляются только на стороне клиента кода. И без добавленной зависимости мое приложение отлично компилируется.
Моя среда:
- Java 1.7.0_55
- GWT 2.6.0
- Maven 3.3.1
То, что я пытался до сих пор без особого успеха:
- Использование более ранней версии (1.2.0) из gwteventservice в моем
pom.xml
- Затмения предложил Quick-Fix, чтобы добавить
gwt-user.jar
на мой путь сборки - Добавление зависимости
gwt-user
к моемуpom.xml
- Добавление соответствующих внешних банки непосредственно мой путь сборки (это единственное, что работает, но я действительно не нравится это решение ... Я предпочел бы все в моей
pom.xml
)
Так что вопрос:
- Почему добавив зависимость разорвать мой проект и
- как я могу это исправить?
Если ничего другого не помогает, я могу вместо этого взглянуть на gwt-comet
.
Я бы проверял, не повлияло ли 'eventervice' на вашу зависимость от GWT. Возможно, вы создаете снова 2.1.0, который находится в списке зависимостей службы событий. Является ли ваш проект проектом Eclipse проектом Maven? – Lukino
Да, это проект maven. И то, что вы и @Guillaume Rebesche отметили, похоже на фактическую причину проблемы. – QBrute