rkrzewski / bindex Goto Github PK
View Code? Open in Web Editor NEWThis project forked from osgi/bindex
OSGi Bundle Repository Indexer
License: Apache License 2.0
This project forked from osgi/bindex
OSGi Bundle Repository Indexer
License: Apache License 2.0
Right now Bindex is using it's own Resource, Requirement and Capability classes.
Migrate to org.osgi.resource to ease interop with org.osgi.service.respository implementations
it should use pull parsing model to allow asynchronous stream processing.
since we're on JDK 1.5 and javax.xml.stream (JSR-173) is not available, xmlpull (used by old bindex) is the preferred choice.
OSGi Core spec R5 defines in chapter 8.6 a number of attributes in osgi.identiy namespace that bindex does not support:
RFC112 defines in chapter 5.2.1 a number of Resource properties that overlap with those above to a large extent:
Looking at index files generated by maven-bundle-plugin, using old bindex, I can see that it puts presentationname attribute into tag, and presentationname and manifestversion attributes into 'bundle' capability. Those are not mentioned explicitly in RFC112 but have well known meaning
Some of the above properties have corresponding Manifest headers:
size is already supported by bindex 2 in osgi.content namespace, and source property is inherently incompatible. RFC112 mandates a mechanism based on URLs and OSGi Core R5 a mechanism based on requirements (see chapter 8.6.1)
I'm planning to use the headers mentioned in the last list above to define additional attributes in osgi.identiy namespace and include them into the indexes
current bindex API requires java.io.File. The changes to bindex v1 code incorporated into Nexus OBR plugin change the input data to be java.io.InputStream + metadata. This needs to be taken care of in the new API
Use case - multiple IndexReaders and / or RepositoryIndexers writing to a single RepositoryWriter
New bindex handles fragment-attachment:=never by not emitting osgi.wiring.host capabilty for the bundle. RFC112 dos not have a corresponding capability element, but requires in chapter 5.9.1 that this directive should be present in 'bundle' capability.
This directive is not visible in new bindex, so this needs to be rectified.
I've encountered an unwelcome complication with implementation of osgi.ee and osgi.wiring.host requirements. I had to parse and filter directives and rewrite them into other forms. You can see the unwieldy and brittle solution here
It would be much better if the analyzers stored the filters in an object form, and writers converted them to just before writing them out. Unfortunately filters are directives and Capability/Requirement store directives as Map<String,String>, so I don't see a way of fixing it from this end without introducing additional internal API beyond org.osgi.resource
An alternative would be writing a proper parser for filters with AST and Visitor pattern. The grammar is very simple so this should be easy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.