Can you have JSF custom components in different OSGi bundles?

本秂侑毒 提交于 2019-12-04 15:38:26

It is possible in the following way:

  • Your web osgi bundle has to have "Require-Bundle" in MANIFEST.MF pointing to the bundle that contains the components
  • Your component jar has to have Export-Package containing META-INF and subpackages of META-INF where there is any JSF related file (and of course standard packages of the component). For example: Export-Package: META-INF,META-INF.resources...

If you use maven-bundle plugin you must use an apostrophe and an equal for exporting META-INF and sub-packages. For example:

<Export-Package>
  a.b.c,
  '=META-INF',
  '=META-INF.resources',
  ...
</Export-Package>

In JSF Spec 2.2 there might be parts about JSF-OSGI relationship. To see the progress see http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-942

I am not sure it does exactly answer your problem, but I found this thread about Spring and osgi interresting, especially this specific answer where dependencies and classpath are bundled in the MANIFEST.MF.

That thread also leads to the update of this for tutorial about Spring Dynamic Modules (DM) for OSGi™ Service Platforms which may also be of interest.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!