The R7 final API jars are already built and ready for release to Maven Central once the OSGi members approve the specifications as final (ETA mid April). These jars do not have Automatic-Module-Name manifest entries in them. Just adding that is only a partial step. Unless you also test those jars in module-path mode, you have no idea how/if they will work. See http://blog.joda.org/2018/03/jpms-negative-benefits.html for some discussion of this. At this point, I don't see OSGi adding Automatic-Module-Name manifest entries to any of its artifacts since, of course, OSGi is making OSGi bundles and not JPMS modules :-)
--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
 
 
----- Original message -----
From: Mark Raynsford via osgi-dev <osgi-dev@mail.osgi.org>
Sent by: osgi-dev-boun...@mail.osgi.org
To: osgi-dev@mail.osgi.org
Cc:
Subject: [osgi-dev] JPMS modularization for various OSGi artifacts
Date: Wed, Mar 21, 2018 5:39 PM
 
Hello!

Let's say I'm writing a library that I want to use both on OSGi and in
a Java 9 modular context. I write various classes and annotate them
with the standard @Component annotations for declarative services. I
then go to write a module-info.java so that my code can also act as a
Java 9 module... Uh oh, the @Component annotations are declared in a
jar that doesn't provide a module-info.class file and doesn't declare
an Automatic-Module-Name field in the jar manifest:

  http://blog.joda.org/2017/05/java-se-9-jpms-automatic-modules.html

With OSGi R7 looming, is there any intention to add at least
Automatic-Module-Name entries in the various OSGi jars published to
Central? This would allow us to write libraries that are good citizens
in both worlds.

--
Mark Raynsford | http://www.io7m.com

 

 

Document Iconatth838c.dat Type: application/pgp-signature
Name: atth838c.dat
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
 

Attachment: att8vz4e.dat
Description: Binary data

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to