title: GWT 2.5.0 mvn install error "Rebind result <class> must be a class"
body: <p><strong>Problem</strong>: I run <code>mvn install</code> on my GWT 2.5.0 project that I built with the <a href="http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html" rel="nofollow">gwt-maven-plugin</a> and get the error <code>Rebind result 'c3gw.fwk.gui.client.ClientFactory' must be a class</code>.</p>
  
  <p>This is a snippet of my pom.xml:</p>
  
  <pre><code>  &lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.5.0&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
           &lt;goals&gt;
               &lt;goal&gt;compile&lt;/goal&gt;
               &lt;goal&gt;test&lt;/goal&gt;
               &lt;goal&gt;i18n&lt;/goal&gt;
               &lt;goal&gt;resources&lt;/goal&gt;
               &lt;goal&gt;generateAsync&lt;/goal&gt;
           &lt;/goals&gt;
        &lt;/execution&gt;
       &lt;/executions&gt;
       &lt;configuration&gt;
         &lt;runTarget&gt;C3gwGui.html&lt;/runTarget&gt;
         &lt;hostedWebapp&gt;${webappDirectory}&lt;/hostedWebapp&gt;
         &lt;i18nMessagesBundle&gt;c3gw.fwk.gui.client.Messages&lt;/i18nMessagesBundle&gt;
       &lt;/configuration&gt;
    &lt;/plugin&gt;
  
    &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.1.1&lt;/version&gt;
        &lt;executions&gt;
            &lt;execution&gt;
                &lt;phase&gt;compile&lt;/phase&gt;
                &lt;goals&gt;
                    &lt;goal&gt;exploded&lt;/goal&gt;
                &lt;/goals&gt;
            &lt;/execution&gt;
        &lt;/executions&gt;
        &lt;configuration&gt;
            &lt;webappDirectory&gt;${webappDirectory}&lt;/webappDirectory&gt;
        &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>This is a snippet of my C3gwGui.gwt.xml:</p>
  
  <pre><code>&lt;replace-with class="c3gw.fwk.gui.client.ClientFactoryImpl"&gt;
      &lt;when-type-is class="c3gw.fwk.gui.client.ClientFactory" /&gt;
  &lt;/replace-with&gt;
  </code></pre>
  
  <p>This is a snippet of the line where the error is thrown:</p>
  
  <pre><code>public void onModuleLoad() {
      ClientFactory clientFactory = GWT.create(ClientFactory.class);
  
      ...
  }
  </code></pre>
  
  <p>ClientFactory is an interface and ClientFactoryImpl implements the interface.</p>
  
  <p><strong>What I've figured out so far</strong>: The code works perfectly fine in Eclipse when I run debug, it just doesn't work when I do mvn install. I've run all the goals available for gwt-maven-plugin (clean, compile, sources, etc...) and they all work so the only conclusion I can have at this point is that something is happening during the maven-war-plugin phase or much later.</p>
  
  <p>I also took the basics of this code from the following <a href="https://developers.google.com/web-toolkit/doc/latest/DevGuideMvpActivitiesAndPlaces" rel="nofollow">google tutorial</a> and they use an interface so it should work, assuming that the example project also works that is.</p>