简体   繁体   中英

How to Use New OSGi Declarative Services Annotations?

根据RFC 0172声明性服务注释(第187页)中描述的提议?

The annotations are supported by bnd and Bndtools . They are used to generate the component XML declarations at build time.

Update: Yes, bnd does support the new standard annotations, in addition to its older set of annotations. In time (ie after the standard is actually published!), the old annotations will be deprecated and phased out.

The author of this post has this project , and there's also this https://github.com/javakontor/OSGi-Service-Component-Annotation-Processor .

Might be better off asking back on FELIX-3170 or FELIX-3171 ? As (AFAIK) it's still a draft, so full compliant implementations will be scarce.

One way to to work with new annotations would be:

CarrotGarden SCR

CarrotGarden SCR is a combination of plugins that provides OSGI Service-Component descriptor generator according to the RFC 0172. It allows for interactive component descriptor updates in eclipse which will be compatible with your non-interactive jenkins maven builds. Fast, incremental, single descriptor per component. You can see how your descriptors are built in the eclipse maven console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM