Jmix version: 2.5.0
Jmix Studio Plugin Version: 2.5.NIGHTLY1473-243
IntelliJ version: IntelliJ IDEA 2024.3.4 (Ultimate Edition)
From the IDE i can start and compile the project.
If I want to build the productive jar with
./gradlew -Pvaadin.productionMode=true bootJar
I get
> Task :vaadinBuildFrontend FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':vaadinBuildFrontend'.
> com.vaadin.flow.server.ExecutionFailedException: PWA icons generation failed
./gradlew “-Pvaadin.productionMode=true” bootWar --no-build-cache
./gradlew “-Pvaadin.productionMode=true” --no-build-cache bootWar
Both works sometime and fail with same error sometime
PS D:\jmixflow\sheelonline> ./gradlew "-Pvaadin.productionMode=true" --no-build-cache bootWar
[Incubating] Problems report is available at: file:///D:/jmixflow/sheelonline/build/reports/problems/problems-report.html
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.12.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 15s
8 actionable tasks: 5 executed, 3 up-to-date
PS D:\jmixflow\sheelonline> ./gradlew "-Pvaadin.productionMode=true" --no-build-cache bootWar
> Task :vaadinBuildFrontend FAILED
[Incubating] Problems report is available at: file:///D:/jmixflow/sheelonline/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':vaadinBuildFrontend'.
> com.vaadin.flow.server.ExecutionFailedException: PWA icons generation failed
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.12.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 4s
6 actionable tasks: 4 executed, 2 up-to-date
I run same command two times, onetime it is successful and other time failed.
This error still occurs in JMIX version 2.6 when building production build with:
./gradlew -Pvaadin.productionMode=true bootWar.
Using “org.gradle.jvmargs=-Xm1024M” or --no-build-cache parameter no longer works. This appears to be fixed in Vaadin versions 24.7.5+, but JMIX 2.6 uses Vaadin 24.7.3.
As far as I can see this issue is resolved by Vaadin in version 24.8. This is a minor version that was released a couple of weeks ago. We always try to update to the current version of Vaadin whenever possible. Since Vaadin 24.8 contains many changes, we need time to update to this version in the entire framework.
In any case, if you want to update the version of Vaadin yourself in the project and you are absolutely sure that it will be safe, then you can do it as follows in your build.gradle file:
plugins {
id 'io.jmix' version '2.6.0-M1'
id 'java'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.9'
id 'com.vaadin' version '24.7.9' // update Vaadin gradle plugin version
}
dependencies {
// updating vaadin dependencies
implementation "com.vaadin:vaadin-spring-boot-starter:24.7.9"
implementation "com.vaadin:vaadin-core:24.7.9"
implementation "com.vaadin:vaadin-bom:24.7.9"
// all other dependencies
}
Have you tried all the workarounds contained in the issue that Felix shared?
Also as a workaround you can use running the clean gradle task before building your project.