When building my Vaadin-based application using mvn clean verify -Pproduction I am getting the following error:
...
INFO] --- vaadin:25.1.6:build-frontend (default) @ kis-monitoring ---
[INFO] Scanning classes to find frontend configurations and dependencies...
[INFO] Visited 2171 classes. Took 2317 ms.
[INFO] Checking if a production mode bundle build is needed
[INFO] A production mode bundle build is not needed
[WARNING] Found dependencies defined with different versions in project and Vaadin maven plugin.
Project dependencies are used, but plugin execution could fail if the versions are incompatible.
In case of build failure please analyze the project dependencies and update versions or configure exclusions for potential offending transitive dependencies.
You can use 'mvn dependency:tree -Dincludes=groupId:artifactId' to detect where the dependency is defined in the project.
tools.jackson.core:jackson-core:jar: project version [3.1.0], plugin version [3.1.2]
tools.jackson.core:jackson-databind:jar: project version [3.1.0], plugin version [3.1.2]
com.vaadin:license-checker:jar: project version [3.0.2], plugin version [3.0.1]
commons-io:commons-io:jar: project version [2.17.0], plugin version [2.21.0]
org.apache.commons:commons-text:jar: project version [1.12.0], plugin version [1.15.0]
org.apache.commons:commons-lang3:jar: project version [3.19.0], plugin version [3.20.0]
jakarta.xml.bind:jakarta.xml.bind-api:jar: project version [4.0.4], plugin version [3.0.1]
jakarta.validation:jakarta.validation-api:jar: project version [3.1.1], plugin version [3.0.2]
org.springframework.data:spring-data-commons:jar: project version [4.0.4], plugin version [4.0.5]
org.springframework:spring-beans:jar: project version [7.0.6], plugin version [7.0.7]
org.springframework:spring-core:jar: project version [7.0.6], plugin version [7.0.7]
commons-logging:commons-logging:jar: project version [1.3.6], plugin version [1.3.5]
[ERROR] The build process encountered an error: Could not execute build-frontend goal Error occured during goal execution: Failed to unpack 'U:\Documents\eclipse\workspace_Vaadin\KIS-Monitoring\src\main\bundles\prod.bundle'Please run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace. Failed to unpack 'U:\Documents\eclipse\workspace_Vaadin\KIS-Monitoring\src\main\bundles\prod.bundle' Entry is outside of the target dir: config/bundle-size.html
[ERROR] To diagnose the issue, please re-run Maven with the -X option to enable detailed debug logging and identify the root cause.
I am not sure whether the reported mismatching versions in project and Vaadin maven plugin might be the reason for the later issue or not.
What I find odd is that the plugin first comes to the conclusion “A production mode bundle build is not needed” but then has issues to unpack “U:\Documents\eclipse\workspace_Vaadin\KIS-Monitoring\src\main\bundles\prod.bundle”.
What could be wrong here?
This is the setup that I am using to build:
U:\Documents\eclipse\workspace_Vaadin\KIS-Monitoring> mvn --version
JAVA_HOME: 'C:\Program Files\Eclipse Adoptium\jdk-25.0.3.9-hotspot\'
JAVACMD: 'C:\Program Files\Eclipse Adoptium\jdk-25.0.3.9-hotspot\\bin\java.exe'
Apache Maven 3.9.14 (996c630dbc656c76214ce58821dcc58be960875b)
Maven home: C:\Program Files\Apache\apache-maven
Java version: 25.0.3, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-25.0.3.9-hotspot
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
U:\Documents\eclipse\workspace_Vaadin\KIS-Monitoring>
Note that even though this is an Eclipse project directory the build is done on the command line as shown, so Eclipse has nothing to do with this here.