Details
-
Type: Improvement
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 2.0-Alpha2
-
Component/s: Tool Integrations
-
Labels:None
-
Environment:ICEfaces 2 Maven
-
Affects:Sample App./Tutorial
Description
-
Hide
- icefaces-compat-webapp.zip
- 104 kB
- Judy Guglielmin
-
- icefaces-compat-webapp/.DS_Store 6 kB
- __MACOSX/.../._.DS_Store 0.1 kB
- icefaces-compat-webapp/faces-config.NavData 0.2 kB
- icefaces-compat-webapp/pom.xml 4 kB
- icefaces-compat-webapp/.../NavigationBean.java 2 kB
- icefaces-compat-webapp/src/.../log4j.xml 2 kB
- icefaces-compat-webapp/.../messages_en.properties 0.3 kB
- icefaces-compat-webapp/.../content1.xhtml 0.5 kB
- icefaces-compat-webapp/.../content2.xhtml 0.5 kB
- icefaces-compat-webapp/src/.../footer.xhtml 0.4 kB
- icefaces-compat-webapp/src/.../header.xhtml 0.4 kB
- icefaces-compat-webapp/.../navigation.xhtml 1 kB
- icefaces-compat-webapp/src/.../splash.xhtml 0.5 kB
- icefaces-compat-webapp/src/.../cssLayout.css 0.5 kB
- icefaces-compat-webapp/src/.../index.jsp 0.2 kB
- icefaces-compat-webapp/src/.../main.xhtml 0.6 kB
- icefaces-compat-webapp/src/.../context.xml 0.1 kB
- icefaces-compat-webapp/.../page-template.xhtml 2 kB
- icefaces-compat-webapp/.../.faces-config.mex 0.1 kB
- icefaces-compat-webapp/.../faces-config.xml 1 kB
- icefaces-compat-webapp/src/.../web.xml 3 kB
- icefaces-compat-webapp/target/.DS_Store 6 kB
- __MACOSX/.../._.DS_Store 0.1 kB
- icefaces-compat-webapp/target/.../.DS_Store 6 kB
- __MACOSX/.../._.DS_Store 0.1 kB
- icefaces-compat-webapp/target/.../.DS_Store 6 kB
- __MACOSX/.../._.DS_Store 0.1 kB
- icefaces-compat-webapp/target/.../pom.xml 1 kB
- icefaces-compat-webapp/target/.../.DS_Store 6 kB
- __MACOSX/.../._.DS_Store 0.1 kB
Issue Links
- blocks
-
ICE-5926 Use Maven archetype to create sparkle component test/showcase project
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
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.
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).
For some reason the install command is not copying over the jar for the archetype, so do that manually
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
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="$
</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="$
<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.
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 @
so looks like something is not quite right. Will try to fix and put the archetype back up.
finally got it working. Zipped up project that created the archetype and it is attached here.
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
This is lower priority than the other Maven related tasks.