title: Vaadin compile Widgetset using Maven
body: <p>I have a problem with compiling custom widgetsets for my vaadin application using Maven.</p>
  
  <p>Among my maven modules there's one jar module containing the custom widgets and one war module.</p>
  
  <p>The compiled jar module contains the sources as well as the generated classes and basically looks like this:</p>
  
  <pre><code>com
   |-mypackage
   |  |-ui
   |  | |- VMyWidget.class
   |  | |- VMyWidget.java
   |  |- MyComponent.class
   |  |- MyComponent.java
   |  |- MyWidgetSet.gwt.xml
   |-META-INF
      |-Manifest.MF
         |-Vaadin-Widgetsets: com.mypackage.MyWidgetSet
         |-Vaadin-Package-Version: 1
  </code></pre>
  
  <p>In my war project the pom.xml contains the following section:</p>
  
  <pre><code> &lt;build&gt;
      &lt;plugins&gt;
        &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.3.0&lt;/version&gt;
          &lt;configuration&gt;
            &lt;webappDirectory&gt;${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets&lt;/webappDirectory&gt;
            &lt;extraJvmArgs&gt;-Xmx512M -Xss1024k&lt;/extraJvmArgs&gt;
            &lt;hostedWebapp&gt;${project.build.directory}/${project.build.finalName}&lt;/hostedWebapp&gt;
            &lt;noServer&gt;true&lt;/noServer&gt;         
          &lt;/configuration&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;compile&lt;/goal&gt;
                &lt;goal&gt;generateAsync&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
  
        &lt;plugin&gt;
          &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
          &lt;artifactId&gt;vaadin-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.0.1&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;prepare-package&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;update-widgetset&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  </code></pre>
  
  <p>The jar containing the widgets is a dependency of the war project and thus the widget set is defined. </p>
  
  <p>However, the GWT compiler seems not to find the sources although they are contained in the jar artifact.</p>
  
  <p>Thus, I get the following warning/error message:</p>
  
  <blockquote>
    <p>[INFO] [ERROR]                [WARN] Widget class com.mypackage.ui.VMyWidget was not found. The component com.mypackage.MyComponent will not be included in the widgetset.</p>
  </blockquote>
  
  <p>What am I missing? Why doesn't the GWT compiler find the sources it needs?</p>