Combine application and resources layers into a single layer
Closes gh-20562
This commit is contained in:
@@ -102,11 +102,10 @@ By default, the following layers are created:
|
||||
|
||||
* `dependencies` for any dependency whose version does not contain `SNAPSHOT`.
|
||||
* `snapshot-dependencies` for any dependency whose version contains `SNAPSHOT`.
|
||||
* `resources` for static resources at the default locations, i.e. `META-INF/resources/`, `resources/`, `static/`, `public/`.
|
||||
* `application` for any other classes and resources.
|
||||
* `application` for application classes and resources.
|
||||
|
||||
The layers order is important as it determines how likely previous layers can be cached when part of the application changes.
|
||||
The default order is `dependencies`, `snapshot-dependencies`, `resources`, and `application`.
|
||||
The default order is `dependencies`, `snapshot-dependencies`, and `application`.
|
||||
Content that is least likely to change should be added first, followed by layers that are more likely to change.
|
||||
|
||||
|
||||
@@ -149,7 +148,6 @@ The following example shows what the implicit layer configuration described abov
|
||||
<layers>
|
||||
<layer>dependencies</layer>
|
||||
<layer>snapshot-dependencies</layer>
|
||||
<layer>resources</layer>
|
||||
<layer>application</layer>
|
||||
</layers>
|
||||
<libraries>
|
||||
@@ -165,14 +163,6 @@ The following example shows what the implicit layer configuration described abov
|
||||
</layer-content>
|
||||
</libraries>
|
||||
<application>
|
||||
<layer-content layer="resources">
|
||||
<locations>
|
||||
<include>META-INF/resources/**</include>
|
||||
<include>resources/**</include>
|
||||
<include>static/**</include>
|
||||
<include>public/**</include>
|
||||
</locations>
|
||||
</layer-content>
|
||||
<layer-content layer="application">
|
||||
<locations>
|
||||
<include>**</include>
|
||||
@@ -184,7 +174,7 @@ The following example shows what the implicit layer configuration described abov
|
||||
|
||||
Each `layer-content` element defines a strategy to include or exclude an entry of the jar in a layer.
|
||||
When an entry matches a strategy, it is included in the layer and further strategies are ignored.
|
||||
This is illustrated by the `dependencies` and `application` layers that have a "catch-all" include filter used to add any libraries or classes that were not processed by previous strategies.
|
||||
This is illustrated by the `dependencies` layer that has a "catch-all" include filter used to add any libraries that were not processed by previous strategies.
|
||||
|
||||
The content of a `libraries` layer can be customized using filters to `include` or `exclude` based on the dependency coordinates.
|
||||
The format is `groupId:artifactId[:version]`.
|
||||
|
||||
Reference in New Issue
Block a user