commit | 31a2d80f60e24cfaccafc3c102a64217870cdfab | [log] [tgz] |
---|---|---|
author | David Bosschaert <bosschae@adobe.com> | Thu Feb 07 20:40:17 2019 -0800 |
committer | David Bosschaert <bosschae@adobe.com> | Thu Feb 07 20:40:17 2019 -0800 |
tree | aa28d725af8dfb915c6011626ec42ff71dcec1b9 | |
parent | 32658274b17cb52a7f6285d49e2c95d4ba2a2a55 [diff] |
Write properties files to location with feature name This applies to the following files: bundles.properties, features.properties, idbsnver.properties and regions.properties The files are now written to a directory with the name of the feature that they are generated from. This to avoid files overwriting each other when this process is invoked multiple times for different features.
This component contains extensions relating to the API Regions component. The following extensions are registered via the ServiceLoader mechanism:
org.apache.sling.feature.builder.MergeHandler
Merge handlers are called when features are merged during the aggregation process.
APIRegionMergeHandler
- This handler knows how to merge API Regions extensions and adds the org-feature
key to the api-regions
sections to record what feature this section originally belonged.
org.apache.sling.feature.builder.PostProcessHandler
PostProcessHandlers are called when a feature contains an api-regions
section.
BundleMappingHandler
- This handler creates a mapping file idbsnver.properties
that maps the Artifact ID to a bundle symbolic name and version. A tilde ~
is used in the value of the map to separate BSN and version.
BundleArtifactFeatureHandler
- This handler creates 3 mapping files:
bundles.properties
: maps bundles to the original feature they were in. A bundle could be from more then one feature.features.properties
: maps features to regions. A feature can be in more than one region.regions.properties
: maps regions to packages. A region can expose more than one package.The location of the files created by the BundleArtifactFeatureHandler
handler is stored in a system property with name apiregions.
+ filename. So to obtain the file name of the bundles.properties
file, make the following call:
System.getProperty("apiregions.bundles.properties")