Why Vaadin-maven-plugin run with multiple versions?

I have a maven project with vaadin 14.1.25 and Java EE 7 which creates a .war file. When I run or build project I see different version of vaadin-maven-pluging is proceeding.

Such as in attached picture:

 1. vaadin-maven-pluging: 14.1.17
 2. vaadin-maven-pluging: 14.1.19
 3. vaadin-maven-pluging: 15.0.0

I have only one maven plugin in my project which is vaadin-maven-pluging: 14.1.25.

Can someone explain why does it happen?

pom.xml

    <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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>it.uz.counting</groupId>
    <artifactId>counting-web</artifactId>

    <version>1.0.95-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>counting-web</name>

    <properties>
        <project.build.sourceEncoding>iso-8859-1</project.build.sourceEncoding>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven-compiler-plugin-version>3.8.0</maven-compiler-plugin-version> 
        <!-- Web -->
        <!-- Trinidad -->
        <trinidad.version>2.2.1</trinidad.version>
        <tomahawk.version>1.1.14</tomahawk.version>
        <vaadin.version>14.1.25</vaadin.version>
        <vaadin.productionMode>false</vaadin.productionMode>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>2.0.1.Final</version>
            </dependency>

            <dependency>
                <groupId>javax</groupId>
                <artifactId>javaee-api</artifactId>
                <version>7.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-bom</artifactId>
                <version>${vaadin.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>Vaadin Directory</id>
            <url>https://maven.vaadin.com/vaadin-addons</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <!-- Replace artifactId with vaadin-core to use only free components -->
            <artifactId>vaadin</artifactId>
            <exclusions>
                <!-- Webjars are only needed when running in Vaadin 13 compatibility mode -->
                <exclusion>
                    <groupId>com.vaadin.webjar</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.webjars.bowergithub.insites</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.webjars.bowergithub.polymer</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.webjars.bowergithub.polymerelements</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.webjars.bowergithub.vaadin</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.webjars.bowergithub.webcomponents</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-cdi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>flow-server-production-mode</artifactId>
        </dependency>

        <dependency>
            <groupId>it.uz.counting</groupId>
            <artifactId>counting-java</artifactId>
            <version>1.0.95-SNAPSHOT</version>
            </dependency>

<!-- Web -->
        <!-- Trinidad -->
        <dependency>
            <groupId>org.apache.myfaces.trinidad</groupId>
            <artifactId>trinidad-api</artifactId>
            <version>${trinidad.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.myfaces.tomahawk</groupId>
            <artifactId>tomahawk20</artifactId>
            <version>${tomahawk.version}</version>
        </dependency>

        <!-- Primefaces-->
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>6.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi Version 3.13 is compatible with primeface 6.2-->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>4.0.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.lowagie/itext -->
        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
            <!-- <version>4.2.2</version> -->
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.itextpdf/itextpdf -->
        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itextpdf</artifactId>
            <version>5.5.13</version>
        </dependency>
        <!-- Primefaces Themes Library https://mvnrepository.com/artifact/org.primefaces.themes/all-themes-->
        <dependency>
            <groupId>org.primefaces.themes</groupId>
            <artifactId>all-themes</artifactId>
            <version>1.0.10</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.primefaces.extensions/master-pom -->
        <dependency>
            <groupId>org.primefaces.extensions</groupId>
            <artifactId>master-pom</artifactId>
            <version>6.2.9</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.primefaces.extensions</groupId>
            <artifactId>primefaces-extensions</artifactId>
            <version>6.2.9</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.primefaces.extensions/resources-codemirror -->
        <dependency>
            <groupId>org.primefaces.extensions</groupId>
            <artifactId>resources-codemirror</artifactId>
            <version>6.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.primefaces.extensions</groupId>
            <artifactId>resources-ckeditor</artifactId>
            <version>6.2.9</version>
        </dependency>

        <!-- End primeFace -->
        <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.5</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
            <scope>provided</scope>
        </dependency>

        <!-- Web Services Description Language -->
        <dependency>
            <groupId>wsdl4j</groupId>
            <artifactId>wsdl4j</artifactId>
            <version>1.6.2</version>
        </dependency>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>5.2.3.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>


    </dependencies>

    <build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-help-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin-version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                    <packagingExcludes>
                        WEB-INF/lib/xmlParserAPIs-2.0.2.jar,
                        WEB-INF/lib/xml-apis-1.3.02.jar,
                        WEB-INF/lib/xml-apis-1.0.b2.jar,
                        WEB-INF/lib/pdf-renderer-1.0.5.jar,
                        WEB-INF/lib/oro-2.0.8.jar,
                        WEB-INF/lib/jstl-1.2.jar,
                        WEB-INF/lib/jfreechart-1.0.1.jar,
                        WEB-INF/lib/jempbox-1.6.0.jar,
                        WEB-INF/lib/jdtcore-3.2.0.v_658.jar,
                        WEB-INF/lib/jcommon-1.0.16.jar,
                        WEB-INF/lib/informix-driver-3.0.jar,

                        WEB-INF/lib/commons-validator-1.3.1.jar,
                        WEB-INF/lib/commons-lang-2.4.jar,
                        WEB-INF/lib/commons-io-1.3.2.jar,
                        WEB-INF/lib/commons-codec-1.3.jar,
                        WEB-INF/lib/bcmail-jdk14-1.38.jar,
                        WEB-INF/lib/bcprov-jdk14-1.38.jar,
                        WEB-INF/lib/bctsp-jdk14-1.38.jar,
                        WEB-INF/lib/bcprov-jdk16-1.45.jar,
                        WEB-INF/lib/batik-util-1.6-1.jar,
                        WEB-INF/lib/batik-gui-util-1.6-1.jar,
                        WEB-INF/lib/batik-ext-1.6-1.jar,
                        WEB-INF/lib/batik-awt-util-1.6-1.jar,

                        WEB-INF/lib/slf4j-api-1.6.1.jar,
                        WEB-INF/lib/slf4j-log4j12-1.6.1.jar

                        WEB-INF/lib/junit-3.8.1.jar

                    </packagingExcludes>
                </configuration>
            </plugin>           
        </plugins>
        </pluginManagement>
        <plugins>
            <!--  Take care of synchronizing java dependencies and imports.   It also creates webpack.config.js if not exists yet. -->
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-frontend</goal>
                            <goal>build-frontend</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

</project>

18250080.png

Hi.

What is that IDEA run target that you are using? Also how is you run configuration defined?

If you run mvn package from the command line does it then use the actual version?

Mikael Grankvist:
Hi.

What is that IDEA run target that you are using? Also how is you run configuration defined?

If you run mvn package from the command line does it then use the actual version?

I use standalone version of Wildfly 2018. I use war exploded in the IDEA.
Regarding mvn package when I run, it just compile and does not run vaadin-maven-plugin which is logic, I think.
But when I run mvn install it process prepare-frontend en build-frontend goal of vaadin-maven-plugin and I get error as below.

Failed to execute goal com.vaadin:vaadin-maven-plugin:14.1.25:build-frontend (default) on project counting-web: Webpack process exited with non-zero exit code.
Stderr: ''

After above error if I run wildfly server getting following error

15:30:43,511 ERROR [com.vaadin.flow.server.frontend.FrontendUtils]
 (default task-11) Cannot get the 'stats.json' from the classpath 'META-INF/VAADIN/config/stats.json'
15:30:43,512 ERROR [com.vaadin.flow.server.DefaultErrorHandler]
 (default task-11) : com.vaadin.flow.server.BootstrapException: Unable to read webpack stats file.
	at com.vaadin.flow.server.BootstrapHandler$BootstrapPageBuilder.setupFrameworkLibraries(BootstrapHandler.java:872)
	at com.vaadin.flow.server.BootstrapHandler$BootstrapPageBuilder.setupDocumentHead(BootstrapHandler.java:749)
	at com.vaadin.flow.server.BootstrapHandler$BootstrapPageBuilder.getBootstrapPage(BootstrapHandler.java:524)
	at com.vaadin.flow.server.communication.WebComponentBootstrapHandler.synchronizedHandleRequest(WebComponentBootstrapHandler.java:195)
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1540)
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:247)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)

