Webinar: Vaadin 7.7 - using the new AppWidgetset and CDN

thank you

Is there a possibility to have the vaadin default widgetset get from cdn and my own widgset from local (in .war), or better, define per widget where is located?

Edison, that is not how GWT is designed, so the answer is no. GWT does all it can to combine and optimized a monolithic JS engine for the end users. Thus it needs a full compilation with all the modules and in that it combines just on junk of JS. This way the JS engine is faster and more compact.

cheers,
matti

PS. Sorry for the nasty sound issues, somebody had touched our mixer during summer vacation :wink: We did a re-recording right aways.

Do I need to change some code in my pom.xml with Vaadin 7.7?
I get the following error when I do a “clean package”

Could not find or load main class com.vaadin.server.widgetsetutils.WidgetSetBuilder

I also have a red label in my pom.xml after switching to vaadin 7.7

Failed to update widgetset (com.vaadin:vaadin-maven-plugin:7.7.0:update-widgetset:default:generate-resources) If I switch back to vaadin 7.6.8, everything compiles correctly.

Here is my pom.xml from my widgetset module

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>dungeonsstory</artifactId>
        <groupId>com.dungeonstory</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>dungeonsstory-widgetset</artifactId>
    <name>dungeonsstory-widgetset</name>
    <packaging>jar</packaging>

    <dependencies>
        <!-- Versions for these are configured in the parent POM -->
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client-compiler</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <configuration>
                    <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                    <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
                    <draftCompile>true</draftCompile>
                    <compileReport>false</compileReport>
                    <!-- Change to PRETTY (or possibly DETAILED) to get
                    unobfuscated client side stack traces. A better approach
                    for debugging is to use Super Dev Mode -->
                    <style>OBF</style> 
                    <strict>true</strict>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>update-widgetset</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Vaadin-Package-Version>1</Vaadin-Package-Version>
                            <Vaadin-Widgetsets>com.dungeonstory.DSWidgetset</Vaadin-Widgetsets>
                        </manifestEntries>
                    </archive>
                    <!-- Exclude some unnecessary files generated by the 
                        GWT compiler. -->
                    <excludes>
                        <exclude>VAADIN/gwt-unitCache/**</exclude>
                        <exclude>VAADIN/widgetsets/WEB-INF/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

Hi jcfortier,

Try specifying the version for vaadin-maven-plugin. Also you should be able to get rid of most configurations now, there are much better defaults now. Try with this:

            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>7.7.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
                            <goal>compile-theme</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

cheers,
matti

Thanks!

I tried the ContextMenu adds-on, the context menu won’t come out with either cdn or local.
Here is my pom.xml, did I miss anything for 7.7.0 here?

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

<groupId>com.microchip.esdev.dbas.web</groupId>
<artifactId>DbasTree</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>DbasTree</name>
<description>DBAS Web with Spring boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.4.0.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <vaadin.version>7.7.0</vaadin.version>
    <vaadin.plugin.version>7.7.0</vaadin.plugin.version>
    <!-- cdn/fetch/local -->
    <vaadin.widgetset.mode>cdn</vaadin.widgetset.mode>
</properties>

<dependencies>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-spring-boot-starter</artifactId>
        <version>1.0.0</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>de.steinwedel.vaadin.addon</groupId>
       <artifactId>messagebox</artifactId>
       <version>3.0.17</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin.addon</groupId>
        <artifactId>vaadin-context-menu</artifactId>
        <version>0.7.3</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client-compiler</artifactId>
    </dependency>
</dependencies>

<repositories>
    <repository>
       <id>vaadin-addons</id>
       <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
</repositories>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-bom</artifactId>
            <version>${vaadin.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<pluginRepositories>
    <pluginRepository>
        <id>vaadin-snapshots</id>
        <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
         <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <version>${vaadin.plugin.version}</version>
            <executions>
               <execution>
                  <goals>
                  <!-- 
                      <goal>clean</goal>
                      <goal>resources</goal>
                  -->
                      <goal>update-theme</goal>
                      <goal>compile-theme</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
    </plugins>
</build>

I’m trying with a new project from maven archetype, set “cdn” instead of “local” for widgetset mode and added Vaadin Charts dependence. But when I build the project I get an error with my Charts CVAL license (perpetual license​, no subscription):

[ERROR]
Failed to execute goal com.vaadin:vaadin-maven-plugin:7.7.0:update-widgetset (default) on project vaadin-app: Cval license check failed! Vaadin Charts 3 registered to xxxxxxxxx@xxxxxxx.xxx → [Help 1]

​With “local” mode everything goes right. Are perpetual licenses supported in CDN mode?

Perpetual licences should work just fine as well. If it don’t it is bug. I’ll ask our engineering to see what is going on.

cheers,
matti

Ok, thank you!

​Let me know if I need to open a bug report or something else.

Can anyone help me on the ContextMenu?
Or does the 7.7.0 really works the way it says?

Hello Matti, do you have any update about this?

Try the latest ContextMenu now with Framework 7.7.1 release, should work perfectly now.

Emanuele, I have pinged the team about this, but no answer yet. It could help if you create a ticket about it to dev.vaadin.com. This really needs to be fixed.

cheers,
matti

Created ticket and fixed the perpetual license issue in http://dev.vaadin.com/ticket/20287 - the fix will be included in 7.7.2.

Thank you very much! I look forward for the release!

Hi,

My project was running fine using Vaadin 7.6.8, but when moving to release 7.7.1 I got this exception:

​Exception in thread "main" java.lang.IllegalArgumentException: URI has an authority component
[ERROR]
     at java.io.File.<init>(File.java:423)
[ERROR]
     at com.vaadin.server.widgetsetutils.WidgetSetBuilder.updateWidgetSet(WidgetSetBuilder.java:74)
[ERROR]
     at com.vaadin.server.widgetsetutils.WidgetSetBuilder.main(WidgetSetBuilder.java:54)

Any hint please ??

Hi,

That’s a known issue in 7.7.1. You’ll need to roll back to 7.7.0 or wait for the fix that comes with 7.7.2.

-Olli

Thanks. Yes it wokrs fine with 7.7.0

Does it really work?
I’m always getting “SEVERE: Failed to connect service https://wsc.vaadin.com/api/compiler/compile

It does, I trust it more than our liferay based website :slight_smile:

Let’s try to find the issue you have! Could you share the project you are using or the full maven log?

cheers,
matti