Description of the bug
Hi,
if I update my gradle based app from 24.5.8 to 24.6.x, the gradle build failed with the error
com.vaadin.flow.server.ExecutionFailedException: PWA icons generation failed
As default, my main application class (the one annotated with @SpringBootAppplication and @PWA) does not define the iconPath as parameter for the @PWA annotation. Only if I
- create an icon.png
- put the file under
src/main/resources/META-INF/resources/icons/icon.png
- edit the PWA annotation into
@PWA(name = "myApp" shortName = "myShortname" iconPath = "icons/icon.png")
the gradle build finished sucessfully.
Expected behavior
Also without declaring an iconPath explicetely, the build should finished successfully, as in prior vaadin flow versions as mentioned in https://vaadin.com/docs/latest/flow/configuration/pwa#icons
Minimal reproducible example
build.gradle:
plugins {
id 'com.vaadin' version '24.6.0'
id 'org.springframework.boot' version '3.4.1'
id 'io.spring.dependency-management' version '1.1.6'
id 'java'
}
group = 'war'
version = '0.0.7'
description = """IconTest"""
java {
sourceCompatibility = 21
targetCompatibility = 21
}
vaadin {
productionMode = true
}
jar {
enabled = false
archiveClassifier = 'IconText'
}
repositories {
//mavenLocal()
mavenCentral()
maven { url = "https://maven.vaadin.com/vaadin-addons" }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
implementation 'com.vaadin:vaadin-spring-boot-starter'
}
dependencyManagement {
imports {
mavenBom "com.vaadin:vaadin-bom:24.6.0"
}
}
src/main/java/de/test/MyApp.java
package de.test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;
import com.vaadin.flow.component.dependency.NpmPackage;
import com.vaadin.flow.component.page.AppShellConfigurator;
import com.vaadin.flow.component.page.Push;
import com.vaadin.flow.server.PWA;
import com.vaadin.flow.theme.Theme;
@SpringBootApplication
@PWA(name = "MyApp", shortName = "myApp")
public class MyApp extends SpringBootServletInitializer implements AppShellConfigurator {
public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
}
- copy .gradlew and gradle directory from an existing gradle project
build with gradle: ./gradlew -Pvaadin.productionMode=true bootJar
Versions
- Vaadin / Flow version: 24.6.1
- Java version: 21
- OS version: MacOS 15.2 (Sequoia)
- Browser version (if applicable):
- Application Server (if applicable):
- IDE (if applicable):
Description of the bug
Hi,
if I update my gradle based app from 24.5.8 to 24.6.x, the gradle build failed with the error
com.vaadin.flow.server.ExecutionFailedException: PWA icons generation failedAs default, my main application class (the one annotated with
@SpringBootAppplicationand@PWA) does not define theiconPathas parameter for the@PWAannotation. Only if Isrc/main/resources/META-INF/resources/icons/icon.png@PWA(name = "myApp" shortName = "myShortname" iconPath = "icons/icon.png")the gradle build finished sucessfully.
Expected behavior
Also without declaring an iconPath explicetely, the build should finished successfully, as in prior vaadin flow versions as mentioned in https://vaadin.com/docs/latest/flow/configuration/pwa#icons
Minimal reproducible example
build.gradle:
src/main/java/de/test/MyApp.java
build with gradle:
./gradlew -Pvaadin.productionMode=true bootJarVersions