JSF Libraries


A JSF Library is very similar in concept to the Eclipse JDT User Library. They are meant to be named collections of jars that can be added as references to a Dynamic Web Project. A JSF Library differs from a JDT User Library in the following ways:

Implementations vs Component Libraries


A JSF Library is just a set of jars that will be put on the classpath and optionally deployed to the WEB-INF/lib directory at publish time using the J2EE Module Dependencies.

Why do some libraries have the "implementation" flag? A library marked as a JSF implementation differentiates it from a normal set of jars that make up a library. This flag is meant as an on-your-honor marking that this set of jars meets the JSF specification for an implementation. The JSF tooling requires a Faces Servlet implementation for compilation and "Run on Server" feature of a JSF JSP page. A library marked as an implementation will appear with [implementation] in the label. There can be more than one implementation in the registry. One of them can be marked as the default so that it will be chosen automatically during JSF Facet installation allowing JSF Facet Finish to be enabled.

JSF Implmentation Library
To make one of the implementations the default, select the desired default implementation library and press the enabled "Make Default" button. This button is only available when the selected library is an implementation.



Make Default Implementation

Plugin-Provided Libraries


An adopter of the WTP JSF Tooling may create a plugin that extends org.eclipse.jst.jsf.core.jsflibraries which would allows a developer to procedurally create a JSF Library. This, in theory, would simplify project configuration and could also enable the adopter to provide other tool extensions to improve the development experience.

Plugin-provided libaries are not editable or deletable by an end user.

Missing Jars


A JSF Libary keeps references to jars somewhere on the local file system. Should the files be moved or the directory renamed, you will see:
Missing Jars

It will be necessary to edit the JSF Library and fix the references before the library will be useable.

Project References


When a library is referenced by a project, either at JSF Facet install time, or at a later time by adding it using JSF Library Reference project property page, the following occurs:


Note: if by adding a reference to a library that contains a jar that is already referenced (same name and location), the newly referenced jar will be skipped.

When a library is removed as a reference by a project, the following occurs:


Beware: One can remove the J2EE Module Dependency through the J2EE Module Dependencies property page. Doing so currently will not remove the JSF Library reference.

If there have been updates to a library in the registry that your project is referencing, it is currently necessary to remove and re-add the reference. Future enhancments will be made to resolve lifecycle issues with a JSF Library project reference.142056

Related concepts
JSF Facets

Related reference
JSF Facets

Related tasks
Create and Update JSF Libraries
Create JSF Project