Hi.

With the supplied pom prepare-frontend and build-frontend should run even for mvn package
That build-frontend failed with a webpack exception you should look up in the logs to see why it failed. I would expect that some node_modules are not installed and it would look somethign like:


  Failed to find the following imports in the `node_modules` tree:
      - @vaadin/vaadin-grid/src/vaadin-grid-column.js
      - @vaadin/vaadin-ordered-layout/src/vaadin-vertical-layout.js
      - @vaadin/vaadin-lumo-styles/spacing.js
      - @vaadin/vaadin-context-menu/src/vaadin-context-menu.js
      - @vaadin/vaadin-grid/src/vaadin-grid-column-group.js
      - @vaadin/vaadin-grid/src/vaadin-grid-sorter.js
      - @vaadin/vaadin-button/src/vaadin-button.js
      - @vaadin/vaadin-lumo-styles/icons.js
      - @vaadin/vaadin-lumo-styles/style.js
      - @vaadin/vaadin-lumo-styles/typography.js
      - @vaadin/vaadin-grid/src/vaadin-grid.js
      - a-avataaar/a-avataaar.js
      - @vaadin/vaadin-lumo-styles/color.js
      - @vaadin-component-factory/vcf-toggle-button
      - @vaadin/vaadin-lumo-styles/sizing.js
      - @vaadin/vaadin-checkbox/src/vaadin-checkbox.js
  If the build fails, check that npm packages are installed.

  To fix the build remove `package-lock.json` and `node_modules` directory to reset modules.
  In addition you may run `npm install` to fix `node_modules` tree structure.

