Skip to content

Update SensorHubOsgi.java#345

Merged
alexrobin merged 1 commit intomasterfrom
344-core-allow-fragment-bundles
Apr 10, 2026
Merged

Update SensorHubOsgi.java#345
alexrobin merged 1 commit intomasterfrom
344-core-allow-fragment-bundles

Conversation

@nickgaray
Copy link
Copy Markdown
Collaborator

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

Allow registration of fragment bundles without requiring they be started
@nickgaray nickgaray linked an issue Apr 8, 2026 that may be closed by this pull request
@nickgaray nickgaray requested review from alexrobin and earocorn April 8, 2026 13:51
@alexrobin alexrobin merged commit ae5ac96 into master Apr 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CORE] Allow Fragment Bundles

2 participants