The current error message when running spring-boot:build-image
with a war packaged project is:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.1:build-image (default-cli) on project demo: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.4.1:build-image failed: Source must refer to an existing file, got .../demo/target/demo-0.0.1-SNAPSHOT.jar`
which doesn't make it clear that war packing is the root cause of the error.
The documentation should also state more clearly that spring-boot:build-image
is not supported with war packaging.