ICEfaces
  1. ICEfaces
  2. ICE-9264

Adjust portlet sample builds to default to LiferayFaces Bridge

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Portlet Portal sample build
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration

      Description

      Currently, the portlet sample applications default to using the PortletFaces Bridge. As of this release, we are switching to default to LiferayFaces Bridge. From here on in, the PortletFaces Bridge will be deprecated except for backwards compatibility with existing Liferay 5.2 installations that already use it as well as for WebSphere Portal (where we have it "extended" with our own code).

      The Wiki documentation will also need to be adjusted to reflect this change.

        Activity

        Deryk Sinotte created issue -
        Deryk Sinotte made changes -
        Field Original Value New Value
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Fix Version/s EE-3.3.0.GA [ 10572 ]
        Fix Version/s 3.4 [ 10770 ]
        Affects Documentation (User Guide, Ref. Guide, etc.),Sample App./Tutorial,Compatibility/Configuration [ 10003, 10001, 10002 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34988 Mon May 13 11:28:35 MDT 2013 deryk.sinotte ICE-9264: adjust portlet builds to default to using LiferayFaces Bridge and to accommodate resource changes in showcase app
        Files Changed
        Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/ice.samples.showcase
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common-portlet.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/pom.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/themes/ace-black-tie/pom.xml
        Commit graph DEL /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/css
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/web.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/pom.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/core/chat-portlet/pom.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/templates/main-template.xhtml
        Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/resources/ice.samples.showcase/demo_template.css
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34991 Mon May 13 12:48:08 MDT 2013 deryk.sinotte ICE-9264: remove unnecessary resources dir
        Files Changed
        Commit graph DEL /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/resources/META-INF/resources
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34999 Mon May 13 16:28:40 MDT 2013 deryk.sinotte ICE-9264: adjust showcase builds (and and mvn) to better support resources going into META-INF directory of the war
        Files Changed
        Commit graph DEL /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/resources/META-INF
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common-portlet.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/pom.xml
        Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/resources-meta
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/pom.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/pom.xml
        Commit graph ADD /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/resources-meta/resource-dependency.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35001 Mon May 13 16:48:00 MDT 2013 deryk.sinotte ICE-9264: ignore the resources-meta directory if it doesn't exist
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35002 Mon May 13 17:01:50 MDT 2013 deryk.sinotte ICE-9264: ignore the resources-meta directory if it doesn't exist
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common-portlet.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35016 Tue May 14 12:13:03 MDT 2013 deryk.sinotte ICE-9264: check for the existence of LiferayFaces libraries during Ant build and provide helpful message if they are not found
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common-portlet.xml
        Hide
        Deryk Sinotte added a comment -

        The builds are now adjusted to default to using LiferayFaces Bridge rather than PortletFaces. This includes using the legacy version of the Liferay Bridge for Liferay 5.2.

        Adjusted the Maven builds so that resources that go into the WEB-INF/classes and resources that go into the META-INF are now separated.

        Improved the Ant builds to warn when the LiferayFaces libraries are not available and indicating what to do to fix it.

        The Wiki pages have been updated to reflect these changes as well.

        Show
        Deryk Sinotte added a comment - The builds are now adjusted to default to using LiferayFaces Bridge rather than PortletFaces. This includes using the legacy version of the Liferay Bridge for Liferay 5.2. Adjusted the Maven builds so that resources that go into the WEB-INF/classes and resources that go into the META-INF are now separated. Improved the Ant builds to warn when the LiferayFaces libraries are not available and indicating what to do to fix it. The Wiki pages have been updated to reflect these changes as well.
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ken Fyten added a comment -

        Somehow, the following commit for this JIRA has caused a styling regression with the ACE components.

        Commit:

        svn rvn#34999: ICE-9264: adjust showcase builds (and and mvn) to better support resources going into META-INF directory of the war

        Regression:

        showcase (Firefox20 / Tomcat7):

        All Components with:
        > Required Styling demos not functional, Myfaces and Mojarra JSF

        To reproduce, use showcase->ace:textEntry->Required Styling demo. Note that the custom color style for the required fields are not applied.

        Show
        Ken Fyten added a comment - Somehow, the following commit for this JIRA has caused a styling regression with the ACE components. Commit: svn rvn#34999: ICE-9264 : adjust showcase builds (and and mvn) to better support resources going into META-INF directory of the war Regression: showcase (Firefox20 / Tomcat7): All Components with: > Required Styling demos not functional, Myfaces and Mojarra JSF To reproduce, use showcase->ace:textEntry->Required Styling demo. Note that the custom color style for the required fields are not applied.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Priority P1 [ 10010 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35025 Wed May 15 10:33:48 MDT 2013 deryk.sinotte ICE-9264: adjust logic for finding /META-INF/resource-dependency.xml files in the correct location of the application .war file.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/ResourceOrdering.java
        Hide
        Deryk Sinotte added a comment -

        As part of the work to adjust the portlet builds, I tweaked the non-portlet showcase application. Originally, the application was built so that the resource-dependency.xml file for the .war file was located at:

        /WEB-INF/classes/META-INF/resource-dependency.xml

        Seeing the META-INF in there seemed odd. Looking at the documentation and inside our jars (icefaces.jar, icefaces-compat.jar, icefaces-ace.jar), the file is always located in the "correct" location at the top-level of the hierarchy. I adjusted the build so that the location in the .war file aligned with the documentation and the .jar files.

        However, this move caused the file to stop being read and processed correctly. This is all done in our own org.icefaces.impl.event.ResourceOrdering class via this technique:

        Enumeration<URL> urls = this.getClass().getClassLoader().getResources("META-INF/resource-dependency.xml");

        This finds all the resource-dependency.xml files in the .jars and finds the resource-dependency.xml in the .war BUT only if it's on the classpath (which it was when it was in its original location under classes). But after I moved it to the "real" META-INF location, it was no longer on the classpath and was no longer found in the .war file. To find the resource-dependency.xml in the war under the official META-INF directory requires a different call using the ServletContext API:

        FacesContext fc = FacesContext.getCurrentInstance();
        ExternalContext ec = fc.getExternalContext();
        URL warResourceDependencyURL = ec.getResource("/META-INF/resource-dependency.xml");

        So I've tweaked the ResourceOrdering class so that it does both calls and combines them into a single collection of URLs for processing. This allows the file to be located in the actual /META-INF director in the .war file and still be processed.

        Show
        Deryk Sinotte added a comment - As part of the work to adjust the portlet builds, I tweaked the non-portlet showcase application. Originally, the application was built so that the resource-dependency.xml file for the .war file was located at: /WEB-INF/classes/META-INF/resource-dependency.xml Seeing the META-INF in there seemed odd. Looking at the documentation and inside our jars (icefaces.jar, icefaces-compat.jar, icefaces-ace.jar), the file is always located in the "correct" location at the top-level of the hierarchy. I adjusted the build so that the location in the .war file aligned with the documentation and the .jar files. However, this move caused the file to stop being read and processed correctly. This is all done in our own org.icefaces.impl.event.ResourceOrdering class via this technique: Enumeration<URL> urls = this .getClass().getClassLoader().getResources( "META-INF/resource-dependency.xml" ); This finds all the resource-dependency.xml files in the .jars and finds the resource-dependency.xml in the .war BUT only if it's on the classpath (which it was when it was in its original location under classes). But after I moved it to the "real" META-INF location, it was no longer on the classpath and was no longer found in the .war file. To find the resource-dependency.xml in the war under the official META-INF directory requires a different call using the ServletContext API: FacesContext fc = FacesContext.getCurrentInstance(); ExternalContext ec = fc.getExternalContext(); URL warResourceDependencyURL = ec.getResource( "/META-INF/resource-dependency.xml" ); So I've tweaked the ResourceOrdering class so that it does both calls and combines them into a single collection of URLs for processing. This allows the file to be located in the actual /META-INF director in the .war file and still be processed.
        Deryk Sinotte made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35166 Fri May 17 16:00:42 MDT 2013 deryk.sinotte ICE-9264: minor changes and file location adjustments for portlet samples
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/liferay-display.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/portlet.xml
        Commit graph ADD /icefaces3/trunk/icefaces/samples/core/chat/src/main/webapp/resources/css/chat.css
        Commit graph DEL /icefaces3/trunk/icefaces/samples/core/chat/src/main/webapp/css
        Commit graph ADD /icefaces3/trunk/icefaces/samples/core/chat/src/main/webapp/resources
        Commit graph ADD /icefaces3/trunk/icefaces/samples/core/chat/src/main/webapp/resources/css
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/core/chat/src/main/java/org/icefaces/sample/portlet/chat/ChatRoom.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/core/chat/src/main/java/org/icefaces/sample/portlet/chat/Participant.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase-portlet/src/main/webapp/WEB-INF/liferay-portlet.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/core/chat/src/main/webapp/chat.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/pom.xml
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: