title: Need Help Packaging a GWT Library Module into a JAR
body: <p>I am trying to package a GWT library module into a JAR file and use the library in a separate GWT web app by adding the JAR file into its class path.</p>
  
  <p>The JAR contains:</p>
  
  <ul>
  <li>Java sources</li>
  <li>RequestFactory generated sources</li>
  <li>UiBinder generated sources</li>
  <li>class files</li>
  <li>library module descriptor</li>
  <li>UiBinder XML files</li>
  </ul>
  
  <p>The library module is inherited from the web app:</p>
  
  <pre><code>&lt;module&gt; &lt;!-- my web app's module descriptor --&gt;
      ...
      &lt;inherits name="[path to my library module].Library"/&gt;
      ...
  &lt;/module&gt;
  </code></pre>
  
  <p>However, I am running into</p>
  
  <pre><code>Deferred binding failed for '[path to mylibrary].client.ClientFactory'...
  </code></pre>
  
  <p>error when I try to launch the web app, which initializes the library in its onModuleLoad() method.  The failure is caused by UiBinder views and RequestFactory that the library module uses.  Launching in development mode or compiling the web app results in errors with messages stating missing CSS files and illegal references to generated source under emul.java.util package (I tried including this package and all other generated source in the JAR, but it didn't help.)</p>
  
  <p><strong>Can someone tell me what needs to be included in the JAR?  Are there any additional resources required for library modules that use UiBinder and RequestFactory?</strong></p>
  
  <p><strong>Has anyone successfully packaged a GWT library module that uses RequestFactory and UiBinder into a JAR?</strong></p>
  
  <p>Further clarification: The question is about creating a GWT library module; a module that includes client and server components, RequestFactory and UiBinder. Note that a GWT library module is packaged into a JAR whereas a regular GWT module with an entry point is packaged into a WAR. My attempts to package such a library module and GWT <code>&lt;inherit&gt;</code> from another GWT project have failed.</p>