4 Replies Latest reply on Oct 25, 2010 5:09 AM by Ilya Shaikovsky

    four separate installation docs are inconsistent

    ken keller Newbie

      I'm trying to install 4.0M3 w/ eclipse, gae, maven.

       

      doc #1

      http://community.jboss.org/wiki/HowtoaddRichFaces4xtomavenbasedproject

      m2eclipse complains that versions are needed for richfaces-components-ui & annotations. Setting these versions to ${org.richfaces.bom.version} worked. It also warns that import is inappropriate for bom.

       

      doc #2

      http://in.relation.to/Bloggers/GoogleApplicationEngineSupportWithRichFaces4

      refers to

      http://anonsvn.jboss.org/repos/richfaces/trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml

      There's no annotations dependency & assumes myfaces.

      It assumes xalan/xerces but these aren't mentioned in the readme.txt of the distribution.

      Will there be a gae distribution or is maven required?

       

      doc #3

      http://docs.jboss.org/richfaces/4.0.X/4.0.0.Milestone3/Developer_Guide/en-US/html_single/#sect-Developer_Guide-Getting_started_with_RichFaces-Setting_up_RichFaces

      >Add core-ui.jar, richfaces-api.jar, and richfaces-impl.jar into your project by copying them from the location where you unzipped the RichFaces archive to the WebContent/WEB-INF/lib/

      I don't see those in the maven repo or in the zip file's artifacts folder.

       

      doc #4

      http://downloads.jboss.org/richfaces/milestones/4.0.X/4.0.0.M3/richfaces-4.0.0.M3.zip

      readme.txt

      1) Put RichFaces libraries and its dependencies in your application libraries folder:
      1.1)  richfaces-core-api-4.0.0.20101004-M3.jar
      1.2)  richfaces-core-impl-4.0.0.20101004-M3.jar
      1.3)  richfaces-components-api-4.0.0.20101004-M3.jar
      1.4)  richfaces-components-ui-4.0.0.20101004-M3.jar
      1.5)  sac-1.3, cssparser-0.9.5 - required for components CSS work
      1.6)  google-guava-r06 - core runtime dependency.
      1.7)  annotations.jar from org.richfaces.cdk
         - It's optional and only needs to be added if RichFaces components will be
           created/accessed dynamically in your apps actions/listeners.

      >1) Put RichFaces libraries and its dependencies in your application libraries folder:

      1.1)  richfaces-core-api-4.0.0.20101004-M3.jar

      1.2)  richfaces-core-impl-4.0.0.20101004-M3.jar

      1.3)  richfaces-components-api-4.0.0.20101004-M3.jar

      1.4)  richfaces-components-ui-4.0.0.20101004-M3.jar

      1.5)  sac-1.3, cssparser-0.9.5 - required for components CSS work

      1.6)  google-guava-r06 - core runtime dependency.

      1.7)  annotations.jar from org.richfaces.cdk

          - It's optional and only needs to be added if RichFaces components will be

            created/accessed dynamically in your apps actions/listeners.

      It would be nice if there was one place which stated how to install this promising tool:
      * What is needed to compile managed beans, validators, etc?
      * What is needed in WEB-INF/lib?
      * What resources are needed?
      * Is maven required for gae?
      * How is the cache configured? (readme.txt & gae blog post mention this.)

       

      Thx!

        • 1. Re: four separate installation docs are inconsistent
          Ilya Shaikovsky Master

          Actually two docs are most valid(for now only- dev guide will be updated more and will provide both settings correctly) and should be used:

          • How to add RF 4 to maven based project  - for those who using  maven dependency management
          • readme from distribution - for those who not using maven

           

          Now some comments:

          doc #1

           

          http://community.jboss.org/wiki/HowtoaddRichFaces4xtomavenbasedproject

           

          m2eclipse complains that versions are needed for richfaces-components-ui & annotations. Setting these versions to ${org.richfaces.bom.version} worked. It also warns that import is inappropriate for bom.

          Problem related to Mave or m2eclipse plugin version. It not supports bom import - in other case - setting version will not be needed. Need to check additionally and add some compatibility info. RFPL-876 created.

           

          doc #2

           

          http://in.relation.to/Bloggers/GoogleApplicationEngineSupportWithRichFaces4

           

          refers to

           

          http://anonsvn.jboss.org/repos/richfaces/trunk/archetypes/rf-gae-sample/src/main/resources/archetype-resources/pom.xml

           

          There's no annotations dependency & assumes myfaces.

           

          It assumes xalan/xerces but these aren't mentioned in the readme.txt of the distribution.

           

          Will there be a gae distribution or is maven required?

          1. annotation dependency not needed because app not uses components instances among the code.(and that highlighted in docs - check info about why to include annotations dependency at wiki page or readme)
          2. where do you see assumption related to myfaces? JSF-RI dependencies listed in pom. and in general link to pom made just in order to point to plugin declaration.
          3. Currently we have no complete war disctribution and has only maven based instructions

           

          In general - this doc is not general instalation doc. But doc related to how to adjust JSF-RF application for GAE deployment.

          doc #3

          http://docs.jboss.org/richfaces/4.0.X/4.0.0.Milestone3/Developer_Guide/en-US/html_single/#sect-Developer_Guide-Getting_started_with_RichFaces-Setting_up_RichFaces

          >Add core-ui.jar, richfaces-api.jar, and richfaces-impl.jar into your project by copying them from the location where you unzipped the RichFaces archive to the WebContent/WEB-INF/lib/

          I don't see those in the maven repo or in the zip file's artifacts folder.

          Just outdated as mentioned in docs page at site. Docs in development and not all changes in sync because it's hard for doc team to track all the changes in core. But should be completely valid for Final. Jira already there

           

          doc #4

           

          http://downloads.jboss.org/richfaces/milestones/4.0.X/4.0.0.M3/richfaces-4.0.0.M3.zip

          • What is needed to compile managed beans, validators, etc?

          Hm that shounds like high level info related to JSF. And looks like not our main goal to include all JSF base info in our knowledgebase as we just extending the JSF.


          • What is needed in WEB-INF/lib?

          In general answer the same. Our documents goal - to highlight how to add RichFaces to already configured JSF applications and provide some archetypes. And info about what to add already available in wiki and readme

          .

          • What resources are needed?

          Not sure that get the question. If it's about web.xml or faces-config definitions - the answer is "for simple case - nothing".


          • Is maven required for gae?

          In general - no for sure. We just have no instructions for creating app without maven for now.


          • How is the cache configured? (readme.txt & gae blog post mention this.)

          It's GAE related info and there is link to their knowledgebase.

          • 2. Re: four separate installation docs are inconsistent
            ken keller Newbie

            Thx for your reply.

             

            As explained in

            http://in.relation.to/Bloggers/GoogleApplicationEngineSupportWithRichFaces4

            I added to my pom the plugins and the dependencies xalan, xercesImpl, jsf-api. "maven build" generated a target directory containing classes & generated-resources. Since jsf-api.jar is from myfaces but I'm using mojarra, I replaced that manually--too bad this is necessary.

             

            I copied generated-resources to the war directory.

             

            I copied classes to war/WEB-INF.

             

            I copied to war/WEB-INF/lib:

            guava-r07.jar

            richfaces-components-api-4.0.0.20101004-M3.jar

            richfaces-components-ui-4.0.0.20101004-M3.jar

            richfaces-core-api-4.0.0.20101004-M3.jar

            richfaces-core-impl-4.0.0.20101004-M3.jar

            serializer.jar

            xalan.jar

            xercesImpl.jar

            xml-apis.jar

            (I wish eclipse had a way to sync war/WEB-INF/lib with buildpath. I haven't learned how to do this w/ maven.)

             

            I added to web.xml

            <context-param>
                    <param-name>org.richfaces.staticResourceLocation</param-name>
                    <param-value>#{facesContext.externalContext.requestContextPath}/generated-resources</param-value>
                </context-param>
                <!-- richfaces but not gae-specific -->
                <context-param>
                <param-name>org.richfaces.SKIN</param-name>
                <param-value>ruby</param-value>
            </context-param>

            <context-param>

                    <param-name>org.richfaces.staticResourceLocation</param-name>

                    <param-value>#{facesContext.externalContext.requestContextPath}/generated-resources</param-value>

            </context-param>

            <context-param>

                <param-name>org.richfaces.SKIN</param-name>

                <param-value>ruby</param-value>

            </context-param>

             

            I edited my test page:

             

            <h:body>

            <rich:panel>

            ...

             

            The page loads but there's no skinning.

             

            I've been using gae's eclipse plugin & project wizard. Do you recommend switching to pure maven?

            • 3. Re: four separate installation docs are inconsistent
              ken keller Newbie

              And I'm seeing:

              WARNING: There were problems loading class: javax.imageio.ImageIO is a restricted class. Please see the Google  App Engine developer's guide for more details. - AWTInitializer wont be run

              • 4. Re: four separate installation docs are inconsistent
                Ilya Shaikovsky Master
                Since jsf-api.jar is from myfaces but I'm using mojarra, I replaced that manually--too bad this is necessary.

                look to pom.xml

                        <dependency>             <groupId>com.sun.faces</groupId>             <artifactId>jsf-api</artifactId>         </dependency>         <dependency>             <groupId>com.sun.faces</groupId>             <artifactId>jsf-impl</artifactId>         </dependency>

                So I'm not sure about which myFaces dependencies you're talking about.

                 

                gae's eclipse plugin & project wizard

                 

                I do not used any plugins. As mentioned in blog entry we created special archetype in order to build the project without dependencies to particular tools. So just try to run it from command line.

                 

                And I'm seeing:

                WARNING: There were problems loading class: javax.imageio.ImageIO is a restricted class. Please see the Google  App Engine developer's guide for more details. - AWTInitializer wont be run

                you'r web.xml misses entry which switches the skinning to static files (also mentioned in blog)

                    <context-param>
                        <param-name>org.richfaces.staticResourceLocation</param-name>
                        <param-value>#{facesContext.externalContext.requestContextPath}/static-resources/#{resourceLocation}</param-value>
                    </context-param>