in this case running npm i would fix it.

The server exception is from the fact that the frontend build failed and we are missing the required data in the built war file.

Mikael Grankvist:
Hi.

With the supplied pom prepare-frontend and build-frontend should run even for mvn package
That build-frontend failed with a webpack exception you should look up in the logs to see why it failed. I would expect that some node_modules are not installed and it would look somethign like:


  Failed to find the following imports in the `node_modules` tree:
      - @vaadin/vaadin-grid/src/vaadin-grid-column.js
      - @vaadin/vaadin-ordered-layout/src/vaadin-vertical-layout.js
      - @vaadin/vaadin-lumo-styles/spacing.js
      - @vaadin/vaadin-context-menu/src/vaadin-context-menu.js
      - @vaadin/vaadin-grid/src/vaadin-grid-column-group.js
      - @vaadin/vaadin-grid/src/vaadin-grid-sorter.js
      - @vaadin/vaadin-button/src/vaadin-button.js
      - @vaadin/vaadin-lumo-styles/icons.js
      - @vaadin/vaadin-lumo-styles/style.js
      - @vaadin/vaadin-lumo-styles/typography.js
      - @vaadin/vaadin-grid/src/vaadin-grid.js
      - a-avataaar/a-avataaar.js
      - @vaadin/vaadin-lumo-styles/color.js
      - @vaadin-component-factory/vcf-toggle-button
      - @vaadin/vaadin-lumo-styles/sizing.js
      - @vaadin/vaadin-checkbox/src/vaadin-checkbox.js
  If the build fails, check that npm packages are installed.

  To fix the build remove `package-lock.json` and `node_modules` directory to reset modules.
  In addition you may run `npm install` to fix `node_modules` tree structure.

in this case running npm i would fix it.

The server exception is from the fact that the frontend build failed and we are missing the required data in the built war file.

I have tryied npm install but still same resullt.
After npm install I did node node_modules\webpack\bin\webpack.js but getting following error.

C:\Development\workspace\soft\counting-web>node node_modules\webpack\bin\webpack.js
i 「atl」: Using typescript@3.7.3 from typescript
i 「atl」: Using tsconfig.json from C:/Development/workspace/soft/counting-web/tsconfig.json
i 「atl」: Checking started in a separate process...
× 「atl」: Checking finished with 2 errors
Hash: 5c164581b78df6a9755b
Version: webpack 4.30.0
Time: 3323ms
Built at: 2020-05-07 11:46:30
Entrypoint bundle =
[0]
 ../target/index.ts + 1 modules 92.2 KiB {0} [built]

    | ../target/index.ts 1.46 KiB [built]

    |     + 1 hidden module

