Strange bug in OSGi bundle -
i have war package turned osgi bundle. want use primefaces package. pom file of bundle:
<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.dx_57</groupid> <artifactid>history-module-57</artifactid> <version>1.0-snapshot</version> <packaging>war</packaging> <name>history-module-57</name> <properties> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> <project.build.sourceencoding>utf-8</project.build.sourceencoding> </properties> <dependencies> <dependency> <groupid>org.primefaces</groupid> <artifactid>primefaces</artifactid> <version>3.3</version> <type>jar</type> </dependency> <dependency> <groupid>javax</groupid> <artifactid>javaee-web-api</artifactid> <version>6.0</version> <scope>provided</scope> </dependency> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>4.8.2</version> <scope>test</scope> </dependency> <dependency> <groupid>org.osgi</groupid> <artifactid>org.osgi.core</artifactid> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupid>org.osgi</groupid> <artifactid>org.osgi.compendium</artifactid> <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupid>org.glassfish</groupid> <artifactid>osgi-cdi-api</artifactid> <version>3.1-b41</version> <type>jar</type> <scope>provided</scope> </dependency> </dependencies> <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 osgi configuration info optional file --> <_include>-osgi.properties</_include> <!-- default, don't export --> <export-package>*</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 use plugin build war files --> <artifactid>maven-war-plugin</artifactid> <groupid>org.apache.maven.plugins</groupid> <!-- use version 2.1-beta-1, supports new property failonmissingwebxml --> <version>2.2</version> <configuration> <archive> <!-- add bundle plugin generated manifest war --> <manifestfile> ${project.build.outputdirectory}/meta-inf/manifest.mf </manifestfile> <!-- reason, adding bundle-classpath in maven-bundle-plugin confuses plugin , generates wrong import-package, etc. so, generate here. --> <manifestentries> <bundle-classpath>web-inf/classes/ </bundle-classpath> </manifestentries> </archive> <!-- don't have 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 plugin modules --> <groupid>org.apache.felix</groupid> <artifactid>maven-bundle-plugin</artifactid> </plugin> </plugins> </build> <repositories> <repository> <id>glassfish-repo</id> <name>the glassfish repository</name> <url>http://download.java.net/maven/glassfish/</url> </repository> <repository> <id>prime-repo</id> <name>primefaces maven repository</name> <url>http://repository.primefaces.org</url> <layout>default</layout> </repository> </repositories> <description>module history module</description> </project> when deploy bundle glassfish , open jsf page in order use primefaces components error:
warning: page calls xml namespace http://primefaces.org/ui declared prefix p no taglibtrary exist namespace if replace part simple war package configuration primefaces working. seems there wrong pom configuration. find strange?
best wishes
not sure doing. have test wab uses primefaces working fine. can find here , compare , see what's wrong app:
https://svn.java.net/svn/glassfish~svn/trunk/fighterfish/test/testapp/test.app9
i won't reply here further. contact in glassfish users list.
sahoo
Comments
Post a Comment