> 
> On 22 Mar 2018, at 15:18, Mark Raynsford via osgi-dev 
> <osgi-dev@mail.osgi.org> wrote:
> 
> On 2018-03-22T13:18:18 +0000
> "BJ Hargrave" <hargr...@us.ibm.com> wrote:
> 
>> 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 :-)
>> --
> 
> That's a shame. It essentially means that it's not possible to write
> code that both uses/declares declarative services and that will also be
> usable as a JPMS module - unless you're willing to live with tools
> telling you not to publish your artifacts. I'm not: I'd become used to
> ignoring the problem due to OSGi dependencies and then would miss real
> warnings when they happen.

I have to agree with Mark here. Not having Automatic-Module-Name in the JAR 
files effectively makes them unusable to developers in the JPMS world since 
tools will either reject or strongly discourage (and perhaps eventually reject) 
these artifacts.

While it’s true we are in the business of making OSGi bundles and not JPMS 
modules, OSGi has long delivered artifacts that are usable without an OSGi 
Framework. The compile-only annotations for example, or the Promises library. 
We should always try to make it easy for people to ease into OSGi, rather than 
forcing them to adopt it all at once.

I agree that it would be impossible to do anything for R7. I hope we look at 
this for R8. In the meantime I expect that somebody will have to repackage the 
official artifacts to add an Automatic-Module-Name manifest header.

Neil


> 
> -- 
> Mark Raynsford | http://www.io7m.com
> 
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

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

Reply via email to