-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support generation of eclipse-feature as resources #5805
Comments
Thanks. Did a quick scan. Overall questions:
Observations:
I think the details are not yet spelled out. This is not a big problem, the resource model should be powerful enough to handle these features, but I think it strengthens the case for a separate class and not do it in the ResourceBuilder itself. |
OSGi features might be inspired a bit by p2 features but ther is no releation at all
Storing eclipse-features in OSGi repository format
Thats not the problem of the generator I think (beside that bsn is bundle terminology I think you men OSGi identity)
This has nothing to do with P2 at all, P2 is a director and a repository format and here we talk about the feature.xml. If you like you can use parser classes I think Document is much more flexible as one can always transfor classes > document and vice versa,
Again, this has nothing to do with P2 so please forget everything you know about P2 here ;-)
I'm open to suggestions, so if it helps here why not? I'm only not completely sure where such a namespace definition should be hosted (e.g. pde or bnd or osgi ...)
It should point to a jar file the same as for a bundle (but will contain a feature.xml in the jar instead of a bundle-manifest)
At a first look it seems to match, but we can add these properties to the EclipseFeatureNamespace as well
Because that's how eclipse features work
These are dependencies that an installer would need to make sure is present before installing the feature
Feature have the properties I linked above if you like to se how a feature usually looks like you can take a look for example here: https://www.eclipse.org/downloads/download.php?file=/technology/m2e/releases/latest/features/org.eclipse.m2e.sdk.feature_2.4.0.20230827-1557.jar |
I was mixed P2/features, thanks for clearing up.
The responsibility is to keep the IdentityNamespace osgi.identity + version in the Identity namespace globally unique. You will have to do something here to get a name that does not map with bundles. Doesn't Eclipse have separate namespaces for these names?
It would be nice to host it at OSGi but for a starter we could do it in bnd since the ResourceBuilder is there now.
I guess you can add a requirement with the same properties as the Native Code but I do not think the platforms currently export that capability? This might be an extension for the OSGi to add these properties to the EE?
How do they differ from the bundle requirements? Will the management agent need to recognize these types of requirements? Don't you have to create namespaces for these requirements? There seems to be an implicit management agent that must provide some capabilities to handle the features. Just like the native properties, you might want to make that explicit in this mapping and not assume the proper management agent is going to be on the receiving end. I.e. if you require the management agent to handle FOO resources, you might want to add a requirement for handling FOO resources that is provided by the platform. We have the bundles and fragments implicit, but if we extend like this we might want to do it right. |
Eclipse has Plugins (bundles), Features and Products all of them can have an id that is equal as the type itself is enough to distinguish them. So for a repository having ID+VERSION+TYPE being unique would be sufficient for me and that's also what the spec says
As long as we get this working it would be fine with BND hosting it.
At least Equinox exports framework properties
They only differ in
|
@laeubi are you going to do anything with this issue? I'd like to close it and maybe move it to a (draft) PR |
Proposal
I'm currently in the process of transition Tycho/P2/PDE to using the the OSGi Resource/Repository API instead of the various legacy APIs.
While it is quite comfortable to transform a bundle into a
Resource
e.g. usingsomething similar is not possible for eclipse-features.
The general concept of Eclipse-Features is described here:
As sooner or later this will become prominent i'd like to suggest to add support to the BND ResourceBuilder so such features can be handled with maximum interoperability instead of risk having multiple competing implementations that slightly differ.
As a feature is just an XML document I would like to suggest the following signature for such a method:
This can now be used like this:
How to map eclipse-feature to resources
identity
Features essentially have a
id
aversion
like a bundle that acts as an identifier, what nicely maps to the osgi.identity Namespace and i suggest to usetype="org.eclipse.feature"
for this purpose. Some more general properties can be found here, where the following must not be supported:Vendor
,Branding Plug-in
,Update Site URL
,Update Site Name
as these are only relevant at runtime, while the others can be included as simple properties for informational purpose if desired.License information might be extracted as well but that optional I think as it is mostly important for display to the user at install time.
content
An eclipse-feature is the feature.xml packed as a jar file and probably additional files (e.g. properties, about.html, ...) so this jar serves as the osgi.content
capabilities
A feature only provides its identity as a capability and has no further capabilities attached to it
requirements
effective:=resolve
what is a strict version range to that specific version and will point to the others feature osgi.identity Namespaceeffective:=resolve
what is a strict version range to that specific version and would map to the osgi.wiring.bundle namespaceeffective:=active
and the equivalent osgi version rangeThe text was updated successfully, but these errors were encountered: