Skip to content

Lumo theme loading via deprecated @Theme annotation fails in JAR build #22731

@javier-godoy

Description

@javier-godoy

Description of the bug

According to #21605

The @Theme annotation is deprecated but retained for backward compatibility, but only as a shorthand for loading the Lumo stylesheet.

However, in version 25.0.0-beta5, this only works in development mode and fails when compiled into a JAR. This is a regression, as it worked in both environments in beta2.

Expected behavior

The application should load Lumo theme both in development mode and when compiled as a JAR.

Minimal reproducible example

  1. Download a Vaadin 25 application from http://start.vaadin.com/
  2. Replace the Application.class with
import com.vaadin.flow.theme.Theme;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.vaadin.flow.component.dependency.StyleSheet;
import com.vaadin.flow.component.page.AppShellConfigurator;

@SpringBootApplication
@Theme
@StyleSheet("styles.css") // Your custom styles
public class Application implements AppShellConfigurator {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}
  1. Compile the application with mvn package

Versions

  • Vaadin / Flow version: 25.0.0-beta5
  • Java version: 21
  • OS version: Windows 10

Metadata

Metadata

Assignees

Type

Projects

Status

🏗 WIP

Status

🔎Iteration reviews

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions