oups, I missed that point ! you are right: multi-components can be
specified in two ways:
1/
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
<scr:component enabled="true" name="Component1">
<scr:implementation class="test.ds.hello.HelloComponent"/>
<scr:reference name="logService"
interface="org.osgi.service.log.LogService" ...
</scr:component>
<scr:component enabled="true" name="Component2">
<scr:implementation class="test.ds.hello.HelloComponent"/>
<scr:reference name="logService"
interface="org.osgi.service.log.LogService" ...
</scr:component>
</components>
as well as:
2/
<?xml version='1.0' encoding='utf-8'?>
<component name="Component1">
<implementation class="test.ds.hello.HelloComponent"/>
<reference name="LOG" interface="org.osgi.service.log.LogService" ...
</component>
<component name=""Component2">
<implementation class="test.ds.hello.HelloComponent"/>
<reference name="LOG" interface="org.osgi.service.log.LogService" ...
</component>
I did not know the case 1/ and always used the case 2/
Thanks.
/pierre
Carsten Ziegeler wrote:
Pierre De Rop wrote:
I have created a new JIRA issue about that and have provided a patch.
Thanks, I've two comments :)
- Could you please provide the patch as an attachment of the bug?
- Afaik the "components" is allowed as the root element. But if you
want to have several component definitions inside this root element,
you have to use the scr namespace (see 112.4.1).
The SCR Plugin for instance, generates such a "components" root
element and this works without problems.
Carsten