commit | 6733b734f52b2d3fc691883b0ad105a9fadb6667 | [log] [tgz] |
---|---|---|
author | Robert Munteanu <rombert@apache.org> | Thu Oct 12 19:09:17 2023 +0200 |
committer | Robert Munteanu <rombert@apache.org> | Thu Oct 12 19:09:17 2023 +0200 |
tree | e932082c32809bf2e4c07e4fd7e5ccb5be0254f6 | |
parent | 6a005388614b5e62a3fc37848bcc00a4a34841b5 [diff] |
SLING-12094 - Use GitHub for the Maven scm.url value
This is a simple OSGi service which is able to convert, given a BundleContext
instance, a currently running OSGi container to an Apache Sling Feature Model definition.
APIs are really simple: it is necessary first to obtain the RuntimeEnvironment2FeatureModel
instance from the OSGi Service Registry, then
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature runtimeFeature = generator.getRunningFeature();
Currently version will include in the generated Feature Model bundles
and configurations
only, which are the only informations that can be extracted from a BundleContext
instance.
The RuntimeEnvironment2FeatureModel
OSGi service is also able to retrieve the (assembled) Feature used to launch the platform:
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature launchFeature = generator.getLaunchFeature();
## Upgrade Feature
The RuntimeEnvironment2FeatureModel
OSGi service is also able to compute the upgrade Feature which prototypes from the Feature used to launch the platform and that targets the runtime Feature:
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature launchFeature = generator.getLaunch2RuntimeUpgradingFeature();
Finally, the RuntimeEnvironment2FeatureModel
OSGi service is also able to compute the real runtime Feature which is assembled from the Feature used to launch the platform and that targets the runtime Feature:
import org.apache.sling.feature.r2f.*; @Reference RuntimeEnvironment2FeatureModel generator; ... Feature launchFeature = generator.getLaunch2RuntimeUpgradingFeature();