Rename "classes" to "application" in custom layer configuration

Closes gh-20539
This commit is contained in:
Madhura Bhave
2020-03-23 09:08:18 -07:00
parent 29c89f3c27
commit 952e529787
12 changed files with 27 additions and 26 deletions

View File

@@ -164,7 +164,7 @@ The following example shows what the implicit layer configuration described abov
</coordinates>
</layer-content>
</libraries>
<classes>
<application>
<layer-content layer="resources">
<locations>
<include>META-INF/resources/**</include>
@@ -178,7 +178,7 @@ The following example shows what the implicit layer configuration described abov
<include>**</include>
</locations>
</layer-content>
</classes>
</application>
</layers-configuration>
----
@@ -589,9 +589,9 @@ This allows to reuse the cache for external dependencies when an internal depend
</coordinates>
</layer-content>
</libraries>
<classes>
<application>
...
</classes>
</application>
</layers-configuration>
----

View File

@@ -20,7 +20,7 @@
</coordinates>
</layer-content>
</libraries>
<classes>
<application>
<layer-content layer="configuration">
<locations>
<include>**/application*.*</include>
@@ -31,5 +31,5 @@
<include>**</include>
</locations>
</layer-content>
</classes>
</application>
</layers-configuration>

View File

@@ -71,7 +71,7 @@ public class CustomLayersProvider {
(StrategyFactory<LibraryFilter, LibraryStrategy>) FilteredLibraryStrategy::new,
CoordinateFilter::new, "coordinates"::equals));
}
if ("classes".equals(nodeName)) {
if ("application".equals(nodeName)) {
resourceStrategies.addAll(getStrategies(contents,
(StrategyFactory<ResourceFilter, ResourceStrategy>) FilteredResourceStrategy::new,
LocationFilter::new, "locations"::equals));

View File

@@ -8,7 +8,7 @@
<xsd:sequence>
<xsd:element type="layersType" name="layers"/>
<xsd:element type="librariesType" name="libraries" minOccurs="0"/>
<xsd:element type="classesType" name="classes" minOccurs="0"/>
<xsd:element type="applicationType" name="application" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="layersType">
@@ -48,25 +48,25 @@
</xsd:sequence>
<xsd:attribute type="xsd:string" name="layer" use="required"/>
</xsd:complexType>
<xsd:complexType name="classesType">
<xsd:complexType name="applicationType">
<xsd:annotation>
<xsd:documentation><![CDATA[
Strategies that should be applied to classes. If no strategies are defined, a single
Strategies that should be applied to application classes and resources. If no strategies are defined, a single
"application" layer is created out-of-the-box.
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice maxOccurs="unbounded">
<xsd:element type="classesLayerContentType" name="layer-content" maxOccurs="unbounded"
<xsd:element type="applicationLayerContentType" name="layer-content" maxOccurs="unbounded"
minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
Strategy to apply on classes.
Strategy to apply on application classes and resources.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="classesLayerContentType" mixed="true">
<xsd:complexType name="applicationLayerContentType" mixed="true">
<xsd:sequence>
<xsd:element type="filterType" name="locations" minOccurs="0"/>
</xsd:sequence>

View File

@@ -27,7 +27,7 @@
</coordinates>
</layer-content>
</libraries>
<classes>
<application>
<layer-content layer="my-resources">
<locations>
<include>META-INF/resources/**</include>
@@ -43,5 +43,5 @@
<include>**</include>
</locations>
</layer-content>
</classes>
</application>
</layers-configuration>

View File

@@ -5,7 +5,7 @@
<layers>
<layer>my-layer</layer>
</layers>
<classes>
<application>
<layer-content layer="my-layer"/>
</classes>
</application>
</layers-configuration>