How to integrate dagger2 in GWT application?
<p>I am trying to add dagger2 in my gwt application to have DI. So far I have followed following steps</p>

<p>1) Added following dependencies in <code>pom.xml</code></p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;com.google.dagger&lt;/groupId&gt;
        &lt;artifactId&gt;dagger-gwt&lt;/artifactId&gt;
        &lt;version&gt;2.4&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;dependency&gt;
        &lt;groupId&gt;com.google.dagger&lt;/groupId&gt;
        &lt;artifactId&gt;dagger-compiler&lt;/artifactId&gt;
        &lt;version&gt;2.4&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;dependency&gt;
        &lt;groupId&gt;com.google.auto.factory&lt;/groupId&gt;
        &lt;artifactId&gt;auto-factory&lt;/artifactId&gt;
        &lt;version&gt;1.0-beta3&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>

<p>2) Inherits dagger dependency in gwt module <code>MyApp.gwt.xml</code> by adding following line of code.</p>

<pre><code>&lt;inherits name="dagger.Dagger" /&gt;
</code></pre>

<p>3) Created Component Class.</p>

<pre><code>import javax.inject.Singleton;
import com.google.gwt.event.shared.EventBus;
import dagger.Component;

@Singleton
@Component(modules = AppModule.class)
public interface AppComponent {

    EventBus eventBus();
}
</code></pre>

<p>4) Created Module class  </p>

<pre><code>import javax.inject.Singleton;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;

import dagger.Module;
import dagger.Provides;

@Module
public class AppModule {

    @Provides
    @Singleton
    SimpleEventBus provideSimpleEventBus() {
        return new SimpleEventBus();
    }

    @Provides
    EventBus provideEventBus(SimpleEventBus bus) {
        return bus;
    }
}
</code></pre>

<p>Finally, when I am trying to build module in <code>AppEntryPoint</code></p>

<pre><code>AppComponent component = DaggerAppComponent.builder()....build();
</code></pre>

<p>I can't find generated class <code>DaggerAppComponent</code> anywhere after <code>mvn compile</code> or <code>mvn gwt:compile</code>. I am using <code>gwt-maven-plugin</code> from <code>org.codehaus.mojo</code>. Its clear I am missing something in configuration but can't figure out what exactly.  </p>