2

Hi I want to update my actual Vaadin 8 Project into a Vaadin 20+ one. I configured under src/main/resources/application.properties the property vaadin.whitelisted-packages=com/mycompany/myproject.

Under src/main/java/com/mycompany/myproject I have a ClientApplication.java class

package com.mycompany.myproject;

import com.vaadin.flow.component.page.AppShellConfigurator;
import com.vaadin.flow.server.PWA;
import com.vaadin.flow.theme.Theme;

/**
 * Use the @PWA annotation make the application installable on phones, tablets
 * and some desktop browsers.
 */

@Theme(value = "mycompany")
@PWA(name = "My Company Fusion", shortName = "Company Fusion", offlineResources = { "images/logo.png" })
public class ClientApplication implements AppShellConfigurator {

}

Under src/main/java/mycompany/server I have the main Application.java class where the springboot app should start. And Under src/main/java/mycompany I have more than 4K java files which are also important and where I develop actively.

package mycompany.server;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.vaadin.artur.helpers.LaunchUtil;

import mycompany.server.core.MyConfigs;


@SpringBootApplication
public class Application extends SpringBootServletInitializer {

    public static void main(String[] args) {

        // 1. Load XML config file
        final boolean configRead = MyConfigs.readConfig();
        if (configRead) {
            System.out.println(MyConfigs.getBackendserverurl());
        }

        // TODO Helmer -> if debug, add prod
        ConfigurableApplicationContext ctx = SpringApplication.run(Application.class, args);
        LaunchUtil.launchBrowserInDevelopmentMode(ctx);
    }

}

Every time I try to run mvn -Dmaven.compiler.failOnError=false -Dmaven.test.skip=true -DskipTests spring-boot:run the webpack server takes more than 10 minutes to start. sometimes it takes more than 30 mins.

user438383
  • 5,716
  • 8
  • 28
  • 43
Helmer Barcos
  • 1,898
  • 12
  • 18
  • Is there a specific step or line after which it takes a long time before continuing? Are you behind a proxy that would affect some connections out? – Mikael Grankvist Sep 28 '21 at 08:24
  • Yes Im behind a proxy. The last step is `Vaadin application has been deployed and started to the context path "/".` – Helmer Barcos Sep 28 '21 at 08:29
  • Can't come up with anything that would specifically run up the time that far. Does the same happen if you use a clean project from start.vaadin.com ? – Mikael Grankvist Sep 28 '21 at 10:55
  • @MikaelGrankvist Im using the clean project from start.vaadin.com. The problems begins everytime when I add the 4K+ Java files to the project. – Helmer Barcos Oct 20 '21 at 06:52
  • Do you have lots of dependencies in `package.json`? Also is this just a devMode issue or is webpack slow also when making a production build? – Mikael Grankvist Oct 20 '21 at 10:06
  • @MikaelGrankvist in package.json I only see the vaadin needed libs, that comes with the empty project. I didn't try to make a production build. This happens in devMode – Helmer Barcos Oct 21 '21 at 06:48

0 Answers0