Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Embedded Jetty+Vaadin. Cannot use add-ons.
Hello.
I created some little "Intellij Idea" project with Vaadin, but i cannot add add-ons.
After start i see a page with text:
"Widgetset 'com.vaadin.DefaultWidgetSet' does not contain an implementation for com.alsnightsoft.vaadin.MaskedField. Check the connector's @Connect mapping, the widgetset's GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions."
I looked at instructions link, but cannot fully understand how to fix it.
Please review my project and suggest me how to use add-ons.
Thanks!
Hi,
you should add vaadin plugin configuration to your pom.
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
<draftCompile>false</draftCompile>
<compileReport>false</compileReport>
<style>OBF</style>
<strict>true</strict>
</configuration>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
</plugin>
You can also omit the executions confiiguration and manually run widgetset compilation via maven.
See here and here for futher information
HTH
Marco
Thanks, Marco!
I add this XML to pom.xml, but it did not help. If i start/debug application over Run/Debug Idea's buttons - the problem still here.
On start goal 'vaadin:compile' it only outputs "[WARNING] GWT plugin is configured to detect modules, but none were found."
On start goal 'vaadin:update-widgetset' it create ${basedir}/target/generated-resources/gwt/AppWidgetset.gwt.xml with content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.DefaultWidgetSet"/>
<inherits name="com.librishuffle.WidgetSet" />
<inherits name="com.alsnightsoft.vaadin.MasketfieldWidgetset" />
</module>
It only works if i start lifecycle 'package'. It generates many other folders and application starts properly.
Do i need to always start lifecycle 'package' or there is simplest procedure, that i can link with 'Make' step of IntelliJ Idea?
I think i understand some more at now...
When i use lifecycle 'package' then Maven generates correct JAR file with dependent libs, include Vaadin add-ons.
So, there is ready solution for generate final JAR.
But when i develop my project i will use sometime lifecycle 'package' for generate client parts of Vaadin add-ons.
Hi, I think you can also avoid to run the whole package phase.
Try using this args for maven task in make step
vaadin:update-widgetset process-resources vaadin:compile
This will only recompile the widgetset when it is not found in the target directory (so at first launch or after a maven clean)
In this case you can remove the executions configuration for vaadin maven plugin
HTH
Marco
Marco Collovati: Hi, I think you can also avoid to run the whole package phase.
Try using this args for maven task in make stepvaadin:update-widgetset process-resources vaadin:compile
This will only recompile the widgetset when it is not found in the target directory (so at first launch or after a maven clean)
In this case you can remove the executions configuration for vaadin maven pluginHTH
Marco
Thank you, Marco!
It is very useful method.
Thank you once again!