Jmix deployment

I am facing a Gradle/Spring Boot/Vaadin compatibility issue in a Jmix application while generating a WAR file.

Project details:

  1. Jmix Version: 2.6.1
  2. Java Version: 17
  3. Gradle Version: 8.12.1
  4. Packaging: WAR
  5. OS: Windows
  6. Database: PostgreSQL

My build.gradle :- plugins {
id ‘io.jmix’ version ‘2.6.1’
id ‘java’
id ‘war’
id ‘org.springframework.boot’ version ‘3.4.4’
id ‘org.jetbrains.gradle.plugin.idea-ext’ version ‘1.1.9’
id ‘io.spring.dependency-management’ version ‘1.1.7’
//id ‘com.vaadin’ version ‘24.3.7’
}

compileJava.options.encoding = ‘UTF-8’
compileTestJava.options.encoding = ‘UTF-8’

group = ‘com.company’
version = ‘0.0.1-SNAPSHOT’

jmix {
bomVersion = ‘2.6.1’
}

repositories {
mavenCentral()
maven { url = ‘https://global.repo.jmix.io/repository/public’ }
}

dependencies {
implementation ‘io.jmix.reports:jmix-reports-starter’
implementation ‘io.jmix.reports:jmix-reports-rest-starter’
implementation ‘io.jmix.reports:jmix-reports-flowui-starter’

implementation 'io.jmix.bulkeditor:jmix-bulkeditor-starter'
implementation 'io.jmix.core:jmix-core-starter'
implementation 'io.jmix.data:jmix-eclipselink-starter'
implementation 'io.jmix.security:jmix-security-starter'
implementation 'io.jmix.security:jmix-security-flowui-starter'
implementation 'io.jmix.security:jmix-security-data-starter'
implementation 'io.jmix.localfs:jmix-localfs-starter'
implementation 'io.jmix.flowui:jmix-flowui-starter'
implementation 'io.jmix.flowui:jmix-flowui-data-starter'
implementation 'io.jmix.flowui:jmix-flowui-themes'
implementation 'io.jmix.datatools:jmix-datatools-starter'
implementation 'io.jmix.datatools:jmix-datatools-flowui-starter'
implementation 'org.springframework.boot:spring-boot-starter-mail'

//Springboot starter dependencies
//implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'


implementation 'com.openhtmltopdf:openhtmltopdf-core:1.0.10'
implementation 'com.openhtmltopdf:openhtmltopdf-pdfbox:1.0.10'
implementation 'com.openhtmltopdf:openhtmltopdf-slf4j:1.0.10'
implementation 'com.itextpdf:itextpdf:5.5.13.3'
implementation 'com.google.zxing:core:3.5.2'
implementation 'com.google.zxing:javase:3.5.2'

implementation 'org.postgresql:postgresql:42.7.3'

//Excel Export
implementation('org.apache.poi:poi:5.4.0') {
    exclude group: 'commons-codec', module: 'commons-codec'
}
implementation('org.apache.poi:poi-ooxml:5.4.0') {
    exclude group: 'commons-codec', module: 'commons-codec'
}

// Add secure version explicitly
implementation ‘commons-codec:commons-codec:1.17.1’

testImplementation('org.springframework.boot:spring-boot-starter-test') {
    exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'io.jmix.flowui:jmix-flowui-test-assist'

}

configurations.implementation {
exclude group: ‘com.vaadin’, module: ‘hilla’
exclude group: ‘com.vaadin’, module: ‘hilla-dev’
exclude group: ‘com.vaadin’, module: ‘copilot’
}

test {
useJUnitPlatform()
}

//vaadin {
// optimizeBundle = false
//}

bootWar {
archiveFileName = ‘glos.war’
}

bootJar {
enabled = false
}

Initially, I had added the Vaadin plugin manually:


id 'com.vaadin' version '24.3.7'

and also a vaadin {} block.

After that:

  • Vaadin tasks were missing

  • frontend generation failed

  • node_modules was not generated

I removed:

  • id 'com.vaadin'

  • the vaadin {} block

After cleanup, the build started failing with multiple Spring-related errors.

Main errors encountered:

Error 1


Could not read com.vaadin.flow.theme.Theme annotation
from class com.company.glos_v3_new.GLOSV3NewApplication

Caused by:
java.lang.NoClassDefFoundError:
org/springframework/context/ApplicationEventPublisherAware

Error 2


Execution failed for task ':bootBuildInfo'.
> org/springframework/core/CollectionFactory

Error 3


Could not create task ':bootBuildImage'.

Could not create task of type 'BootBuildImage'.

org/springframework/boot/buildpack/platform/io/TarArchive

Cannot load transformed entry:
instrumented-spring-boot-buildpack-platform-3.5.3.jar

Observations:

  • Logs previously showed mixed Vaadin versions (24.3.x and 24.7.x)

  • Spring Boot 3.5.3 artifacts appeared in Gradle cache even though project plugin version was different

  • It looks like Gradle transformed cache or dependency resolution became inconsistent

Actions already tried:

  • Removed Vaadin plugin completely

  • Removed vaadin {} block

  • Deleted project .gradle

  • Deleted build

  • Deleted global Gradle cache (C:\Users\user\.gradle)

  • Used --refresh-dependencies

  • Rebuilt project multiple times

Current issue:

  • Unable to build project successfully

  • WAR generation fails

  • Frontend preparation fails before completion

Questions:

  1. What is the officially recommended Spring Boot plugin version for Jmix 2.6.1?

  2. Should the org.springframework.boot plugin version be explicitly specified in Jmix projects?

  3. Is manual Vaadin plugin configuration supported/recommended in Jmix 2.6.1?

  4. Could Gradle 8.12.1 be incompatible with this setup?

  5. What is the correct way to generate a WAR file in Jmix 2.6.1 with Vaadin frontend support?

Build command used:


./gradlew clean build --refresh-dependencies

WAR command:


./gradlew bootWar

Take a look at the docs: https://docs.jmix.io/jmix/deployment/basic.html#bootWar

Regards,
Konstantin