GWT Module com.vaadin.v7.Vaadin7WidgetSet not found
Asked Answered
S

1

7

I have converted my existing project from vaadin 7 to vaadin 8 successfully. There is no error in the project, but when I use mvn install to build the project. I am getting this error:- GWT Module com.vaadin.v7.Vaadin7WidgetSet not found in project sources or resources.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:51 min
[INFO] Finished at: 2017-12-19T12:31:15+05:30
[INFO] Final Memory: 94M/1007M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.0.6:compile (default) on project XXX: GWT Module com.vaadin.v7.Vaadin7WidgetSet not found in project sources or resources. -> [Help 1]
Shaer answered 19/12, 2017 at 7:12 Comment(1)
Please attach pom.xmlTobit
E
1

From here:

Check the following:

You have to replace the vaadin-server dependency with vaadin-compatibility-server.

If you are using the default widgetset (you are not compiling it by yourself):

Replace the vaadin-client-compiled dependency with vaadin-compatibility-client-compiled.

Add @Widgetset("com.vaadin.v7.Vaadin7WidgetSet") to your UI implementations.

If you are using a custom widgetset:

Replace the vaadin-client dependency with vaadin-compatibility-client.

Recompile it.

In your POM I see these lines:

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-server</artifactId>
        <version>7.5.10</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-themes</artifactId>
        <version>7.5.10</version>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client-compiled</artifactId>
        <version>7.5.10</version>
    </dependency>

    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-client</artifactId>
        <version>7.5.10</version>
        <exclusions>
            <exclusion>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

This won't work, you can't include any version 7 components, servers, clients. The only valid thing, is to use the v8-compatibility things.

Elo answered 19/12, 2017 at 15:24 Comment(6)
I included all the compatibility dependencies in the pom but I also keep the existing dependencies with their versions and exclude that dependencies from new compatibility dependency. Is this approach causing the existing issue?Shaer
Show your pom.xml fileCervelat
Here is the POM.xml fileShaer
Remove all vaadin.xxxx version 7.x dependencies in your pom.xmlCervelat
This is a pretty huge project and if I remove 7.x dependencies it will affect multiple files. So I can't afford to remove those dependencies. Is there any way that, I can keep 7.x dependencies with 8.x and remove the occurred error.Shaer
It's pretty simple to solve. Just replace all your imports of the corresponding UI elements and data elements to the compatibility package. com.vaadin.ui.TextField becomes com.vaadin.v7.ui.TextField. There is eve a maven task doing this for you. vaadin.com/docs/framework/migration/migrating-to-vaadin8.html There will be some minimal things to fix after this, but it should at least compile and runCervelat

© 2022 - 2024 — McMap. All rights reserved.