Skip to content

Move multi-modules output to a lower layer #23003

@dodgex

Description

@dodgex

Hey there,

I'm currently working with the new layered jar feature that came with spring boot 2.3. While it is awesome I wonder if a small change would be worth a consideration.

At the moment the default layers in my project are

  • dependencies
  • spring-boot-loader
  • snapshot-dependencies
  • application

In https://spring.io/blog/2020/01/27/creating-docker-images-with-spring-boot-2-3-0-m1 it is stated that the layers are sorted top to down on how likely they are to change. But I personally see one problem here. When you are in a multi module project the dependencies that are generated from another module, like some kind of shared or model module should not be in the top layer (dependencies) but more likely in the application layer.

I know one could move those dependencies with custom layer configuration but I think this should be somehow done by default as it kind of breaks this feature having part of the project that is likely in the dependencies layer that should barely change.

Metadata

Metadata

Assignees

Labels

status: declinedA suggestion or change that we don't feel we should currently apply

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions