Using Vaadin CDN

John Ahlroos edited this page Jun 27, 2017 · 5 revisions

Vaadin Cloud compilation allows you to speed up your build time by using pre-compiled widgetsets hosted on the Cloud CDN.

To use this feature there are a few requirements you need to be aware of before using it:

  1. Remove any vaadinCompile.widgetset=... definition you have. The CDN will name the widgetset for you.
  2. Your widgetset can only contain addons provided by the Vaadin directory or Maven central.
  3. You cannot have custom client side widgets inside your application. The CDN needs to have access to all client side logic when building the widgetset.

Once you have ensured that the above requirements are met, then the only thing you need to do is to add the following to your build.gradle:

vaadinCompile.widgetsetCDN = true

Handling proxies

If you are behind a proxy you need to enable using proxy with the CDN. To do that you need to add the following to your build.gradle:

vaadinCompile {
    widgetsetCDN true
    widgetsetCDNConfig {
        proxyEnabled true
    }
}

By default the default proxy system properties will be used. If however you want to configure them manually in the build you can also do that by adding the following:

vaadinCompile {
    widgetsetCDN true
    widgetsetCDNConfig {
        proxyHost '<hostname>'
        proxyScheme 'http'
        proxyPort <port>
    }
}

Finally, if your proxy needs authentication, you can access configure the authentication using:

vaadinCompile.widgetsetCDNConfig.proxyAuth

It returns a groovyx.net.http.AuthConfig you can configure. For more information see AuthConfig javadoc.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.