[ https://issues.apache.org/jira/browse/FELIX-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved FELIX-2275. ------------------------------------- Fix Version/s: maven-scr-plugin-1.4.4 Resolution: Fixed Thanks for your patch, Steven - I've applied it in revision 933567 > Component descriptor reference elements are not ordered > ------------------------------------------------------- > > Key: FELIX-2275 > URL: https://issues.apache.org/jira/browse/FELIX-2275 > Project: Felix > Issue Type: Bug > Components: Maven SCR Plugin > Affects Versions: maven-scr-plugin-1.4.2 > Reporter: Stephen Flynn > Assignee: Carsten Ziegeler > Fix For: maven-scr-plugin-1.4.4 > > Attachments: ExampleComponent.java, FELIX-2275.patch, > serviceComponents.xml > > > 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. > 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. > This appears to be caused by capturing references in a HashMap in the class > SCRDescriptorGenerator.java. Should probably be a LinkedHashMap instead. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira