Hi Stephen, I think you understand 112.5.7 correctly and looking at the SCR Maven Plugin implementation, we use a map to store the references before they are written out - so we definitly loose the order; which is bad.
Therefore I think you found a bug; can you open a Jira issue (against the Maven SCR Plugin) please and maybe attach a simple example? Regards Carsten Stephen Flynn wrote > > Apologies if this is posted in the wrong place or this issue has already > been raised and I have missed it. > > We use SCR annotations (1.2.0) and the SCR Maven Plug-in (1.4.2) to > generate DS 1.1 component descriptors. All works well except for one > issue - we cannot find a way to control the order of <reference/> > elements in the generated descriptor through the @Reference annotation. > A cursory glance suggests that <reference/> elements generated by the > plug-in are not ordered in any way. > > As I understand it the order of binding is significant. From the 4.2 > Compendium spec.... > > *112.5.7 Binding Services* > > "When binding services, the references are processed in the order in which > they are specified in the component description. That is, target > services from > the first specified reference are bound before services from the next > specified > reference." > > We can work around this by manually creating descriptors but this is > sub-optimal for obvious reasons. > > Do we understand *112.5.7* correctly ? If so have we missed the way to > control reference ordering with the SCR Maven Plugin ? I can write this > up in more detail and provide a simple example if required. > > rgds, > > Steve F. > > -- Carsten Ziegeler [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

