Hi,

no interfaces are not supported for configuration, only annotations. Main reason is the support of default values for configuration properties.

But you can pass in more arguments into the activate method, so instead of having a base interface C and lets say two configuration interface C1 and C2 inheriting from C, you specify three annotations C, C1 and C2 where C1 and C2 only have the additional properties. In your activate method you can then have two arguments C and C1 for one component and C and C2 for the other component.

Regards
Carsten

Am 07.11.2018 um 11:53 schrieb João Assunção via osgi-dev:
Hello all,

I have two components where the configuration shares a couple of attributes. To avoid duplication, and because Java doesn't allow annotations to be extended, I changed the configuration annotations to interfaces.
When building, bnd-maven-plugin fails with the following error message:

Non annotation argument to lifecycle method with descriptor I checked the specs and @ObjectClassDefinition can be applied to an interface type.

Thank you
João

Email: [email protected] <mailto:[email protected]>
Mobile: +351 916968984
Phone: +351 211933149
Web: www.exploitsys.com <http://www.exploitsys.com>



_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev


--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to