Skip to content

Conversation

@timothyjward
Copy link
Contributor

This commit adds a utility extension which can be used to replace the manifest of a Feature Bundle being installed. This can be used, for example, to dynamically add a manifest to an artifact which isn't an OSGi bundle, or to correct some metadata.

@timothyjward timothyjward force-pushed the feature/replace branch 2 times, most recently from 0a2a051 to c9b9df4 Compare April 29, 2025 15:15
This commit adds a utility extension which can be used to replace the manifest of a Feature Bundle being installed. This can be used, for example, to dynamically add a manifest to an artifact which isn't an OSGi bundle, or to correct some metadata.

Signed-off-by: Tim Ward <timothyjward@apache.org>
"bundles": [
{
"id": "org.eclipse.osgi.technology.featurelauncher.extensions.manifest.replacer.test:test-bundle:0.0.1",
"eclipse.osgi.technology.manifest.replacer.Bundle-ManifestVersion": "2",
Copy link
Contributor

@stbischof stbischof Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manifest.replacer" : {
"Bundle-ManifestVersion": 2",
...
}

Or altenative write it full

manifest.replacer" : [
"Line1",
"Line2"
]

Or would this be better in a handler that add/Override files in general on a give path.?
Aso with an base64 option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manifest.replacer" : { "Bundle-ManifestVersion": 2", ... }

Or altenative write it full

manifest.replacer" : [ "Line1", "Line2" ]

Both of these would violate the Feature specification

"Bundle metadata supports string keys and string, number or boolean values."

This is the reason for having a prefix. It's not pretty, but it stays within the specification.

Or would this be better in a handler that add/Override files in general on a give path.? Aso with an base64 option?

I don't think we want to add additional files into the mix. The point of a feature is that it is a single document describing the deployment. If we add an extra file then we'll need to work out how to keep that alongside the feature document.

Copy link
Contributor

@stbischof stbischof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some thoughts

timothyjward and others added 2 commits June 10, 2025 09:30
Use a more meaningful name in the test Feature JSON file
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

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.

3 participants