The @Component annotation is not a runtime annotation so I am not sure why a JPMS module with classes annotated with @Component (or other Declarative Service annotations) would need a requirement on another module that exports the package org.osgi.service.component.annotations. That package should not be needed at all at runtime.
Tom
----- 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 4: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
attcomgf.dat
Type: application/pgp-signature
Name: attcomgf.dat_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
attbe1zt.dat
Description: Binary data
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev