Creating hybrid Web-Applications with ICEFaces and Maven
Since ICEFaces is almost like ZK a container-agnostic Framework, I wanted to create an additional Archetype for creating Web-Apps with ICEFaces. This could have been any other JSF component framework, but ICEFaces happens to have their own Portlet-Bridge, which comes in handy when deploying to a portal. I tried RichFaces before, but RichFaces seems to be a major pain when trying to run in a non-ejb container like Tomcat. Maybe things will get better with the soon to be released JBoss Portlet-Bridge 2.0, but I doubt it, because its not really in their scope.
And because the settings are almost identical (besides the ICEFaces specific ones) like the ZK Archetype, i just post the svn url here:
checkout the archetype with:
svn co http://hybrid-web-applications.googlecode.com/svn/trunk/archetypes/hybrid-icefaces-archetype/
run:
mvn clean install
to deploy the archetype to your local maven repository. After that you are able to create your own hybrid ICEFaces Web-Applications with:
mvn archetype:generate -DarchetypeGroupId=de.fabianmaass.archetypes.hybrid.icefaces -DarchetypeArtifactId=hybrid-icefaces-webapp -DarchetypeVersion=1.0-SNAPSHOT
Again, you have to adjust the path of your local Tomcat/Liferay Installations in the pom.xml, or else the build will fail.
pom.xml
<properties> <tomcat.folder>${env.TOMCAT_HOME}/webapps</tomcat.folder> <liferay.folder>${env.LIFERAY_HOME}/tomcat-6.0.18</liferay.folder> </properties>
When you changed it, simply run:
mvn clean install
in your newly created project and voila: you can run the application in both servlet- and portlet container 🙂
You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.
ICEFaces sucks, as soon as you try to accomplish more complex UI layouts… but now with there enterprise strategy, you can buy e.g. rounded corners for only 500$ extra – wow 😉
I tried following the instructions above but got the following error on generating the web app from the archetype.
groupId: de.fabianmaass
artifactId: ICEFacesHybridWebApp
version: 1.0-SNAPSHOT
package: de.fabianmaass
Y:
[ERROR] org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current p
roject as it is not of packaging type ‘pom’
org.apache.maven.archetype.exception.ArchetypeGenerationFailure: org.apache.maven.archetype.exceptio
n.InvalidPackaging: Unable to add module to the current project as it is not of packaging type ‘pom’
at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(D
efaultFilesetArchetypeGenerator.java:238)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(De
faultArchetypeGenerator.java:136)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultA
rchetypeGenerator.java:106)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultA
rchetypeGenerator.java:149)
at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultA
rchetypeGenerator.java:209)
at org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype(DefaultAr
chetypeManager.java:71)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFrom
ArchetypeMojo.java:190)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor
.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycl
eExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.
java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultL
ifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleE
xecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java
:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the curren
t project as it is not of packaging type ‘pom’