Vaadin and Compiling a WAR with maven
This is a quick tip to help your WAR file contain the needed widgetsets that Vaadin creates. By default, maven won't include the VAADIN folder in the webapp(WebContent) directory. Add the following plug-in configurations to your POM:
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<!--
<modules>
<module>${package}.gwt.MyWidgetSet</module>
</modules>
-->
</configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<webResources>
<resource>
<directory>src/webapp/VAADIN</directory>
<targetPath>VAADIN</targetPath>
<includes>
<include>**/*</include>
</includes>
</resource>
</webResources>
<webXml>src/webapp/WEB-INF/web.xml</webXml>
<warName>Aperture-Admin</warName>
</configuration>
</plugin>
Comments
Post a Comment