Using Add-ons With Maven1. Add a Dependency to the Add-onClick the Maven POM button on an add-on details page and you will be presented with the required details to create a dependency to the add-on.
You should edit the pom.xml file and add the following lines under the <repository> <id>vaadin-addons</id> <url>http://maven.vaadin.com/vaadin-addons</url> </repository>
After doing this you can simply copy-paste the 2. Compile the Client-side Widget SetIf the add-on contains a client-side GWT implementation, you must compile a widget set for your application with the GWT compiler. 2.1 Add Dependencies to GWTDepending on the way you have created your project, you might already have required plugins and dependencies in your pom.xml (at least as commented out sections). See this wiki page for more information. 2.2 Define the Widget SetAfter you have defined the required GWT dependencies, you must specify the widget set to be used in your application and create a stub for the GWT module descriptor. Open up the web.xml of your project and add the following lines to define the widget set to be used.
<init-param>
<param-name>widgetset</param-name>
<param-value>com.example.myapp.widgetset.MyAppWidgetSet</param-value>
</init-param>
Next you must create a stub for the GWT module descriptor. So create a file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
</module>
2.3 Update and Compile the Widget SetNow you're ready to update and compile the widget set. You can do this with the following command which first scans your project for widgets, adds them to the widget set and then compiles the widget set. mvn vaadin:update-widgetset install
|