0

I need to load a component defition (xml file) from outside the jar (bundle).

I've tried to put it under:

  • plugins/my.bundle.name/OSGI-INF/mycomponent.xml
  • plugins/OSGI-INF/mycomponent.xml

And i've played with bundle's classpath too, with no luck.

1 Answers1

0

Declarative Services requires the component description XML to be part of the bundle or any of its attached fragments. The Service-Component header in the bundle's manifest must reference the entry name(s) of the XML file(s).

BJ Hargrave
  • 9,324
  • 1
  • 19
  • 27
  • Ok, but is it impossible to have the component description outside the jar? – user2451444 Oct 01 '13 at 17:08
  • It can also be in an attached fragment. But it cannot be somewhere other than a place that is searched by [Bundle.findEntries](http://www.osgi.org/javadoc/r5/core/org/osgi/framework/Bundle.html#findEntries(java.lang.String,%20java.lang.String,%20boolean)). See 112.4.2 in the spec. – BJ Hargrave Oct 01 '13 at 19:58