hilla icon indicating copy to clipboard operation
hilla copied to clipboard

Fusion endpoint js file should be generated by maven plugin

Open mvysny opened this issue 4 years ago • 0 comments

I've added this class to my example project (generated from start.vaadin.com):

@Endpoint
@AnonymousAllowed
public class AboutEndpoint {
    public String getVersion() {
        return "1234";
    }
}

I'd expect mvn clean package (or running the vaadin:prepare-frontend goal) to generate the frontend/generated/AboutEndpoint.ts file, however the file is only generated after I run the app for the first time.

Minimal reproducible example

  1. Download new TypeScript+HTML Vaadin 18 project from start.vaadin.com
  2. Add the AboutEndpoint java class right next to the Application class
  3. Run mvn -C clean package

Expected behavior

The frontend/generated/AboutEndpoint.ts file is generated, and I can start using it immediately in my views.

Actual behavior

I need to run the app once in dev mode, in order for VaadinServlet to generate the ts endpoint files.

Versions:

- Vaadin / Flow version: 18.0.2/5.0.2

mvysny avatar Dec 11 '20 11:12 mvysny