blob: 29c67113752f52f6548f1a7b9eaadc39799a7a53 [file] [log] [blame]
A .subsystem-base jar file is produced from the sling provisioning model by the sling-maven-plugin as an intermediary file that is turned into a subsystem file .esa at runtime by the org.apache.sling.installer.factory.subsystems-base bundle. The actual content of the subsystem at runtime is determined by the current run mode. The transformer creates an .esa file that contains the right resources according to the current runmode.
A subsystem-base file is generated from features in the sling provisioning model of type osgi.subsystem.application, osgi.subsystem.composite or osgi.subsystem.feature. For example:
[feature name=mysubsystem type=osgi.subsystem.feature]
[:subsystem-manifest startLevel=20]
Subsystem-Description: Extra subsystem headers can go here
Subsystem-Copyright: (c) 2015 for example
[artifacts]
com.foo.bar/bundle/1
[artifacts startLevel=10]
com.foo.bar/bundle1/1.2.3
com.foo.bar/bundle2/1.0.0
[artifacts startLevel=15 runModes=myrunmode]
com.foo.bar/bundle3/0.0.1
The above provisioning model description will generate a mysubsystem.subsystem-base jar file. The bundles in the subsystem will *all* have start level 20, from the startLevel in the :subsystem-manifest section. The mysubsystem.subsystem-base file will be placed in the install/20/mysubsystem.subsystem-base location of the generated sling-maven-plugin generated slingstart artifact. The startLevel attribute on the artifacts section are transformed into start-order attributes on the Subsystem-Content header.
The generated mysubsystem.subsystem-base file will have the following content:
META-INF/MANIFEST.MF
Potential_Bundles/0/bundle-1.jar
Potential_Bundles/10/bundle1-1.2.3.jar
Potential_Bundles/10/bundle2-1.0.0.jar
Potential_Bundles/15/bundle3-0.0.1.jar
SUBSYSTEM-MANIFEST-BASE.MF
readme.txt (this file).
The META-INF/MANIFEST.MF file contains information about which resources should be deployed based on runmode. There is a special identifier _all_ which lists resources that should be deployed in all runmodes.
The Potential_Bundles locations hold the actual resources in directories that denote their start-order.
The SUBSYSTEM-MANIFEST-BASE.MF file is used as the basis for the OSGI-INF/SUBSYSTEM.MF file in the .esa file. The Subsystem-SymbolicName, Subsystem-Type, Subsystem-Version and Subsystem-Content are automatically generated. Additional headers listed under the [:subsystem-manifest] section are added to the ultimate SUBSYSTEM.MF. The Subsystem-Content is generated by the SubsystemBaseTransformer based on the current runmode.
This file is included in the .subsystem-base file as a readme as this is not a common file format.