ERROR in ../target/index.ts
Module not found: Error: Can't resolve '../target/frontend/generated-flow-imports' in 'C:\Development\workspace\soft\counting-web\target'
 @ ../target/index.ts 17:19-70

ERROR in ../target/index.ts
Module not found: Error: Can't resolve '@vaadin/flow-frontend/Flow' in 'C:\Development\workspace\soft\counting-web\target'
 @ ../target/index.ts 15:0-50 16:33-37

ERROR in chunk bundle [entry]

build/vaadin-bundle-5f34e94a2f4706513f00.cache.js
C:\Development\workspace\soft\counting-web\node_modules\awesome-typescript-loader\dist\entry.js!C:\Development\workspace\soft\counting-web\target\index.ts 052da964a93a474bf00dd0019aa9cf65
Unexpected token (17:33)
| // import Flow module to enable navigation to Vaadin server-side views
| 
| const { serverSideRoutes } = new !(function webpackMissingModule() { var e = new Error("Cannot find module '@vaadin/flow-frontend/Flow'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())({
|     imports: () => Promise.resolve().then(function webpackMissingModule() { var e = new Error("Cannot find module '../target/frontend/generated-flow-imports'"); e.code = 'MODULE_NOT_FOUND'; throw e; })
| });

ERROR in [at-loader]
 ./target/index.ts:18:20 
    TS2307: Cannot find module '@vaadin/flow-frontend/Flow'.

ERROR in [at-loader]
 ./target/index.ts:21:25 
    TS2307: Cannot find module '../target/frontend/generated-flow-imports'.
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [0]
 ../node_modules/html-webpack-plugin/lib/loader.js!../target/index.html 1.08 KiB {0} [built]

        + 3 hidden modules

Then the next step you have to take is To fix the build remove 'package-lock.json' and 'node_modules' directory to reset modules. and then rebuild with maven.

Mikael Grankvist:
Then the next step you have to take is To fix the build remove 'package-lock.json' and 'node_modules' directory to reset modules. and then rebuild with maven.

What do you means exactly by rebuild with maven?

Which goal should I execute?

Should I do it without stopping the server?

I did execute the ‘mvn pakage’ and again getting the error as before.

Failed to execute goal com.vaadin:vaadin-maven-plugin:14.1.25:build-frontend (default) on project tarifering-web: Webpack process exited with non-zero exit code.
Stderr: ''

You should run mvn package and redeploy the war to the server if the build succeeds without exceptions (also prepare-frontend and build-frontend should have executed).

Mikael Grankvist:
You should run mvn package and redeploy the war to the server if the build succeeds without exceptions (also prepare-frontend and build-frontend should have executed).

This is what I get when run mvn package

[INFO]
 --- vaadin-maven-plugin:14.1.25:prepare-frontend (default) @ counting-web ---
[INFO]
 Added 1 dependencies to main package.json
[INFO]
 Updated npm C:\Development\workspace\soft\counting-web\package.json.
[INFO]
 
[INFO]
 --- vaadin-maven-plugin:14.1.25:build-frontend (default) @ counting-web ---
[INFO]
 Scanning classes to find frontend configurations and dependencies...
[INFO]
 Visited 1225 classes. Took 1810 ms.
[INFO]
 Visited 99 classes. Took 40 ms.
[INFO]
 Updated npm C:\Development\workspace\soft\counting-web\package.json.
[INFO]
 Running `npm install` to resolve and optionally download frontend dependencies. This may take a moment, please stand by...
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN no-name@ No description
npm WARN no-name@ No repository field.
[INFO]
 Frontend dependencies resolved successfully.
[INFO]
 Copying frontend resources from jar files ...
[INFO]
 Visited 167 resources. Took 244 ms.
[WARNING]
 Use the './' prefix for files in JAR files: '', please update your component.
[INFO]
 
  Failed to find the following imports in the `node_modules` tree:
      - @vaadin/flow-frontend/
  If the build fails, check that npm packages are installed.
  To fix the build remove `package-lock.json` and `node_modules` directory to reset modules.
  In addition you may run `npm install` to fix `node_modules` tree structure.
[INFO]
 No js modules to update 'C:\Development\workspace\soft\counting-web\target\frontend\generated-flow-imports-fallback.js' file
[INFO]
 No js modules to update 'C:\Development\workspace\soft\counting-web\target\frontend\generated-flow-imports.js' file
[INFO]
 Running webpack ...
The `corejs` option only has an effect when the `useBuiltIns` option is not `false`
The `corejs` option only has an effect when the `useBuiltIns` option is not `false`
Hash: 3f39177c0bcf616b67bc
Version: webpack 4.42.0
Time: 42999ms
Built at: 2020-05-07 16:55:22
 6 assets
Entrypoint bundle = build/vaadin-bundle-081fe0ab8d395ade0632.cache.js
Entrypoint bundle.es5 = build/vaadin-bundle.es5-7f6142846ba47ddfc210.cache.js
[113]
 ../node_modules/@vaadin/vaadin-text-field/theme/lumo/vaadin-text-field.js?babel-target=es6 + 1 modules 8.64 KiB {0} [built]

      |    2 modules
[114]
 ../node_modules/@vaadin/vaadin-text-field/theme/lumo/vaadin-text-field.js?babel-target=es5 + 1 modules 17.7 KiB {1} [built]

      |    2 modules
[178]
 ../node_modules/@vaadin/vaadin-dialog/theme/lumo/vaadin-dialog.js?babel-target=es6 + 1 modules 1.71 KiB {0} [built]

      |    2 modules
[179]
 ../node_modules/@vaadin/vaadin-dialog/theme/lumo/vaadin-dialog.js?babel-target=es5 + 1 modules 2.05 KiB {1} [built]

      |    2 modules
[243]
 ../node_modules/@vaadin/vaadin-login/theme/lumo/vaadin-login-form.js?babel-target=es6 + 2 modules 876 bytes {0} [built]

      |    3 modules
[244]
 ../node_modules/@vaadin/vaadin-login/theme/lumo/vaadin-login-form.js?babel-target=es5 + 2 modules 1.13 KiB {1} [built]

      |    3 modules
[245]
 ../node_modules/@vaadin/vaadin-context-menu/theme/lumo/vaadin-context-menu.js?babel-target=es6 + 1 modules 4.06 KiB {0} [built]

      |    2 modules
[246]
 ../node_modules/@vaadin/vaadin-grid/theme/lumo/vaadin-grid-sorter.js?babel-target=es6 + 1 modules 1.06 KiB {0} [built]

      |    2 modules
[247]
 ../node_modules/@vaadin/vaadin-context-menu/theme/lumo/vaadin-context-menu.js?babel-target=es5 + 1 modules 4.45 KiB {1} [built]

      |    2 modules
[248]
 ../node_modules/@vaadin/vaadin-grid/theme/lumo/vaadin-grid-sorter.js?babel-target=es5 + 1 modules 1.37 KiB {1} [built]

      |    2 modules
[252]
 ../target/frontend/first-view.js?babel-target=es6 4.65 KiB {0} [built]

[264]
 ../target/frontend/generated-flow-imports.js?babel-target=es5 + 59 modules 612 KiB {1} [built]

      | ../target/frontend/generated-flow-imports.js?babel-target=es5 3.16 KiB [built]

      | ../target/frontend/first-view.js?babel-target=es5 7.3 KiB [built]

      |     + 58 hidden modules
[265]
 ../target/frontend/generated-flow-imports.js?babel-target=es6 + 57 modules 489 KiB {0} [built]

      | ../target/frontend/generated-flow-imports.js?babel-target=es6 3.16 KiB [built]

      |     + 57 hidden modules
[443]
 ../target/frontend/generated-flow-imports-fallback.js 2.76 KiB {5} [built]

[444]
 ../target/frontend/generated-flow-imports-fallback.js 2.76 KiB {4} [built]

    + 430 hidden modules
ERROR in ../target/frontend/generated-flow-imports-fallback.js
Module not found: Error: Can't resolve '@vaadin/flow-frontend/?babel-target=es5' in 'C:\Development\workspace\soft\counting-web\target\frontend'
 @ ../target/frontend/generated-flow-imports-fallback.js 43:0-32
 @ ../target/frontend/generated-flow-imports.js?babel-target=es5
ERROR in ../target/frontend/generated-flow-imports-fallback.js
Module not found: Error: Can't resolve '@vaadin/flow-frontend/?babel-target=es6' in 'C:\Development\workspace\soft\counting-web\target\frontend'
 @ ../target/frontend/generated-flow-imports-fallback.js 43:0-32
 @ ../target/frontend/generated-flow-imports.js?babel-target=es6

What about if you run mvn clean package?
The logs do say Copying frontend resources from jar files and it also found 167 resources.
so there should be a populated folder node_modules/@vaadin/flow-frontend.

Mikael Grankvist:
What about if you run mvn clean package?
The logs do say Copying frontend resources from jar files and it also found 167 resources.
so there should be a populated folder node_modules/@vaadin/flow-frontend.

under node_modules/@vaadin/ there isn’t any flow-frontend. there I see only node_modules/@vaadin/flow-deps see flow-deps.png picture in attachment.

There in the target folder is a folder with name target\flow-frontend and inside it is a one file package.json see the attached picture target.png
18256041.png
18256044.png

If you grab a clean starter from https://vaadin.com/start/v14 preferably the Plain Java Servlet one and CDI and try those.
If this doesn’t work then there might be a issue with the jar scanning and copying.

Mikael Grankvist:
If you grab a clean starter from https://vaadin.com/start/v14 preferably the Plain Java Servlet one and CDI and try those.
If this doesn’t work then there might be a issue with the jar scanning and copying.

I can’t grab new start, I have an existing project which I should integrate Vaadin inside it.
What I did is injecting pom.xml configuration of a new start project CDI and Java EE into my existing pom.xml

And that should basically be fine, but what I’m after is that does a clean start project work with Java EE 7 or does that also fail when building a production build war with mvn package -Pproduction

Also the latest release is now at 14.1.28 which you could update to.

Mikael Grankvist:
And that should basically be fine, but what I’m after is that does a clean start project work with Java EE 7 or does that also fail when building a production build war with mvn package -Pproduction

Also the latest release is now at 14.1.28 which you could update to.

The old project works fine but when I navigate to vaadin firtView it fails. only vaadin part fails the rest which is jsf works fine.

Recently I changed pom to this:

<profiles>
		<profile>
			<id>production</id>
			<properties>
				<vaadin.productionMode>true</vaadin.productionMode>
			</properties>
			<dependencies>
				<dependency>
					<groupId>com.vaadin</groupId>
					<artifactId>flow-server-production-mode</artifactId>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>com.vaadin</groupId>
						<artifactId>vaadin-maven-plugin</artifactId>
						<version>${vaadin.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-frontend</goal>
									<goal>build-frontend</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

when run mvn clean package -Pproduction it produce the following error.

ERROR in ../target/frontend/generated-flow-imports-fallback.js
Module not found: Error: Can't resolve '@vaadin/flow-frontend/?babel-target=es5' in 'C:\Development\workspace\soft\counting-web\target\frontend'
 @ ../target/frontend/generated-flow-imports-fallback.js 43:0-32
 @ ../target/frontend/generated-flow-imports.js?babel-target=es5

ERROR in ../target/frontend/generated-flow-imports-fallback.js
Module not found: Error: Can't resolve '@vaadin/flow-frontend/?babel-target=es6' in 'C:\Development\workspace\soft\counting-web\target\frontend'
 @ ../target/frontend/generated-flow-imports-fallback.js 43:0-32
 @ ../target/frontend/generated-flow-imports.js?babel-target=es6
[INFO]
 ------------------------------------------------------------------------
[INFO]
 BUILD FAILURE
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Total time:  31.188 s
[INFO]
 Finished at: 2020-05-12T11:56:06+02:00
[INFO]
 ------------------------------------------------------------------------
[ERROR]
 Failed to execute goal com.vaadin:vaadin-maven-plugin:14.1.27:build-frontend (default) on project counting-web: Webpack process exited with non-zero exit code.
[ERROR]
 Stderr: ''