-
Notifications
You must be signed in to change notification settings - Fork 138
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
Make the project OSGi compatible #15
base: trunk
Are you sure you want to change the base?
Conversation
This imports Bnd 4.3.0 and updates the build.xml script to produce OSGi manifests for each produced jar file (except for derbyrun, derbywar, and the locales jars). Currently, no attempt is made to reproduce the old Class-Path entries. These will be reconstructed when the locale jars have been upgraded to fragments. The Bundle-SymbolicName entries have been changed to match the JPMS module names, for consistency. Affects: https://issues.apache.org/jira/browse/DERBY-7056
This updates the build.xml script and Bnd configurations to add OSGi manifests to locale jars. Currently, no attempt is made to actually use these bundles, and no Class-Path entries have been added. Affects: https://issues.apache.org/jira/browse/DERBY-7056
This adds Fragment-Host headers for bundles, and refactors the build.xml file to improve the readability of the generation of bundles. Affects: https://issues.apache.org/jira/browse/DERBY-7056
This adds Class-Path attributes compatible with the existing 10.15.1.3 manifest headers. Affects: https://issues.apache.org/jira/browse/DERBY-7056
This removes the existing code from the BundleActivator, as per the discussion on DERBY-7056. Affects: https://issues.apache.org/jira/browse/DERBY-7056
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to download tools/java/biz.aQute.bnd-4.3.0.jar instead of checking it into the version control?
* | ||
|
||
Export-Package: \ | ||
org.apache.derby.agg, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if an Export-Package: org.apache.derby.*
would be sufficient here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for checking bnd into version control: I would normally never do this, but it seems that the project is already doing this for pretty much all of the build tools.
For Export-Package
: If I remember correctly, there are packages that are not exported by the JPMS module definition. Exporting a package with OSGi that's not exported by the VM's module definition will result in trouble, won't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, maybe there are reasons why these packages are omitted, it just feels a lot of maintenance need to keep them in sync, but maybe this is for historical reasons.
I think you are right about the checked in tools didn't noticed that, maybe it would be good to use https://ant.apache.org/ivy/ instead, but that's a little bit out of scope here.
Lets see what the maintainers think about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, maybe there are reasons why these packages are omitted, it just feels a lot of maintenance need to keep them in sync
Yep. What I'm hoping is that the OSGi/Bnd people will come up with a way to calculate OSGi package exports from existing JPMS descriptors (if descriptors are present). This would eliminate the duplication.
Having OSGi bundles would help our PathVisio project a lot. |
This set of commits makes the following changes:
.bnd
files instead of raw.mf
manifest files, with thebnd
tool expanding properties inside the.bnd
files to produce manifests which are then inserted into jar files directly.BundleActivator
class has essentially been eliminated; the class still exists but does nothing.