Hello everyone,
recently I have tried to migrate my vaadin 23.3.x application to version 24.4.x. While migrating I followed the migration guide profusely and completed every single step (aside from adding the vaadin BOM, because I don’t want to lock spring boot starter into a specific version). After multiple tries of clean install (production and no production profile) I keep running into the same error:
error during build:
[ERROR] Could not resolve "../../generated/XXXEndpoint" from "src/main/frontend/src/lit/XXX-component.ts"
[ERROR] file: C:/Users/XXX/IdeaProjects/XXX/XXX-frontend/src/main/frontend/src/lit/XXX-component.ts
[ERROR] at getRollupError (file:///C:/Users/XXX/IdeaProjects/XXXXXX-frontend/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
When i check the folder generated in my frontend directory it only generates vaadin specific files but no generated Endpoints:
Every Single Endpoint has the correct @Endpoint annotation imported from com.vaadin.hilla:
@Endpoint
@Validated
@PermitAll
@PreAuthorize("hasAuthority('" + Berechtigung.ENDPOINTS_XXX + "')")
public class XXXEndpoint implements XXXEndpoint {
pom.xml (some blocks were omitted due to largeness):
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<version>${vaadin.version}</version>
</dependency>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<finalName>${project.artifactId}</finalName>
<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.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<dependencies>
<!-- Exclude development dependencies from production -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
<version>${vaadin.version}</version>
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>6.1.10</version>
</dependency>
</dependencies>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<!-- To always force an optimized production bundle build set this configuration to 'true' -->
<forceProductionBuild>true</forceProductionBuild>
<!-- To have reproducible build by running 'npm ci' -->
<ciBuild>false</ciBuild>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Does someone have any idea why Endpoints are not being generated? If any information is missing just tell me and I will add more code or other needed information.
cheers, james