Hi Carsten, Thank you for the clarification and the tip. I assumed the framework would use the defaults provided in @AttributeDefinition when using an interface for configuration.
Regards, João Assunção Email: joao.assun...@exploitsys.com Mobile: +351 916968984 Phone: +351 211933149 Web: www.exploitsys.com On Wed, Nov 7, 2018 at 11:00 AM Carsten Ziegeler <cziege...@apache.org> wrote: > 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: joao.assun...@exploitsys.com <mailto:joao.assun...@exploitsys.com > > > > Mobile: +351 916968984 > > Phone: +351 211933149 > > Web: www.exploitsys.com <http://www.exploitsys.com> > > > > > > > > _______________________________________________ > > OSGi Developer Mail List > > osgi-dev@mail.osgi.org > > https://mail.osgi.org/mailman/listinfo/osgi-dev > > > > -- > Carsten Ziegeler > Adobe Research Switzerland > cziege...@apache.org >
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev