4

みんな!3 つのモジュールに分割されている GWT アプリでコンパイルの問題が発生しています: App-core: エントリ ポイントのないメイン クラスを含む、App-A と App-B: App-core から継承し、そこに特定のクラスを含む各サブモジュールにエントリ ポイントがあります。

GIN を使用して、すべてのモジュールにクラス インスタンスを挿入しています。

アプリコア:

public interface App-coreGinjector extends Ginjector {
EventBus getEventBus();
Provider<LoginPagePresenter> getLoginPagePresenter();
...
}

App-coreModule extends AbstractPresenterModule {

protected void configureCore() {
    install(new DefaultModule(App-corePlaceManager.class));
    bindConstant().annotatedWith(DefaultPlace.class).to(LoginPagePresenter.NAME_TOKEN);
    ...
    bind(AuthenticationManager.class).to(AuthenticationManagerImpl.class);
    bindPresenter(LoginPagePresenter.class, LoginPagePresenter.MyView.class,
                  LoginPageView.class, LoginPagePresenter.MyProxy.class);
 }

App-A:

@GinModules({ App-AModule.class })
public interface App-AGinjector extends App-coreGinjector {

MyApp-AScreen getMyApp-AScreen();
...
}

public class App-AModule extends App-coreModule {

@Override
protected void configure() {

    configureCore();
            ...
            //Here we bind the App-A classes inheriting from App-core classes 
            bind(App-coreScreenManager.class).to(App-AcreenManager.class).in(Singleton.class);
            ...
            //Here we bind the specific App=A classes
    }

そして、App-B でも同じことを行います

Maven のコンパイルは App-A では成功しますが、App-B では失敗し、次のメッセージが表示されます。

[ERROR] Errors in 'C:\workspace\App-core\client\gin\App-coreGinjectorImpl.java'
[ERROR] Line 790:  Rebind result 'com.gwtplatform.mvp.client.proxy.PlaceManager' must be a class
[ERROR] Line 818:  Rebind result 'lu.sfeir.grh.client.authentication.AuthenticationManager' must   be a class
[ERROR] Line 1047:  Rebind result 'lu.sfeir.grh.client.login.LoginPagePresenter.MyView' must be a class
[ERROR] Line 2359:  Rebind result 'com.google.gwt.event.shared.EventBus' cannot be abstract
[ERROR] Cannot proceed due to previous errors

したがって、これらすべての奇妙な部分は、このエラーがこれら 2 つのサブモジュール間の共有モジュールから発生することです。魔女は LoginPagePresenter と AuthentificationManager のバインディングですが、このコンパイル エラーは 1 つのサブモジュールでのみ発生します。もし誰かがこの問題の王様を抱えていたら、私は彼の貴重な助けを待っています ^^

ああ!精度が必要な場合は、恥ずかしがらないでください!!

4

1 に答える 1

2

GWTP 0.7 では、すべての EventBus インスタンスが

    com.google.gwt.event.shared.EventBus;
    to 
    com.google.web.bindery.event.shared.EventBus

GWTP 0.6 を使用している場合は、元に戻す必要があります...

于 2012-07-11T09:33:00.983 に答える