[ 
https://issues.apache.org/jira/browse/DERBY-7056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16992627#comment-16992627
 ] 

Mark Raynsford commented on DERBY-7056:
---------------------------------------

I've attached a patch that applies against the current svn trunk, but it has a 
serious problem: svn appears to have no way to include binary files in patches, 
and that's exactly what we need to do in order to include the `bnd` jar that 
the patch references.

 [^complete0.diff]

I used the `biz.aQute.bnd-4.3.0.jar` available from Maven Central with SHA256 
`e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`.

The summary of my changes is as follows:

{noformat}
All jar manifests are now generated using the Bnd tool instead 
of the ant "manifest" task. The new manifests contain a superset
of the information in the old manifests with the addition of OSGi
headers. This is achieved by using .bnd files instead of raw .mf 
manifest files, with the bnd tool expanding properties inside the .bnd
files to produce manifests which are then inserted into jar files
directly. The calls to the "manifest" task in the build.xml file
are instead replaced with executions of the Bnd command-line tool,
using configuration files given in the bnd/ subdirectory. Currently,
there is exactly one .bnd configuration file per jar file produced,
with each configuration file resulting in a corresponding .mf file
for insertion into the respective jar.

The locale jars now have manifest headers that allow them to act as 
OSGi "fragments". A fragment, in OSGi terms, more or less acts like
an extension to an existing jar file. Primarily, this is used to
introduce locale-specific string resources into an existing jar.

The existing BundleActivator class has essentially been eliminated; 
the class still exists but does nothing. This may be replaced at
a later date.
{noformat}


> Make Derby modules usable by OSGi-aware applications
> ----------------------------------------------------
>
>                 Key: DERBY-7056
>                 URL: https://issues.apache.org/jira/browse/DERBY-7056
>             Project: Derby
>          Issue Type: Task
>          Components: Build tools
>    Affects Versions: 10.15.1.3
>            Reporter: Richard N. Hillegas
>            Assignee: Richard N. Hillegas
>            Priority: Major
>         Attachments: 0001-Initial-production-of-OSGi-manifests.patch, 
> 0002-Initial-production-of-OSGi-manifests-for-locales.patch, 
> 0003-Produce-working-locales-fragments-and-refactor.patch, 
> 0004-Reintroduce-Class-Path-attributes.patch, 
> 0005-Clear-BundleActivator.patch, complete0.diff, derby.txt
>
>
> OSGi R7 introduced support for JPMS modules in 2018 according to 
> https://blog.osgi.org/2018/02/osgi-r7-highlights-java-9-support.html. This 
> includes additional information which goes into jar file manifests. Support 
> for this OSGi information was requested by an email thread on the user list: 
> http://apache-database.10148.n7.nabble.com/OSGi-manifest-headers-td150560.html.
>  We need advice from OSGi experts on how to make Derby modules usable by 
> OSGi-aware applications. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to