How to create/structure extension for Vaadin 7?

Hi,

Can someone give me a hint on how to create/structure extension for Vaadin 7 ?

I tried to create simple extension by following the example of CapsLockWarning from https://vaadin.com/docs/v7/framework/gwt/gwt-extension.html , but seems like the AbstractExtensionConnector never got called.

I have been reading multiple sources such as

and also looking at the way the other Add-ons structured, however the extension seems like not working.

During client compile I notice seems like the AbstractExtensionConnector is compiled (previously it says 1 source file)

[INFO]
 --- vaadin-maven-plugin:7.2.7:resources (default) @ nextinteract-webapp ---
[INFO]
 auto discovered modules [com.vaadin.demo.dashboard.DashboardWidgetSet]

[INFO]
 **2 source files** from GWT module com.vaadin.demo.dashboard.DashboardWidgetSet
[INFO]
 
[INFO]
 <<< vaadin-maven-plugin:7.2.7:compile (default-cli) < process-resources @ nextinteract-webapp <<<
[INFO]
 
[INFO]
 --- vaadin-maven-plugin:7.2.7:compile (default-cli) @ nextinteract-webapp ---
[INFO]
 auto discovered modules [com.vaadin.demo.dashboard.DashboardWidgetSet]

[WARNING]
 Failed to retrieve com.vaadin:vaadin-client-compiler based on project POM
[INFO]
 Using com.vaadin:vaadin-client-compiler version 7.2.7
[INFO]
 Compiling module com.vaadin.demo.dashboard.DashboardWidgetSet
[INFO]
    Validating units:
[INFO]
       Ignored 4 units with compilation errors in first pass.

I noticed some Add-on put all the source files together with the GWT module descriptor and some separate it. In our project I structure it with

Module descriptor
src/main/resources/com/vaadin/demo/dashboard/DashboardWidgetSet.gwt.xml

<module>
    <inherits name="com.vaadin.DefaultWidgetSet"/>
    <!— and other inherits, e.g. filter table —>
	<!— we don't have source="client" declaration, based on GWT documentation it is implicitly adding "client" sub-package —>
</module>

**Sources **

Location: src/main/java/
Files:

  • com.vaadin.demo.dashboard.client.CapsLockWarningConnector
  • com.vaadin.extensions.CapsLockWarning

In order to create the extension, do I have create separate maven project just to contain the extension codes, or can I just combine it together with the existing project that we already have?

So any hints or suggestion on how to fix it, gonna be great.

Vaadin version: 7.2.7

To get the basics right, I would recommend to study very simple add-on extensions first. Idea of extensions is to add functionality to existing components, like this one is extending a Button.

https://github.com/KatriHaapalinna/AriaButton