title: How to install PrimeFaces from maven in Netbeans? I get warning that taglibrary http://primefaces.org/ui does not exist
body: <p>I tested to deploy this <a href="http://www.primefaces.org/showcase-labs/ui/areaChart.jsf" rel="noreferrer">example</a> from PrimeFaces.</p>
  
  <p>I don't know why it's not working. I get this error message:</p>
  
  <p>Warning: This page calls for xml namespace <a href="http://primefaces.org/ui" rel="noreferrer">http://primefaces.org/ui</a> declared with prefix p but no taglibtrary exist for that namespace</p>
  
  <p>I follow this <a href="http://primefaces.org/gettingStarted.html" rel="noreferrer">tutorial</a> to properly install the jar. I downloaded the Primefaces jar file and I added it to the <code>resources</code> directory into the WAR file.</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
          &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
          &lt;version&gt;3.3&lt;/version&gt;
          &lt;type&gt;jar&lt;/type&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I also added the Primefaces.jar file into Glassfish's /modules directory and I added the name of the module into default-web.xml file. It's not working.</p>
  
  <p>What am I missing?</p>
  
  <p><strong>EDIT 2</strong>
    I was correct the POM file is the problem:</p>
  
  <pre><code>&lt;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"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.DX_57&lt;/groupId&gt;
      &lt;artifactId&gt;History-Module-57&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;History-Module-57&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;endorsed.dir&gt;${project.build.directory}/endorsed&lt;/endorsed.dir&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;       
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
              &lt;version&gt;6.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;  
              &lt;groupId&gt;org.primefaces&lt;/groupId&gt;  
              &lt;artifactId&gt;primefaces&lt;/artifactId&gt;  
              &lt;version&gt;3.3&lt;/version&gt;  
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.8.2&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.osgi&lt;/groupId&gt;
              &lt;artifactId&gt;org.osgi.core&lt;/artifactId&gt;
              &lt;version&gt;4.2.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.osgi&lt;/groupId&gt;
              &lt;artifactId&gt;org.osgi.compendium&lt;/artifactId&gt;
              &lt;version&gt;4.2.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
              &lt;artifactId&gt;osgi-cdi-api&lt;/artifactId&gt;
              &lt;version&gt;3.1-b41&lt;/version&gt;
              &lt;type&gt;jar&lt;/type&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
  
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.1.0&lt;/version&gt;
                      &lt;extensions&gt;true&lt;/extensions&gt;
                      &lt;configuration&gt;
                          &lt;supportedProjectTypes&gt;
                              &lt;supportedProjectType&gt;ejb&lt;/supportedProjectType&gt;
                              &lt;supportedProjectType&gt;war&lt;/supportedProjectType&gt;
                              &lt;supportedProjectType&gt;bundle&lt;/supportedProjectType&gt;
                              &lt;supportedProjectType&gt;jar&lt;/supportedProjectType&gt;
                          &lt;/supportedProjectTypes&gt;
                          &lt;instructions&gt;
                              &lt;!-- Read all OSGi configuration info from this optional file --&gt;
                              &lt;_include&gt;-osgi.properties&lt;/_include&gt;
                              &lt;!-- By default, we don't export anything --&gt;
                              &lt;Export-Package&gt;!*.impl.*, *&lt;/Export-Package&gt;
                              &lt;DynamicImport-Package&gt;javax.*, org.*, com.sun.faces.*&lt;/DynamicImport-Package&gt;
                              &lt;Import-Package&gt;*;resolution:=optional&lt;/Import-Package&gt;
                              &lt;Embed-Dependency&gt;*;scope=compile|runtime;inline=false&lt;/Embed-Dependency&gt;
                              &lt;Embed-Transitive&gt;true&lt;/Embed-Transitive&gt;
                              &lt;Embed-Directory&gt;WEB-INF/lib&lt;/Embed-Directory&gt;
                              &lt;Embed-StripVersion&gt;false&lt;/Embed-StripVersion&gt;
                              &lt;Embed-StripGroup&gt;true&lt;/Embed-StripGroup&gt;
                              &lt;Bundle-ClassPath&gt;.,WEB-INF/classes&lt;/Bundle-ClassPath&gt;
                          &lt;/instructions&gt;
                      &lt;/configuration&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;bundle-manifest&lt;/id&gt;
                              &lt;phase&gt;process-classes&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;manifest&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                          &lt;execution&gt;
                              &lt;id&gt;bundle-install&lt;/id&gt;
                              &lt;phase&gt;install&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;install&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt; 
  
                  &lt;plugin&gt; &lt;!-- Need to use this plugin to build war files --&gt;
                      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;!-- Use version 2.1-beta-1, as it supports the new property failOnMissingWebXml --&gt;
                      &lt;version&gt;2.1-beta-1&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;archive&gt;
                              &lt;!-- add bundle plugin generated manifest to the war --&gt;
                              &lt;manifestFile&gt;
                                  ${project.build.outputDirectory}/META-INF/MANIFEST.MF
                              &lt;/manifestFile&gt;
                              &lt;!-- 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.
                              --&gt;
                              &lt;manifestEntries&gt;
                                  &lt;Bundle-ClassPath&gt;WEB-INF/classes/
                                  &lt;/Bundle-ClassPath&gt;
                              &lt;/manifestEntries&gt;
                          &lt;/archive&gt;
                      &lt;!-- We don't have a web.xml --&gt;
                          &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;validate&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${endorsed.dir}&lt;/outputDirectory&gt;
                              &lt;silent&gt;true&lt;/silent&gt;
                              &lt;artifactItems&gt;
                                  &lt;artifactItem&gt;
                                      &lt;groupId&gt;javax&lt;/groupId&gt;
                                      &lt;artifactId&gt;javaee-endorsed-api&lt;/artifactId&gt;
                                      &lt;version&gt;6.0&lt;/version&gt;
                                      &lt;type&gt;jar&lt;/type&gt;
                                  &lt;/artifactItem&gt;
                              &lt;/artifactItems&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                      &lt;compilerArguments&gt;
                          &lt;endorseddirs&gt;${endorsed.dir}&lt;/endorseddirs&gt;
                      &lt;/compilerArguments&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;!-- Enable this plugin for all modules --&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;glassfish-repo&lt;/id&gt;
              &lt;name&gt;The Glassfish repository&lt;/name&gt;
              &lt;url&gt;http://download.java.net/maven/glassfish/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;  
              &lt;id&gt;prime-repo&lt;/id&gt;  
              &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;  
              &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;  
              &lt;layout&gt;default&lt;/layout&gt;  
          &lt;/repository&gt;  
      &lt;/repositories&gt;
      &lt;description&gt;Module History Module&lt;/description&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>These lines must be added in order Primefaces to works:</p>
  
  <pre><code>&lt;instructions&gt;
      &lt;!-- Read all OSGi configuration info from this optional file --&gt;
      &lt;_include&gt;-osgi.properties&lt;/_include&gt;
      &lt;!-- By default, we don't export anything --&gt;
      &lt;Export-Package&gt;!*.impl.*, *&lt;/Export-Package&gt;
      &lt;DynamicImport-Package&gt;javax.*, org.*, com.sun.faces.*&lt;/DynamicImport-Package&gt;
      &lt;Import-Package&gt;*;resolution:=optional&lt;/Import-Package&gt;
      &lt;Embed-Dependency&gt;*;scope=compile|runtime;inline=false&lt;/Embed-Dependency&gt;
      &lt;Embed-Transitive&gt;true&lt;/Embed-Transitive&gt;
      &lt;Embed-Directory&gt;WEB-INF/lib&lt;/Embed-Directory&gt;
      &lt;Embed-StripVersion&gt;false&lt;/Embed-StripVersion&gt;
      &lt;Embed-StripGroup&gt;true&lt;/Embed-StripGroup&gt;
      &lt;Bundle-ClassPath&gt;.,WEB-INF/classes&lt;/Bundle-ClassPath&gt;
  &lt;/instructions&gt;
  </code></pre>
  
  <p>But I noticed very strange problem. I can use for example simple PrimeFaces tags without managedbeans for example <code>&lt;p:spinner&gt;</code> but if I want to use tags with managed beans the beans are not found. Maybe they are not visible?</p>