How To Purpose Primefaces Amongst Jboss 7.1.3

This tutorial volition instruct us how to purpose primefaces alongside jboss 7.1.3.

Requirements:
 1.) primefaces 3.5
 2.) jboss 7.1.3
 3.) maven javaee6 generated projection (ear, war, ejb)

Steps:
1.) Add primefaces module inward jboss.
  a.) In JBOSS_HOME/modules directory create org/primefaces/main folder.
  b.) Copy primefaces.jar to the folder that has but been created.
  c.) Create module.xml.
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="org.primefaces">  <resources>   <resource-root path="primefaces-3.5.jar"/>  </resources>    <dependencies>   <module name="javax.faces.api" />  </dependencies> </module> 

2.) Add primefaces dependency to ejb/pom.xml
<dependency>  <groupId>org.primefaces</groupId>  <artifactId>primefaces</artifactId>  <version>3.5</version> </dependency> 

3.) In web/pom.xml, exclude primefaces jounce inward ejb dependency:
<dependency>  <groupId>com.czetsuya</groupId>  <artifactId>xxx-ejb</artifactId>  <type>ejb</type>  <scope>provided</scope>  <exclusions>   <exclusion>    <groupId>org.primefaces</groupId>    <artifactId>primefaces</artifactId>   </exclusion>  </exclusions> </dependency> 

4.) Add jboss-deployment-structure.xml inward ear/src/main/resources/META-INF:
<jboss-deployment-structure>  <ear-subdeployments-isolated>true</ear-subdeployments-isolated>   the EAR's lib folder -->  <deployment>   <dependencies>    <module name="org.primefaces" />    <module name="javax.faces.api" />   </dependencies>  </deployment> </jboss-deployment-structure> 
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.