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