ICEfaces
  1. ICEfaces
  2. ICE-5324

Develop a Maven 2 archetype for creating ICEfaces 2 projects

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Beta1, 2.0.0
    • Component/s: Tool Integrations
    • Labels:
      None
    • Environment:
      ICEfaces 2 Maven
    • Affects:
      Sample App./Tutorial

      Description

      A Maven archetype that allows developers to create a skeleton ICEfaces 2 project would help customers and ourselves get a quick start when making ICEfaces 2 applications

        Issue Links

          Activity

          Hide
          Deryk Sinotte added a comment -

          This is lower priority than the other Maven related tasks.

          Show
          Deryk Sinotte added a comment - This is lower priority than the other Maven related tasks.
          Hide
          Judy Guglielmin added a comment -

          once it finally gets updated and working, to use this simply type:-
          >mvn archetype:generate -DarchetypeCatalog=local

          then it will go through the repository to find the one you want and choose that number.

          should be able to use eclipse and netbeans maven2 plugin to generate from archetype.

          havinng some issues with it looking for icecompat2-webapp:icecompat2-webapp-archetype:2.0-Beta1

          should be org.icefaces:icecompat2-webapp-archetype:2.0-Beta1

          not sure exactly where this is coming from.

          Original templates comes from ICEpack eclipse facelet templating example (from 1.8.2 but updated for jsf2.0 and ICEfaces-2.0). Currently navigation bean is in Session scope, but should get it working in Windows Scope with facelets templating. Will reside on snapshots repository with rest of Beta1 jars, etc.

          Show
          Judy Guglielmin added a comment - once it finally gets updated and working, to use this simply type:- >mvn archetype:generate -DarchetypeCatalog=local then it will go through the repository to find the one you want and choose that number. should be able to use eclipse and netbeans maven2 plugin to generate from archetype. havinng some issues with it looking for icecompat2-webapp:icecompat2-webapp-archetype:2.0-Beta1 should be org.icefaces:icecompat2-webapp-archetype:2.0-Beta1 not sure exactly where this is coming from. Original templates comes from ICEpack eclipse facelet templating example (from 1.8.2 but updated for jsf2.0 and ICEfaces-2.0). Currently navigation bean is in Session scope, but should get it working in Windows Scope with facelets templating. Will reside on snapshots repository with rest of Beta1 jars, etc.
          Hide
          Judy Guglielmin added a comment -

          If you want to do this seamlessly, create a maven project with name of the group you want to use as groupId (for example org.icefaces). Then you can choose artifactId of the name of the archetype.

          Then once you are happy with this particular project, >mvn archetype:create-from-project
          This will create all the necessary files for the archetype and put them in /target/generated-sources/archetype.
          then go to the pom.xml in your archetype and use >mvn install
          Be very careful here as there is a catalog xml file in your repository root that will register the groupId and artifactId. if you change your mind, you will have to clean out this file of the old entry (or you will end up wondering why on earth it is looking for that old value when there is no reference to it within any project!!!)>

          to use the archetype, go to your new directory for your project and >mvn archetype:generate
          A list of archetypes will appear (local will always come first, but this one will reside on a snapshot repository that you can include in your settings.xml file of your m2 repository). Choose this archetype and give it your new groupId, artifactId, version, etc of the new project (you will be prompted).

          Show
          Judy Guglielmin added a comment - If you want to do this seamlessly, create a maven project with name of the group you want to use as groupId (for example org.icefaces). Then you can choose artifactId of the name of the archetype. Then once you are happy with this particular project, >mvn archetype:create-from-project This will create all the necessary files for the archetype and put them in /target/generated-sources/archetype. then go to the pom.xml in your archetype and use >mvn install Be very careful here as there is a catalog xml file in your repository root that will register the groupId and artifactId. if you change your mind, you will have to clean out this file of the old entry (or you will end up wondering why on earth it is looking for that old value when there is no reference to it within any project!!!)> to use the archetype, go to your new directory for your project and >mvn archetype:generate A list of archetypes will appear (local will always come first, but this one will reside on a snapshot repository that you can include in your settings.xml file of your m2 repository). Choose this archetype and give it your new groupId, artifactId, version, etc of the new project (you will be prompted).
          Hide
          Judy Guglielmin added a comment -

          For some reason the install command is not copying over the jar for the archetype, so do that manually

          Show
          Judy Guglielmin added a comment - For some reason the install command is not copying over the jar for the archetype, so do that manually
          Hide
          Judy Guglielmin added a comment -

          all the xml files came through with the following added to the top of the files:-
          #set( $symbol_pound = '#' )
          #set( $symbol_dollar = '$' )
          #set( $symbol_escape = '\' )

          tried to use properties on build as suggested:-
          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
          <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

          but didn't work.
          Just manually massaged the stuff for now to get this onto the snapshots repo

          Show
          Judy Guglielmin added a comment - all the xml files came through with the following added to the top of the files:- #set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) tried to use properties on build as suggested:- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> but didn't work. Just manually massaged the stuff for now to get this onto the snapshots repo
          Hide
          Judy Guglielmin added a comment -

          after working on this most of the day, I have decided to just publish this to the snapshots repository to see if anyone else can figure out why the filtering is not happening on navigation.xhtml.....

          in the archetype, you see the following:-
          #set( $symbol_pound = '#' )
          #set( $symbol_dollar = '$' )
          #set( $symbol_escape = '\' )
          <ice:form xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ice="http://www.icesoft.com/icefaces/component">
          <ice:panelGroup id="panelNavigation">
          <ice:panelCollapsible id="panelnav1" expanded="true">
          <f:facet name="header">
          <ice:panelGroup id="nav1pane">
          <ice:outputText value="$

          {symbol_dollar}{symbol_pound}{msgs['navigation.panelCollapsible1.header']}"/>
          </ice:panelGroup>
          </f:facet>
          <ice:commandLink id="content1"
          actionListener="${symbol_dollar} {symbol_pound}{navigation.navigationPathChange}">
          <f:param name="includePath" value="content/content1.xhtml" />
          <ice:outputText
          value="${symbol_dollar}{symbol_pound} {msgs['navigation.content1.label']}

          "/>
          </ice:commandLink>
          <br />
          <ice:commandLink id="content2"
          actionListener="$

          {symbol_dollar}{symbol_pound}{navigation.navigationPathChange}">
          <f:param name="includePath" value="content/content2.xhtml" />
          <ice:outputText
          value="${symbol_dollar} {symbol_pound} {msgs['navigation.content2.label']}

          "/>
          </ice:commandLink>
          </ice:panelCollapsible>
          </ice:panelGroup>
          </ice:form>

          these files cannot have preceding or following blank lines (which they don't now--had to figure that one out), but the el expressions are not being filtered. In the resulting projects that are generated from this archetype, the preceding markup is gone (eg: #set( $symbol_pound = '#' )), but the expressions are not filtered at all in the body of the xhtml file.

          Tried to have the <xml.....> tag at beginning of file as well as the DOCTYPE for xhtml...still not working.

          To test this out, add the snapshots repository to settings.xml of local maven repo, or add the maven repository to the IDE and then generate based on this archetype.

          Show
          Judy Guglielmin added a comment - after working on this most of the day, I have decided to just publish this to the snapshots repository to see if anyone else can figure out why the filtering is not happening on navigation.xhtml..... in the archetype, you see the following:- #set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) <ice:form xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ice="http://www.icesoft.com/icefaces/component"> <ice:panelGroup id="panelNavigation"> <ice:panelCollapsible id="panelnav1" expanded="true"> <f:facet name="header"> <ice:panelGroup id="nav1pane"> <ice:outputText value="$ {symbol_dollar}{symbol_pound}{msgs['navigation.panelCollapsible1.header']}"/> </ice:panelGroup> </f:facet> <ice:commandLink id="content1" actionListener="${symbol_dollar} {symbol_pound}{navigation.navigationPathChange}"> <f:param name="includePath" value="content/content1.xhtml" /> <ice:outputText value="${symbol_dollar}{symbol_pound} {msgs['navigation.content1.label']} "/> </ice:commandLink> <br /> <ice:commandLink id="content2" actionListener="$ {symbol_dollar}{symbol_pound}{navigation.navigationPathChange}"> <f:param name="includePath" value="content/content2.xhtml" /> <ice:outputText value="${symbol_dollar} {symbol_pound} {msgs['navigation.content2.label']} "/> </ice:commandLink> </ice:panelCollapsible> </ice:panelGroup> </ice:form> these files cannot have preceding or following blank lines (which they don't now--had to figure that one out), but the el expressions are not being filtered. In the resulting projects that are generated from this archetype, the preceding markup is gone (eg: #set( $symbol_pound = '#' )), but the expressions are not filtered at all in the body of the xhtml file. Tried to have the <xml.....> tag at beginning of file as well as the DOCTYPE for xhtml...still not working. To test this out, add the snapshots repository to settings.xml of local maven repo, or add the maven repository to the IDE and then generate based on this archetype.
          Hide
          Judy Guglielmin added a comment -

          to use this archetype with Netbeans, just create a new Maven project. Add icecompat2-webapp-archetype from repo http://anonsvn.icefaces.org/repo/maven2/snapshots
          (groupId=org.icefaces, artifactId iceompat2-webapp-archetype, version=2.0-Beta1).
          Netbeans will add it to the list of available Maven Archetypes. Project came in as @

          {artifactId}

          so looks like something is not quite right. Will try to fix and put the archetype back up.

          Show
          Judy Guglielmin added a comment - to use this archetype with Netbeans, just create a new Maven project. Add icecompat2-webapp-archetype from repo http://anonsvn.icefaces.org/repo/maven2/snapshots (groupId=org.icefaces, artifactId iceompat2-webapp-archetype, version=2.0-Beta1). Netbeans will add it to the list of available Maven Archetypes. Project came in as @ {artifactId} so looks like something is not quite right. Will try to fix and put the archetype back up.
          Hide
          Judy Guglielmin added a comment -

          finally got it working. Zipped up project that created the archetype and it is attached here.

          Show
          Judy Guglielmin added a comment - finally got it working. Zipped up project that created the archetype and it is attached here.
          Hide
          Judy Guglielmin added a comment -

          maven archetype for jsf2.0, ICEfaces-2.0, compat is now finished.
          resides on snapshot repo and can be used via any IDE or maven command line.

          if using via command-line, then need to add snapshots mvn repo to settings.xml in m2 repo on local machine.
          Then:-
          mvn archetype:generate
          (choose from the list).

          Can also use any IDE by generating a new maven project and then adding the following information to find the archetype:-

          groupId=org.icefaces
          artifactId=icefaces-compat-webapp-archetype
          version=2.0-Beta1
          repository= http://anonsvn.icefaces.org/repo/maven2/snapshots

          Show
          Judy Guglielmin added a comment - maven archetype for jsf2.0, ICEfaces-2.0, compat is now finished. resides on snapshot repo and can be used via any IDE or maven command line. if using via command-line, then need to add snapshots mvn repo to settings.xml in m2 repo on local machine. Then:- mvn archetype:generate (choose from the list). Can also use any IDE by generating a new maven project and then adding the following information to find the archetype:- groupId=org.icefaces artifactId=icefaces-compat-webapp-archetype version=2.0-Beta1 repository= http://anonsvn.icefaces.org/repo/maven2/snapshots

            People

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

              Dates

              • Created:
                Updated:
                Resolved: