3

私は一日中実行するのに苦労してきましたGWTP。基本的に、Eclipseプラグインを使用してgwtアプリケーションをMaven作成しました。GWTPそして、簡単なウェルカムプレゼンターを追加しました。Mavenなしで試してみましたが、Eclipseからの実行でうまく機能します。

ただし、Mavenプロジェクトに変換すると(m2eclipseプラグインを使用しています)、すべてが壊れます。そこで、必要な依存関係とgwtp依存関係を追加しました。

<dependency>
    <groupId>com.google.gwt.inject</groupId>
    <artifactId>gin</artifactId>
    <version>1.5.0</version>
</dependency>

 <!-- MVP component -->
<dependency>
    <groupId>com.gwtplatform</groupId>
    <artifactId>gwtp-all</artifactId>
    <version>${gwtp.version}</version>
</dependency>   

ただし、実行しようとすると、次のエラーが発生します。

Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.google.gwt.event.shared.EventBus' (did you forget to inherit a required module?)

MavenでGWTPを作成するのが非常に難しい理由についてのアイデア。

4

1 に答える 1

3

gwt-user 依存関係が欠落している可能性があると思います。GWTP プロジェクト用の私の maven pom.xml は次のとおりです。

<properties>
    <gwtVersion>2.4.0</gwtVersion>
    <gwtp.version>0.7</gwtp.version>
</properties>
<dependencies>
    <dependency>
       <groupId>com.google.gwt</groupId>
   <artifactId>gwt-user</artifactId>
   <version>${gwtVersion}</version>
   <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.gwtplatform</groupId>
    <artifactId>gwtp-mvp-client</artifactId>
    <version>${gwtp.version}</version>
    <scope>provided</scope>
</dependency>
<!-- Dispatch component -->
<dependency>
    <groupId>com.gwtplatform</groupId>
    <artifactId>gwtp-dispatch-client</artifactId>
    <version>${gwtp.version}</version>
    <scope>provided</scope> <!-- Remove for GWTP 0.5.1 and earlier -->
</dependency>
<!-- Tester component -->
<dependency>
    <groupId>com.gwtplatform</groupId>
    <artifactId>gwtp-tester</artifactId>
    <version>${gwtp.version}</version>
    <scope>test</scope>
</dependency>

最新の gwtp 0.7 を使用する場合は、廃止されたクラスから に切り替わったことに注意してcom.google.gwt.event.sharedくださいcom.google.web.bindery.event.shared

詳しくはこちらをご覧ください。

于 2012-02-22T18:14:14.943 に答える