felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Penzov <peter.pen...@gmail.com>
Subject Cannot use PrimeFaces in OSGI bundle
Date Mon, 04 Jun 2012 19:21:09 GMT
Hi,
   I have a WAR package with OSGI plugin. The package is deployed as OSGI
bundle in Glassfish and it's working. I have a very strange problem with
the POM file of the bundle: when I added Primefaces I get this error into
the JSF page:

Warning: This page calls for xml namespace
http://primefaces.org/uideclared with prefix p but no taglibtrary
exist for that namespace

The problem is in these lines:

<build>
    <pluginManagement>

        <plugins>
               <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.1.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <supportedProjectTypes>
                            <supportedProjectType>ejb</supportedProjectType>
                            <supportedProjectType>war</supportedProjectType>

<supportedProjectType>bundle</supportedProjectType>
                            <supportedProjectType>jar</supportedProjectType>
                        </supportedProjectTypes>
                        <instructions>
                            <!-- Read all OSGi configuration info from this
optional file -->
                            <_include>-osgi.properties</_include>
                            <!-- By default, we don't export anything -->
                            <Export-Package>!*.impl.*, *</Export-Package>
                        </instructions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>bundle-manifest</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>bundle-install</id>
                            <phase>install</phase>
                            <goals>
                                <goal>install</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

             <plugin> <!-- Need to use this plugin to build war files -->
                    <artifactId>maven-war-plugin</artifactId>
                    <groupId>org.apache.maven.plugins</groupId>
                    <!-- Use version 2.1-beta-1, as it supports the new
property failOnMissingWebXml -->
                    <version>2.1-beta-1</version>
                    <configuration>
                        <archive>
                            <!-- add bundle plugin generated manifest to
the war -->
                            <manifestFile>

${project.build.outputDirectory}/META-INF/MANIFEST.MF
                            </manifestFile>
                            <!-- For some reason, adding Bundle-ClassPath
in maven-bundle-plugin
                            confuses that plugin and it generates wrong
Import-Package, etc.
                            So, we generate it here.
                            -->
                            <manifestEntries>
                                <Bundle-ClassPath>WEB-INF/classes/
                                </Bundle-ClassPath>
                            </manifestEntries>
                        </archive>
                    <!-- We don't have a web.xml -->
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                    </configuration>
                </plugin>
              </plugins>
        </pluginManagement>
         <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>

<outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>

<artifactId>javaee-endorsed-api</artifactId>
                                    <version>6.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <!-- Enable this plugin for all modules -->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

Something is preventing the loading of the Primefaces jar but I cannot find
what.
If I remove these lines Primefaces are working normally. Can you help me to
find the problem?

Best wishes
Peter

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message