ICEfaces
  1. ICEfaces
  2. ICE-6453

Maven builds for portlet versions of sample apps

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 2 maven build portlet portal
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      We need to adjust the way that the portlet examples are built so that they are more Maven friendly. Currently, building the non-portlet versions of the apps includes the portlet files and dependencies.

      - Portlet resources, files, and dependences should not be included in the non-portlet builds.
      - Pluto requires a special Maven task to run and inject stuff during the build in order to have it deploy properly.

        Issue Links

          Activity

          Deryk Sinotte created issue -
          Deryk Sinotte made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 2.0.0-EE-Beta1 [ 10250 ]
          Fix Version/s 2.0.1 [ 10255 ]
          Assignee Deryk Sinotte [ deryk.sinotte ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23778 Tue Jan 11 12:27:26 MST 2011 deryk.sinotte ICE-6453: remove portlet specific files and build info from component-showcase
          Files Changed
          Commit graph DEL /icefaces2/trunk/icefaces/samples/compat/component-showcase/src/main/java/org/icefaces/application/showcase/util/PortletUtil.java
          Commit graph DEL /icefaces2/trunk/icefaces/samples/compat/component-showcase/portlets
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase/build.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23779 Tue Jan 11 12:45:13 MST 2011 deryk.sinotte ICE-6453: initial commit of separate project for portlet version of component-showcase
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/webapp/WEB-INF/portlet.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/java/org
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/java/org/icefaces/application
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/webapp/WEB-INF/liferay-portlet.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/java/org/icefaces/application/showcase
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/webapp/view.xhtml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/webapp/WEB-INF/liferay-plugin-package.properties
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/build.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/webapp
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/pom.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/webapp/WEB-INF/liferay-display.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/java/org/icefaces/application/showcase/util/PortletUtil.java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/webapp/WEB-INF
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/java/org/icefaces
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/java
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/src/main/java/org/icefaces/application/showcase/util
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23781 Tue Jan 11 14:07:26 MST 2011 deryk.sinotte ICE-6453 disable ant build until it's been adapted to the new structure
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/build.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23790 Wed Jan 12 12:02:22 MST 2011 deryk.sinotte ICE-6453 modifications to Component Showcase common and specific ant build scripts to support new Maven project structure
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/build.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/build/common.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/build/common.xml
          Commit graph DEL /icefaces2/trunk/icefaces/lib/portlets/jsf-api-2.0.4-b06a.jar
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase/build.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/compat/build/common-portlet.xml
          Commit graph DEL /icefaces2/trunk/icefaces/lib/portlets/jsf-impl-2.0.4-b06a.jar
          Commit graph ADD /icefaces2/trunk/icefaces/samples/build/common-portlet.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23791 Wed Jan 12 12:05:02 MST 2011 deryk.sinotte ICE-6453: remove Component Showcase specific libraries from compat common build file
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/build.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/build/common.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase/build.xml
          Hide
          Deryk Sinotte added a comment -

          To better support Maven, we decided on a strategy of having separate project directories for portlet examples rather than simply injecting the few portlet files we have into the existing servlet examples. So the new layout for examples that have a corresponding portlet build should look like:

          sample/ace/showcase
          sample/ace/showcase-portlet

          sample/compat/component-showcase
          sample/compat/component-showcase-portlet

          sample/core/chat
          sample/core/chat-portlet

          Inside each directory will be a build.xml and a pom.xml, with common build info factored out to the appropriate level (e.g. common to all samples, common to all portlets, common to compat, or specific to that example).

          Moving stuff around this way necessitates an overhaul of the ant scripts for building the portlets since they are no longer simply injecting a few files into the existing non-portlet.war.

          For Maven, the build-helper-maven-plugin is used in the portlet poms to allow pointing at multiple source directories so that the portlet build can simply refer to the source in the servlet folder.

          For Ant, we copy the resources from the parent into the portlet directory and then do a normal portlet build. The only caveat is that the clean target should clean out all the copied files but leave the portlet specific files.

          The component-showcase is complete for both Maven and Ant. We are now working on converting the other relevant examples that have portlet builds.

          Show
          Deryk Sinotte added a comment - To better support Maven, we decided on a strategy of having separate project directories for portlet examples rather than simply injecting the few portlet files we have into the existing servlet examples. So the new layout for examples that have a corresponding portlet build should look like: sample/ace/showcase sample/ace/showcase-portlet sample/compat/component-showcase sample/compat/component-showcase-portlet sample/core/chat sample/core/chat-portlet Inside each directory will be a build.xml and a pom.xml, with common build info factored out to the appropriate level (e.g. common to all samples, common to all portlets, common to compat, or specific to that example). Moving stuff around this way necessitates an overhaul of the ant scripts for building the portlets since they are no longer simply injecting a few files into the existing non-portlet.war. For Maven, the build-helper-maven-plugin is used in the portlet poms to allow pointing at multiple source directories so that the portlet build can simply refer to the source in the servlet folder. For Ant, we copy the resources from the parent into the portlet directory and then do a normal portlet build. The only caveat is that the clean target should clean out all the copied files but leave the portlet specific files. The component-showcase is complete for both Maven and Ant. We are now working on converting the other relevant examples that have portlet builds.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23796 Wed Jan 12 15:12:52 MST 2011 deryk.sinotte ICE-6453: add ant build files for chat servlet and portlet projects
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/core/chat-portlet/pom.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase-portlets/build.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/core/chat/build.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/core/chat-portlet/build.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/core/chat/pom.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23797 Wed Jan 12 15:54:22 MST 2011 deryk.sinotte ICE-6453: adding a common portlet build file missed on the previous checkin
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/core/build/common-portlet.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23800 Wed Jan 12 17:07:20 MST 2011 deryk.sinotte ICE-6453: remove old portlet directory that is no longer required
          Files Changed
          Commit graph DEL /icefaces2/trunk/icefaces/samples/core/portlets
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23801 Wed Jan 12 17:08:30 MST 2011 deryk.sinotte ICE-6453: add support for building Pluto version of portlet (using Maven only)
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/core/chat-portlet/src/main/webapp/WEB-INF/META-INF
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/core/chat-portlet/pom.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/pom.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/core/chat-portlet/src/main/webapp/WEB-INF/META-INF/chat-portlet.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23802 Wed Jan 12 17:28:14 MST 2011 deryk.sinotte ICE-6453: add an builds and common-portlet files for ace showcase and showcase portlet projects
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/ace/showcase-portlet/build.xml
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase/build.xml
          Commit graph ADD /icefaces2/trunk/icefaces/samples/ace/build/common-portlet.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23803 Wed Jan 12 17:34:43 MST 2011 deryk.sinotte ICE-6453: add context required for Pluto portal
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/samples/core/chat-portlet/src/main/webapp/META-INF
          Commit graph ADD /icefaces2/trunk/icefaces/samples/core/chat-portlet/src/main/webapp/META-INF/chat-portlet.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23805 Thu Jan 13 10:22:40 MST 2011 deryk.sinotte ICE-6453: tweak pom so that the portlet version of web.xml is used instead of the one from the servlet project
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase-portlet/pom.xml
          Hide
          Deryk Sinotte added a comment -

          The work to convert the 3 portlet examples into their own projects and provide Maven and Ant builds for them is complete. The only two caveats to note:

          1) There is currently no code to filter which portlet-specific configuration files get included into the .war file. So liferay*.xml files are currently included in Pluto builds for example. While not harmful, it may be desired to clean this up.

          2) The two build systems use 2 different strategies which can collide. Maven builds by simply referring to the servlet project to get it's resources. Ant actively copies over the content it requires into the portlet directory before building. If you run an Ant build (which copies the resources) and then do a "mvn package", the build will complain that there are duplicates of the Java classes. You must do "ant clean" to remove these copies if you want to successfully do a Maven build.

          Show
          Deryk Sinotte added a comment - The work to convert the 3 portlet examples into their own projects and provide Maven and Ant builds for them is complete. The only two caveats to note: 1) There is currently no code to filter which portlet-specific configuration files get included into the .war file. So liferay*.xml files are currently included in Pluto builds for example. While not harmful, it may be desired to clean this up. 2) The two build systems use 2 different strategies which can collide. Maven builds by simply referring to the servlet project to get it's resources. Ant actively copies over the content it requires into the portlet directory before building. If you run an Ant build (which copies the resources) and then do a "mvn package", the build will complain that there are duplicates of the Java classes. You must do "ant clean" to remove these copies if you want to successfully do a Maven build.
          Deryk Sinotte made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.)]
          Resolution Fixed [ 1 ]
          Hide
          Deryk Sinotte added a comment -

          I should also note that the poms for the portlet builds are not as factored as they might be (using parent pom to factor out commonality).

          Show
          Deryk Sinotte added a comment - I should also note that the poms for the portlet builds are not as factored as they might be (using parent pom to factor out commonality).
          Deryk Sinotte made changes -
          Link This issue blocks ICE-6452 [ ICE-6452 ]
          Ken Fyten made changes -
          Issue Type Task [ 3 ] New Feature [ 2 ]
          Salesforce Case []
          Fix Version/s 2.0.0-EE-Beta1 [ 10250 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: