According to a proposal described in RFC 0172 Declarative Services Annotations (page 187)?
3 Answers
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 (i.e. after the standard is actually published!), the old annotations will be deprecated and phased out.

- 23,743
- 4
- 44
- 77
-
thanks for reminding of bnd. the bnd annotations are different from RFC: some has more attributes, some are missing "standard" attributes. I asked Peter of this; the response was sort of "low priority / good enough already". so had to do it myself :-) – Andrei Pozolotin Mar 05 '12 at 02:14
-
thanks for reminding of bndtools. as I see it there are 3 kinds of osgi build madness: pom.xml-first; plugin.xml-first, bnd.bnd-first; I must stay with maven pom.xml, to take full advantage of jenkins. I can tolerate eclipse plugin.xml (thanks to tycho). But I can not see how can I use bndtools for that? – Andrei Pozolotin Mar 05 '12 at 02:20
-
Yes, bnd still has its old annotations, but it also supports the new standard annotations. It has done for several months at least. When did you ask Peter about it? – Neil Bartlett Mar 05 '12 at 02:20
-
`plugin.xml` is just a resource that goes into bundles. We can use bnd and Bndtools to build Eclipse plug-ins containing plugin.xml... in fact, I use Bndtools to develop Bndtools. We can also take full advantage of Jenkins through bnd as the offline builder (i.e. no necessity to use Maven). – Neil Bartlett Mar 05 '12 at 02:24
-
re: "supports the new standard annotations" I can see only old once supported in the source; can you please drop a link? – Andrei Pozolotin Mar 05 '12 at 02:33
-
re: "full advantage of Jenkins through bnd as the offline builder" - great news - can you please drop a link so I can study how you do this? – Andrei Pozolotin Mar 05 '12 at 02:34
-
Though bnd has support for the planned OSGi annotations, there are still some issues with it, so they are no useful yet since the spec is not finalized yet. Also, the bnd annotations support Metatype integration I also plan to keep the old annotations in there because I think there are easier to use and of course I do not want to hurt people using them. – Peter Kriens Mar 05 '12 at 13:26
-
Peter: @peter-kriens thank you for clarification; also: any chance you would include **Property** annotation in the RFC (like felix does, and carrot-garden as well)? I filed a bug @ osgi.org some time back, but there was no activity since. – Andrei Pozolotin Mar 05 '12 at 18:46
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.

- 6,662
- 4
- 37
- 57
-
hey, I was just trying to promote my own project! but thank you for the link; competition is good for business :-) – Andrei Pozolotin Mar 05 '12 at 02:09
One way to to work with new annotations would be:
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.

- 897
- 3
- 14
- 21
-
To [earcam](http://stackoverflow.com/users/573057/earcam), To [neil-bartlett](http://stackoverflow.com/users/318921/neil-bartlett): you guys both were very kind to respond here; can I ask for one more favor: you both have enough "privileges" to [create tags](http://stackoverflow.com/privileges/create-tags) here; can you please create one for me : **carrot-garden** : I want to use it for user support mail list on stack overflow, like [netty](http://stackoverflow.com/tags/netty/info) does; thank you. – Andrei Pozolotin Mar 05 '12 at 02:29