blob: 53a6704b1fbb160badfc382432c784389101d2ee [file] [log] [blame]
{
"#": "A key that starts with a hash is a comment",
"id": "org.apache.sling:my.app:slingosgifeature:my-classifier:1.0",
"title": "A title for the feature. (optional)",
"description": "A description for the feature. (optional)",
"vendor": "The feature vendor, for example 'Apache Software Foundation'. (optional)",
"license": "The license of this feature file, for example 'ASL-2'. (optional)",
"location": "The location might be the location of the feature file or any other means identifying where the object is defined. (optional)",
"# A complete feature has no external dependencies": "(optional)",
"complete": true,
"# A final feature cannot be used as a prototype for another feature": "(optional)",
"final": false,
"# variables": "used in configuration and framework properties are substituted at launch time.",
"variables": {
"cfgvar": "somedefault",
"org.abc.xyz": "1.2.3",
"#": "When converting to provisioning model, if you need a special name",
"provisioning.model.name": ":boot"
},
"# A prototype is another feature that is used as a prototype for this one ":
"# Bundles, configurations and framework properties can be removed from the ",
"# prototype. Bundles with the same artifact ID defined in the feature override ":
"# bundles with this artifact ID in the Prototype",
"prototype":
{
"id": "org.apache.sling:some-other-feature:1.2.3",
"removals": {
"configurations": [],
"bundles": [],
"framework-properties": []
}
},
"# Requirements over and above the requirements in the bundles referenced by ":
"# feature.",
"requirements": [
{
"namespace": "osgi.contract",
"directives": {
"filter": "(&(osgi.contract=JavaServlet)(version=3.1))"
}
}
],
"# Capabilities over and above the capabilities provided by the bundles referenced ":
"# by the feature.",
"capabilities": [
{
"namespace": "osgi.implementation",
"attributes": {
"osgi.implementation": "osgi.http",
"version:Version": "1.1"
},
"directives": {
"uses": "javax.servlet,javax.servlet.http,org.osgi.service.http.context,org.osgi.service.http.whiteboard"
}
},
{
"namespace": "osgi.service",
"attributes": {
"objectClass:List<String>": "org.osgi.service.http.runtime.HttpServiceRuntime"
},
"directives": {
"uses": "org.osgi.service.http.runtime,org.osgi.service.http.runtime.dto"
}
}
],
"# Framework properties to be provided to the running OSGi Framework":"",
"framework-properties": {
"foo": 1,
"org.osgi.framework.storage": "${tempdir}",
"org.apache.felix.scr.directory": "launchpad/scr"
},
"# The bundles that are part of the feature. Bundles are referenced using Maven ":
"# coordinates and can have additional metadata associated with them. Bundles can ",
"# specified as either a simple string (the Maven coordinates of the bundle) or ":
"# as an object with 'id' and additional metadata.",
"bundles": [
{
"id": "org.apache.sling:security-server:2.2.0",
"hash": "4632463464363646436",
"#": "This is the relative start order inside the feature",
"start-order": 5
},
{
"id": "org.apache.sling:application-bundle:2.0.0",
"start-order": 10
},
{
"id": "org.apache.sling:another-bundle:2.1.0",
"#": "OSGi start level is also supported",
"start-level": 20,
"run-modes": ["oak-tar"]
},
"org.apache.sling:foo-xyz:1.2.3"
],
"# The configurations are specified following the format defined by the OSGi Configurator ":
"# specification: https://osgi.org/specification/osgi.cmpn/7.0.0/service.configurator.html ",
"# Variables declared in the variables section can be used for late binding of variables, ":
"# they can be specified with the Launcher, or the default from the variables section is used.",
"# Factory configurations can be specified using the named factory syntax, which separates ":
"# The factory PID and the name with a tilde '~'",
"configurations": {
"my.pid": {
"foo": 5,
"something-enabled": false,
"bar": "${cfgvar}",
"# The tempdir variable is not specified at the variables section.":
"# It needs to be provided at launch, otherwise the launch will stop.",
"tempdir": "${tempdir}",
"number:Integer": 7
},
"my.factory.pid~name": {
"a.value":"yeah"
}
}
}