Skip to content

[CORE] Allow Fragment Bundles #344

@nickgaray

Description

@nickgaray

Currently all bundles are being registered and started. We need to allow fragment bundles to be registered but this type of bundle does not require activation as it contributes functionality to a host bundle

This is an example of an osgi closure in a module that contributes custom forms to sensorhub-web-ui-core

osgi {
    manifest {
        attributes('Bundle-Vendor': 'Botts Innovative Research, Inc.')
        attributes('Bundle-SymbolicName': 'com.botts.ui.datafeed')
        attributes('Bundle-Version': version)

        // THIS is the important part:
        attributes('Fragment-Host': 'org.sensorhub.sensorhub-webui-core')

        attributes('-dsannotations': 'false')
        attributes('Export-Package': '')
        attributes('Import-Package': '*;resolution:=optional')
    }
}

In order to satisfy this SensorHubOSGi needs to skip attempting to start bundles that have the Fragment-Host attribute

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions