ICEfaces
  1. ICEfaces
  2. ICE-9300

Modify Ant builds to allow for 2.1 and 2.2 versions of JSF

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Any
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Newer versions of the libraries can always be manually switched in to the current directory

      Description

      Need to modify the current build structure to support building with JSF 2.1 or 2.2. This should include Mojarra but may expand to include MyFaces as well.

        Activity

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Hide
        Deryk Sinotte added a comment -

        Updated a number of the build files in the EE trunk to reflect the new locations of the JSF libraries.

        Show
        Deryk Sinotte added a comment - Updated a number of the build files in the EE trunk to reflect the new locations of the JSF libraries.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37405 Wed Aug 14 09:54:05 MDT 2013 deryk.sinotte ICE-9300: update tutorials common build file
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/tutorials/common.xml
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Affects Documentation (User Guide, Ref. Guide, etc.),Compatibility/Configuration [ 10003, 10002 ] Documentation (User Guide, Ref. Guide, etc.),Sample App./Tutorial,Compatibility/Configuration [ 10003, 10001, 10002 ]
        Resolution Fixed [ 1 ]
        Hide
        Deryk Sinotte added a comment -

        I modified the tutorials/common.xml build file so it should now respect the "myfaces" and "jsf22" properties as well. Ran a quick test running all combinations against file-callback-tutorial and they were all fine. Resolving as fixed.

        Show
        Deryk Sinotte added a comment - I modified the tutorials/common.xml build file so it should now respect the "myfaces" and "jsf22" properties as well. Ran a quick test running all combinations against file-callback-tutorial and they were all fine. Resolving as fixed.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37398 Tue Aug 13 18:12:51 MDT 2013 mark.collette ICE-9300 : Modify Ant builds to allow for 2.1 and 2.2 versions of JSF
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/tutorials/common.xml
        Hide
        Mark Collette added a comment -

        We should probably address the tutorials as well. They ant build file for them doesn't really support deciding between Mojarra and MyFaces, nor for 2.1 versus 2.2, they just allowed Mojarra 2.1, so I've tweaked that to work with the new folders and file name convention.

        icefaces3 trunk
        Subversion 37398

        Show
        Mark Collette added a comment - We should probably address the tutorials as well. They ant build file for them doesn't really support deciding between Mojarra and MyFaces, nor for 2.1 versus 2.2, they just allowed Mojarra 2.1, so I've tweaked that to work with the new folders and file name convention. icefaces3 trunk Subversion 37398
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37397 Tue Aug 13 17:56:05 MDT 2013 deryk.sinotte ICE-9300: fix type in MyFaces version
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/lib/versions-licenses.html
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37396 Tue Aug 13 17:17:39 MDT 2013 deryk.sinotte ICE-9300: update build files
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/build.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/build/common.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/build.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/component-metadata/build.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/generator/build.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/core/basic/pom.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/build.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/pom.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/build.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37395 Tue Aug 13 17:16:27 MDT 2013 deryk.sinotte ICE-9300: remove old files and update license file
        Files Changed
        Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/myfaces-api-2.1.10.jar
        Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/commons-codec-1.4.jar
        Commit graph DEL /icefaces3/trunk/icefaces/lib/mojarra/javax.faces.jar
        Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/commons-beanutils-1.8.3.jar
        Commit graph MODIFY /icefaces3/trunk/icefaces/lib/versions-licenses.html
        Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/commons-logging-1.1.1.jar
        Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/commons-digester-2.1.jar
        Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/myfaces-impl-2.1.10.jar
        Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/commons-collections-3.2.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #37394 Tue Aug 13 17:15:35 MDT 2013 deryk.sinotte ICE-9300: add ability to build against different JSF implementations as well as different versions
        Files Changed
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.2/myfaces-impl-2.2.0-20130710.212250-1290.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.1/myfaces-impl-2.1.12.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.2/geronimo-atinject_1.0_spec-1.0.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/common/commons-codec-1.4.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/common/commons-digester-2.1.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.2/geronimo-jcdi_1.0_spec-1.0.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/mojarra/2.2
        Commit graph ADD /icefaces3/trunk/icefaces/lib/mojarra/2.1
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/common
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.2
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.1/myfaces-api-2.1.12.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/common/commons-collections-3.2.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/common/commons-logging-1.1.1.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/mojarra/2.1/javax.faces-2.1.25.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.1
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/2.2/myfaces-api-2.2.0-20130710.212247-1290.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/mojarra/2.2/javax.faces-2.2.2.jar
        Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/common/commons-beanutils-1.8.3.jar
        Hide
        Deryk Sinotte added a comment - - edited

        I modified a number of build files as well as adjust the structure of the lib/ directory. The aim is to support building against both JSF 2.1 and 2.2 using either Mojarra or MyFaces. The directory structure has changed from:

        • icefaces/lib/mojarra
        • icefaces/lib/myfaces

        to:

        • icefaces/lib/mojarra/2.1
        • icefaces/lib/mojarra/2.2
        • icefaces/lib/myfaces/2.1
        • icefaces/lib/myfaces/2.2
        • icefaces/lib/myfaces/common

        NOTE The MyFaces 2.2 libraries are very early release versions and may not be ready for general use or testing yet.

        You control the implementation and the version using properties. The default is still to build with Mojarra 2.1. The web-profile target should always exclude JSF but the servlet-profile will include JSF depending on which properties are set. The MyFaces property remains the same. A new jsf22 property has been added. Here are the various combinations:

        #Mojarra 2.1 included
        ant clean servlet-profile
        
        #MyFaces 2.1 included
        ant -Dmyfaces="true" clean servlet-profile
        
        #Mojarra 2.2 included
        ant -Djsf22="true" clean servlet-profile
        
        #MyFaces 2.2 included
        ant -Dmyfaces="true" -Djsf22="true" clean servlet-profile
        

        NOTE To support all this, I had to adjust the various build files so that the logic also considered the version directory. I think I managed to changed all the build files in the trunk but if build files in other areas (e.g. QA) that are relying on the old structure, will need to be updated. To help with that, here's a diff of the changes made to samples/build/common.xml. It highlights how the new version directories and MyFaces common directory are handled.

        Index: samples/build/common.xml
        ===================================================================
        --- samples/build/common.xml	(revision 37380)
        +++ samples/build/common.xml	(revision )
        @@ -29,6 +29,7 @@
             <property name="lib.dir" location="${icefaces.base.dir}/lib"/>
             <property name="mojarra.lib.dir" location="${lib.dir}/mojarra"/>
             <property name="myfaces.lib.dir" location="${lib.dir}/myfaces"/>
        +    <property name="myfaces.common.dir" value="${myfaces.lib.dir}/common" />
             <property name="lib.ace.dir" location="${lib.dir}/ace"/>
             <property name="lib.ace.dir.includes" value=""/>
             <property name="lib.compat.dir" location="${lib.dir}/compat"/>
        @@ -60,10 +61,18 @@
             <property name="icefaces-compat.lib.name" value="icefaces-compat" />
         
             <!-- Check which JSF implementation to use and set the appropriate sub-directory  -->
        -    <condition property="jsf.lib.dir" value="${myfaces.lib.dir}" else="${mojarra.lib.dir}">
        +    <condition property="jsf.impl.dir" value="${myfaces.lib.dir}" else="${mojarra.lib.dir}">
                 <isset property="myfaces"/>
             </condition>
         
        +    <!-- Check which JSF version to use and set the appropriate sub-directory  -->
        +    <condition property="jsf.ver.dir" value="2.2" else="2.1">
        +        <isset property="jsf22"/>
        +    </condition>
        +
        +    <property name="jsf.lib.dir" value="${jsf.impl.dir}/${jsf.ver.dir}" />
        +    <echo message="JSF lib dir: ${jsf.lib.dir}"/>
        +
             <patternset id="lib.compile">
                 <include name="*.jar"/>
             </patternset>
        @@ -93,6 +102,10 @@
                 <exclude name="*.jar" unless="jsf"/>
             </patternset>
         
        +    <patternset id="lib.myfaces.common">
        +        <exclude name="*.jar" unless="myfaces"/>
        +    </patternset>
        +
             <patternset id="lib.distribute.ace" includes="itext-2.1.7.jar poi-3.7.jar ${lib.distribute.ace.includes}">
                 <exclude name="*.jar"                   unless="ace"/>
             </patternset>
        @@ -153,6 +166,9 @@
                         <fileset dir="${jsf.lib.dir}">
                             <patternset refid="lib.compile"/>
                         </fileset>
        +                <fileset dir="${myfaces.common.dir}">
        +                    <patternset refid="lib.myfaces.common"/>
        +                </fileset>
                         <fileset dir="${lib.dir}" >
                             <patternset refid="lib.compile"/>
                         </fileset>
        @@ -174,6 +190,14 @@
             </target>
         
             <target name="war.basic" depends="compile">
        +
        +        <condition property="myfaces.common.include" value="true">
        +            <and>
        +                <isset property="myfaces"/>
        +                <isset property="jsf"/>
        +            </and>
        +        </condition>
        +
                 <war basedir="${web.dir}"
                      destfile="${dist.dir}/${ant.project.name}.war" 
                      webxml="${web.dir}/WEB-INF/web.xml">
        @@ -195,6 +219,10 @@
                     </lib>
                     <lib dir="${jsf.lib.dir}" erroronmissingdir="false">
                         <patternset refid="lib.distribute.jsf"/>
        +            </lib>
        +
        +            <lib dir="${myfaces.common.dir}" erroronmissingdir="false">
        +                <exclude name="*.jar" unless="myfaces.common.include"/>
                     </lib>
         
                     <!-- Add the icefaces-ee-ext.jar only if it exists.  There are
        
        
        Show
        Deryk Sinotte added a comment - - edited I modified a number of build files as well as adjust the structure of the lib/ directory. The aim is to support building against both JSF 2.1 and 2.2 using either Mojarra or MyFaces. The directory structure has changed from: icefaces/lib/mojarra icefaces/lib/myfaces to: icefaces/lib/mojarra/2.1 icefaces/lib/mojarra/2.2 icefaces/lib/myfaces/2.1 icefaces/lib/myfaces/2.2 icefaces/lib/myfaces/common NOTE The MyFaces 2.2 libraries are very early release versions and may not be ready for general use or testing yet. You control the implementation and the version using properties. The default is still to build with Mojarra 2.1. The web-profile target should always exclude JSF but the servlet-profile will include JSF depending on which properties are set. The MyFaces property remains the same. A new jsf22 property has been added. Here are the various combinations: #Mojarra 2.1 included ant clean servlet-profile #MyFaces 2.1 included ant -Dmyfaces="true" clean servlet-profile #Mojarra 2.2 included ant -Djsf22="true" clean servlet-profile #MyFaces 2.2 included ant -Dmyfaces="true" -Djsf22="true" clean servlet-profile NOTE To support all this, I had to adjust the various build files so that the logic also considered the version directory. I think I managed to changed all the build files in the trunk but if build files in other areas (e.g. QA) that are relying on the old structure, will need to be updated. To help with that, here's a diff of the changes made to samples/build/common.xml. It highlights how the new version directories and MyFaces common directory are handled. Index: samples/build/common.xml =================================================================== --- samples/build/common.xml (revision 37380) +++ samples/build/common.xml (revision ) @@ -29,6 +29,7 @@ <property name="lib.dir" location="${icefaces.base.dir}/lib"/> <property name="mojarra.lib.dir" location="${lib.dir}/mojarra"/> <property name="myfaces.lib.dir" location="${lib.dir}/myfaces"/> + <property name="myfaces.common.dir" value="${myfaces.lib.dir}/common" /> <property name="lib.ace.dir" location="${lib.dir}/ace"/> <property name="lib.ace.dir.includes" value=""/> <property name="lib.compat.dir" location="${lib.dir}/compat"/> @@ -60,10 +61,18 @@ <property name="icefaces-compat.lib.name" value="icefaces-compat" /> <!-- Check which JSF implementation to use and set the appropriate sub-directory --> - <condition property="jsf.lib.dir" value="${myfaces.lib.dir}" else="${mojarra.lib.dir}"> + <condition property="jsf.impl.dir" value="${myfaces.lib.dir}" else="${mojarra.lib.dir}"> <isset property="myfaces"/> </condition> + <!-- Check which JSF version to use and set the appropriate sub-directory --> + <condition property="jsf.ver.dir" value="2.2" else="2.1"> + <isset property="jsf22"/> + </condition> + + <property name="jsf.lib.dir" value="${jsf.impl.dir}/${jsf.ver.dir}" /> + <echo message="JSF lib dir: ${jsf.lib.dir}"/> + <patternset id="lib.compile"> <include name="*.jar"/> </patternset> @@ -93,6 +102,10 @@ <exclude name="*.jar" unless="jsf"/> </patternset> + <patternset id="lib.myfaces.common"> + <exclude name="*.jar" unless="myfaces"/> + </patternset> + <patternset id="lib.distribute.ace" includes="itext-2.1.7.jar poi-3.7.jar ${lib.distribute.ace.includes}"> <exclude name="*.jar" unless="ace"/> </patternset> @@ -153,6 +166,9 @@ <fileset dir="${jsf.lib.dir}"> <patternset refid="lib.compile"/> </fileset> + <fileset dir="${myfaces.common.dir}"> + <patternset refid="lib.myfaces.common"/> + </fileset> <fileset dir="${lib.dir}" > <patternset refid="lib.compile"/> </fileset> @@ -174,6 +190,14 @@ </target> <target name="war.basic" depends="compile"> + + <condition property="myfaces.common.include" value="true"> + <and> + <isset property="myfaces"/> + <isset property="jsf"/> + </and> + </condition> + <war basedir="${web.dir}" destfile="${dist.dir}/${ant.project.name}.war" webxml="${web.dir}/WEB-INF/web.xml"> @@ -195,6 +219,10 @@ </lib> <lib dir="${jsf.lib.dir}" erroronmissingdir="false"> <patternset refid="lib.distribute.jsf"/> + </lib> + + <lib dir="${myfaces.common.dir}" erroronmissingdir="false"> + <exclude name="*.jar" unless="myfaces.common.include"/> </lib> <!-- Add the icefaces-ee-ext.jar only if it exists. There are
        Deryk Sinotte made changes -
        Field Original Value New Value
        Workaround Description Newer versions of the libraries can always be manually switched in to the current directory
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Fix Version/s 3.4 [ 10770 ]
        Affects Documentation (User Guide, Ref. Guide, etc.),Compatibility/Configuration [ 10003, 10002 ]
        Workaround Exists Yes [ 10007 ]
        Assignee Priority P2 [ 10011 ]
        Deryk Sinotte created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved: