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

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

My thinking is that, as you're already JPMS modularized, you've done the hard 
work already in terms of avoiding split packages and determining which packages 
are be exported and which aren't.

I understand that there may be some classloader issues that are an unfortunate 
side effect of the way the JDBC API tends to work. There are projects to work 
around these problems such as [Pax 
JDBC|https://github.com/ops4j/org.ops4j.pax.jdbc]. I've asked on the Ops4j list 
to see if anyone will come and look at this ticket and make suggestions. They 
have an integration for Derby, but it's for an older version so they would 
presumably be affected by the sudden lack of OSGi headers.

What's not clear to me yet is how we'd best go about fitting in OSGi manifest 
generation to your build system. I notice that you're using Ant for the build, 
but also have a set of Maven POM files presumably for publishing to Central. 
Instinctively, I would try to use the Bnd tool to generate manifests for your 
existing jar, calling it from Ant so that you get manifests generated at the 
earliest possible step in the build. An approach is documented here:

[Wrapping Libraries To OSGi 
Bundles|https://bnd.bndtools.org/chapters/390-wrapping.html]

I can try to take a shot at this over the weekend.

> 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
>            Priority: Major
>
> 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