how to import osgi blueprint xml

Viewed 3694

I am trying to import an OSGI blueprint XML file in to another OSGi blueprint XML file.

e.g.: blueprint1.xml:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint ....>
    <bean id="myBean1" class="com.company.Class1"/>
    <bean id="myBean2" class="com.company.Class2"/>
</blueprint>
</xml>

blueprint2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint ....>
    <!-- DOES NOT WORK -->
    <import resource="blueprint1.xml" />
</blueprint>

The <import> works for spring but not for blueprint.

Does anybody know a way of doing this in OSGi blueprint XML files?

2 Answers
Related