Version 4

    Portlet Libraries

    Portlet Libraries engine has been changed to use WTP 3.1 Library Framework - https://bugs.eclipse.org/bugs/show_bug.cgi?id=246448  WTP 3.1 Library framework is implemented in Portlet Core and in the JSF Portlet installation page.

    It is possible to choose the following library providers :

    Library provider contributed by WTP
    User Library

    The user can create the standard JDT user libraries and add them to the project's classpath. The user can also add these libraries to the deployed application.

    Library provided by Target Runtime

    The user would choose this library provider when the Server Runtime provides libraries that are required by some facet.  JBoss Tools server runtime responds as capable of providing libraries for every facet, but it doesn't provide libraries  required by Portlet Core facet and JSF portlet facet which is a bug in the JBoss Tools implementation of the server runtime. The problem is in the ProjectRuntimeClasspathProvider class. This provider wouldn't need to appear in the list of library providers of these two facets.

    Disable Library Configuration

    The user can skip adding portlet libraries.

    Portlet Core Facet library providers contributed by JBoss Tools
    Portlet Target Runtime Provider

    JBoss Tools recognizes if the server (Tomcat or JBoss Portal server) contains Portlet API library and offers to configure it.

    Maven Portlet 1.0/2.0 Libraries

    This provider appears when existing the JBoss Maven Integration facet. If the user chooses this provider, JBoss Tools will add Portlet API as a dependency to the pom.xml.

    JSF Portlet Facet library providers contributed by JBoss Tools
    JSF Portletbridge Runtime provider

    If the user selects this provider, it is necessary to enter the home of the portletbridge distribution. JBoss Tools will add the portletbridge libraries from the portletbridge distribution.

    The user can add the richfaces libraries from the portletbridge distribution or from the richfaces distribution. If the user chooses adding libraries  from the richfaces distribution, he has to enter the home of the richfaces distribution.

    JSF Portlet Target Runtime Provider

    JBoss Tools recognizes if the server runtime (JBoss EPP or JBoss Portal server) contains the portletbridge libraries and shows this provider. It is also possible to add the richfaces libraries from the richfaces distribution.

    Maven Portletbridge 2.0.0 ALPHA Libraries

    This provider is present if there is the JBoss Maven Integration facet. JBoss Tools offers the portletbridge-api and portletbridge-impl 2.0.0.ALPHA dependencies, but user can change/add/remove dependencies.

    Maven Portletbridge 2.0.0 ALPHA Libraries with dependencies

    This provider is present if there is the JBoss Maven Integration facet. JBoss Tools adds the portletbridge dependencies and the required dependencies (richfaces, commons ...).

    Adding a new Maven Library Provider

    In order to add a new Maven Library Provider, it is necessary to do the following:

    • create a pom template that can contain Maven dependencies, repositories, plugins and/or properties
    • create the maven-library-provider ext. point that uses this pom template as follows:

    <extension point="org.eclipse.jst.common.project.facet.core.libraryProviders">
    <provider id="portletbridge200alphadep-maven-library-provider" extends="maven-library-provider">
       <label>Maven Portletbridge 2.0.0 ALPHA Libraries with Dependencies</label>
          <span  name="template" value="platform:/plugin/org.jboss.tools.maven.core/poms/portletbridge-template200alphadep.xml"class="mceItemParam"></span>
               <enablement>
                 <and>
                 <with variable="projectFacets">
                    <test property="org.jboss.tools.maven.core.projectFacets" value="jboss.jsfportlet,jboss.m2" forcePluginActivation="true"/>
                 </with>
                 <with variable="requestingProjectFacet">
                        <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jboss.jsfportlet:1.0" forcePluginActivation="true"/>
                 </with>
              </and>
              </enablement>
      </provider>
    </extension>