How to use the JSF extension library as an OSGI package

I want to use the Primefaces library as an osgi package in a JSF application. I created a WAB package with JSF pages. I also used promefaces.jar as an OSGI package. I saw in the primefaces.jar file that the MANIFEST file exports packages for visibility to other packages. The question is, how can I use perffaces tags in a WAB package? I'm sure I need to add the configuration to the POM.xml file, but I'm not sure how to do this.

I successfully tested to enable simplefaces.jar in WAB by putting the .jar file in the WEB-INF / lib directory, but I want to use Primefaces as an OSGI resource not as a jar resource in the WEB-INF / lib directory.

+5
source share
2 answers

You need to copy and paste the tag declaration into a file primefaces-p.taglib.xml, and also familiarize yourself with this tutorial on how to create your own tag.

+3
source

Is the WAB kit an OSGi kit? If so, you should simply import the packages you need into the WAB package manifest file. Include packages by specifying them in the Import-Package: entries. This should make them visible to the entire WAB package.

+4
source

All Articles