Skip to content

Maven goal spring-boot:build-image runs package phase twice #26455

Closed
@alexey-anufriev

Description

@alexey-anufriev

In my project I have the front-end part in the same codebase. Consequently, I have a couple of calls to exec-maven-plugin to build the front-end. And as a very last step, I have build-image goal execution.

For some reason build-image triggers execution of the whole build cycle again:

...
[INFO] >>> spring-boot-maven-plugin:2.4.5:build-image (default) > package @ spring-boot-build-image-double-build >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ spring-boot-build-image-double-build ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ spring-boot-build-image-double-build ---
[INFO] 
...

The following project can be used to reproduce the problem: https://github.com/alexey-anufriev/spring-boot-build-image-double-build

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions