<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4359843615303909040</id><updated>2012-02-16T15:39:52.872-08:00</updated><title type='text'>Over the Edge</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dmakariev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dmakariev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Makariev</name><uri>http://www.blogger.com/profile/16903085879969255590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://2.bp.blogspot.com/_M3eVzjYKrfs/SMH8QEkqQdI/AAAAAAAABI4/2PzCl6t6ABo/S220/my_pic2.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4359843615303909040.post-7910974397186074715</id><published>2010-08-27T03:37:00.000-07:00</published><updated>2010-08-29T00:57:53.884-07:00</updated><title type='text'>Extreme productivity for Primefaces</title><content type='html'>&lt;div style="float: left; padding-right: 20px;"&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_style = '1';&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_url = 'http://dmakariev.blogspot.com/2010/08/extreme-productivity-for-primefaces.html';&lt;/script&gt;&lt;br /&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;a href="http://twitter.com/share" class="twitter-share-button" count="horizontal" via="dmakariev"&gt;Tweet&lt;/a&gt;&lt;script type="text/javascript" src="http://platform.twitter.com/widgets.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;/div&gt; I am ready to announce the next version of Deltaset - 0.8.2 ( &lt;a href="http://www.deltaset.org/" target="_blank"&gt;http://www.deltaset.org/&lt;/a&gt; )&lt;br /&gt;Four days after the initial public release, several discussions and strong opinions from the community :) and the integration with the popular Primefaces (&lt;a href="http://www.primefaces.org/" target="_blank"&gt;www.primefaces.org/&lt;/a&gt;) is ready :)&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What is Deltaset Project promising ?&lt;/h3&gt;&lt;br /&gt;A full blown , &lt;strong&gt;Primefaces&lt;/strong&gt;  integrated, JSF 2.0 based, ready to run on Google Application Engine ( &lt;a href="http://www.appspot.com/" target="_blank"&gt;www.appspot.com&lt;/a&gt; ) application in less then 10 minutes.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;How ?! &lt;/h3&gt;&lt;br /&gt;Just type:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;mvn archetype:generate -DarchetypeCatalog=http://deltaset.googlecode.com/svn/maven2/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;choose &lt;strong&gt;deltaset-primefaces-gae-archetype&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;and the fun begins :)&lt;br /&gt;&lt;br /&gt;the live demos are here :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://deltaset-primefaces.appspot.com/"&gt;http://deltaset-primefaces.appspot.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://deltaset-demo.appspot.com/"&gt;http://deltaset-demo.appspot.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can read more about the Deltaset project in my previous post :&lt;br /&gt;&lt;a href="http://dmakariev.blogspot.com/2010/08/extreme-productivity-with-jsf-20-and.html"&gt; Extreme productivity with JSF 2.0 and Deltaset&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have fun :)&lt;br /&gt;And I'm definitely waiting for your feedback, questions and proposals ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4359843615303909040-7910974397186074715?l=dmakariev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dmakariev.blogspot.com/feeds/7910974397186074715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dmakariev.blogspot.com/2010/08/extreme-productivity-for-primefaces.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/7910974397186074715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/7910974397186074715'/><link rel='alternate' type='text/html' href='http://dmakariev.blogspot.com/2010/08/extreme-productivity-for-primefaces.html' title='Extreme productivity for Primefaces'/><author><name>Makariev</name><uri>http://www.blogger.com/profile/16903085879969255590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://2.bp.blogspot.com/_M3eVzjYKrfs/SMH8QEkqQdI/AAAAAAAABI4/2PzCl6t6ABo/S220/my_pic2.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4359843615303909040.post-3136886172926327846</id><published>2010-08-22T00:34:00.000-07:00</published><updated>2010-08-29T00:51:26.723-07:00</updated><title type='text'>Extreme productivity with JSF 2.0 and Deltaset</title><content type='html'>&lt;div style="float:left;padding-right:20px;"&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_style = '1';&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_url = 'http://dmakariev.blogspot.com/2010/08/extreme-productivity-with-jsf-20-and.html';&lt;/script&gt;&lt;br /&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;a href="http://twitter.com/share" class="twitter-share-button" count="horizontal" via="dmakariev"&gt;Tweet&lt;/a&gt;&lt;script type="text/javascript" src="http://platform.twitter.com/widgets.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;/div&gt; I am going to introduce you to the newly created &lt;b&gt;"Deltaset Project"&lt;/b&gt;. I have just released the first publicly avaiable version - 0.8.1.&lt;br /&gt;It is the logical 'next step' after my prevoius post : &lt;a href="http://dmakariev.blogspot.com/2010/01/jsf-20-with-spring-3-and-spring.html"&gt;http://dmakariev.blogspot.com/2010/01/jsf-20-with-spring-3-and-spring.html&lt;/a&gt;&lt;br /&gt;The number of people, who read it, is quite impressive..  14,429... If you type "jsf 2.0 spring 3" you can see that same post, and refenreces to it,&lt;br /&gt;occupying the first page of google, bing and yahoo. And definitly , I have not used any SEO techniques :).&lt;br /&gt;&lt;br /&gt;I want to say big &lt;b&gt;"THANK YOU GUYS !"&lt;/b&gt; to everyone who has appreciated that post; to all the great comments; to all the mails which I've received.&lt;br /&gt;&lt;br /&gt;My biggest issue was that the ideas, which I've presented here, were not ready for support, change and mass usage. It was just a showcase of "how a java web application could be developed efficiently".&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;br /&gt;Now ... after several months of work, few sleepless nights, several small scale presentations, I'm ready to demonstrate the newly released productivity tool:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.deltaset.org/" target="_blank"&gt;http://www.deltaset.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The project is licensed under GPLv3, it is hosted on Google Hosting.&lt;br /&gt;You can see the new demo at &lt;a href="http://deltaset-demo.appspot.com/" target="_blank"&gt;http://deltaset-demo.appspot.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Quick Start&lt;/h3&gt;&lt;br /&gt;Deltaset requires you to download and install:&lt;ul&gt;&lt;li&gt; Java 6 JDK&lt;/li&gt;&lt;li&gt; Apache Maven 2.2.1&lt;/li&gt;&lt;li&gt; Google App Engine SDK for Java 1.3.6 : &lt;a href="http://code.google.com/appengine/downloads.html" target="_blank"&gt;http://code.google.com/appengine/downloads.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt; Create project :&lt;pre name="code" class="java"&gt;mvn archetype:generate -DarchetypeCatalog=http://deltaset.googlecode.com/svn/maven2/&lt;/pre&gt;you should choose number &lt;b&gt;(1)&lt;/b&gt; - the &lt;b&gt;'deltaset-gae-archetype'&lt;/b&gt;.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt; Add domain object (you should be in the base directory of the application - where the pom.xml was created):&lt;pre name="code" class="java"&gt;mvn -Pdeltaset -Dcmd=crud=Person:[firstName,lastName,birthDate:[@type:date]]&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; Build :&lt;pre name="code" class="java"&gt;mvn package&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; Run:&lt;pre name="code" class="java"&gt;dev_appserver target\YOUR_APP_NAME&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Now... Let's create a small Pet Clinic :&lt;/h3&gt;&lt;ol&gt;&lt;li&gt; Open the &lt;b&gt;script.ds&lt;/b&gt; file from the base directory of your project.&lt;br /&gt;At the end of the file you will see the model :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;enum=PetType:[cat,dog,fish]&lt;br /&gt;crud=Owner:[name,pets:[@type:OneToMany&amp;lt;Pet&amp;gt;,@mappedBy:owner]]&lt;br /&gt;crud=Pet:[name,type:Enum&amp;lt;PetType&amp;gt;,owner:ManyToOne&amp;lt;Owner&amp;gt;]&lt;br /&gt;enum=VetType:[dogvet,catvet,fishvet]&lt;br /&gt;crud=Vet:[name,speciality:Enum&amp;lt;VetType&amp;gt;]&lt;br /&gt;crud=Visit:[day:[@type:date],notes,vet:ManyToOne&amp;lt;Vet&amp;gt;,pet:ManyToOne&amp;lt;Pet&amp;gt;]&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt; Change it.. as you like :)&lt;/li&gt;&lt;li&gt; Generate :&lt;pre name="code" class="java"&gt;mvn -Pdeltaset -Dcmd=file=script.ds&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; Build and run.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h3&gt;What happened till now ?&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;First.. just few minutes have passed..&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A brand new, full blown, java web application was created.&lt;br /&gt;&lt;br /&gt;But what exactly was created?&lt;br /&gt;&lt;br /&gt;During the 'archetype:generate' I have used "org.deltaset.demo" for groupId and package,&lt;br /&gt;and "demo" for artifactId.&lt;br /&gt;&lt;br /&gt;Here is the directory structure of the application:&lt;span class="Apple-style-span"   style="font-family:monospace;font-size:100%;"&gt;&lt;span class="Apple-style-span"  style=" white-space: pre;font-size:13px;"&gt;&lt;span class="Apple-style-span"   style="font-family:Georgia, serif;font-size:130%;"&gt;&lt;span class="Apple-style-span"  style=" white-space: normal;font-size:16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;pre name="code" class="java"&gt;+---src/main/java/org/deltaset/demo&lt;br /&gt;+---main&lt;br /&gt;¦   +---java&lt;br /&gt;¦   ¦   +---org&lt;br /&gt;¦   ¦       +---deltaset&lt;br /&gt;¦   ¦           +---demo&lt;br /&gt;¦   ¦               +---aspect&lt;br /&gt;¦   ¦               +---config&lt;br /&gt;¦   ¦               +---converter&lt;br /&gt;¦   ¦               +---domain&lt;br /&gt;¦   ¦               +---persistence&lt;br /&gt;¦   ¦               +---repository&lt;br /&gt;¦   ¦               +---resource&lt;br /&gt;¦   ¦               +---user&lt;br /&gt;¦   ¦               +---web&lt;br /&gt;¦   +---resources&lt;br /&gt;¦   ¦   +---META-INF&lt;br /&gt;¦   ¦   +---org&lt;br /&gt;¦   ¦       +---deltaset&lt;br /&gt;¦   ¦           +---demo&lt;br /&gt;¦   +---script&lt;br /&gt;¦   ¦   +---templates&lt;br /&gt;¦   ¦       +---mapped&lt;br /&gt;¦   ¦       +---test&lt;br /&gt;¦   +---webapp&lt;br /&gt;¦       +---resources&lt;br /&gt;¦       ¦   +---app&lt;br /&gt;¦       ¦       +---css&lt;br /&gt;¦       ¦       ¦   +---img&lt;br /&gt;¦       ¦       +---internal&lt;br /&gt;¦       +---secured&lt;br /&gt;¦       ¦   +---person&lt;br /&gt;¦       +---WEB-INF&lt;br /&gt;+---test&lt;br /&gt;   +---resources&lt;/pre&gt;Let me give you brief explanation of what is contained in the folders :&lt;br /&gt;for simplicity I will use&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;JAVA_FOLDER&lt;/b&gt; instead of &lt;b&gt;src/main/java/org/deltaset/demo&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;WEB_FOLDER&lt;/b&gt; instead of &lt;b&gt;src/main/webapp&lt;/b&gt;&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/aspect&lt;/b&gt; - your aspectJ classes should go here. Currently there are 2 simple java classes, using the @Aspect syntax. The aspects could be used for crosscutting concepts like logging, performance measuring, etc.. or just ignored :)&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/config&lt;/b&gt; - your Spring @Configuration java classes.&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/converter&lt;/b&gt; - here would be generated the JAXB domain to xml or json converter classes / acctually delegating decorators :) /&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/domain&lt;/b&gt; - your generated domain classes (enum and JPA @Entity classes )&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/persistence&lt;/b&gt; - here is the AppEngineEntityManagerFactory SINGELTON.... implemented as recomended by Google Application Engine documentation,&lt;br /&gt;and also the UnonwedLoader helper static class... needed for handling some of the relations in the entities.&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/repository&lt;/b&gt; - your generated Repository classes ( @Repository form Spring)- / also known as DAOs :) /, they are defining the transaction boundaries (@Transactional from Spring) and the security access (@RolesAllowed - javax.annotation.security.RolesAllowed )to the domain objects.&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/resource&lt;/b&gt; - your generated RESTfull endpoints&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/user&lt;/b&gt; - this package is responcible for Login and Preferences handling... you will have to be chang it, according to your requirements.&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;JAVA_FOLDER/web&lt;/b&gt; - your generated JSF @ManagedBean classes ( using the javax.annotation.ManagedBean and injecting dependencies with @Inject)&lt;br /&gt;&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;src/main/resources&lt;/b&gt; - the standard Maven resources folder: persistence.xml, properties files, etc&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;src/main/script&lt;/b&gt; - here are the groovy and template files needed by the generator. The 'starting' point is the 'CommandProcessor.groovy'&lt;br /&gt;&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;WEB_FOLDER/resources&lt;/b&gt; - as defined by the JSF 2.0 spec. In this folder is the 'app' custom component jsf library.&lt;br /&gt;interesting files are page.xhtml, internal/layout-two-column.xhtml and the menu.xhtml. You will have to customize them to fit your requirements.&lt;br /&gt;&lt;b style="margin-left:15px;"&gt;WEB_FOLDER/secured&lt;/b&gt; - here would be generated more folders, with names created from the names of your domain classes.&lt;br /&gt;Each folder will contain the needed xhtml files. For a real application you will spend some time in that folders during customizing the UI :)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;This should be 'just enough description' to give you a quick start introduction for creating your own applications with "Deltaset"&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What about your own archetype ?&lt;/h3&gt;&lt;br /&gt;I will make some copy/paste from the start page of &lt;a href="http://www.deltaset.org/" target="_blank"&gt;http://www.deltaset.org&lt;/a&gt; :&lt;br /&gt;&lt;b&gt;You can easy create your own specific productivity environment, based on the project initially created with DeltaSet.&lt;/b&gt;&lt;br /&gt;Just execute :&lt;br /&gt;&lt;pre name="code" class="java"&gt;mvn install -Darchetype=true&lt;/pre&gt;If you want to use your newly created archetype.Then... type:&lt;br /&gt;&lt;pre name="code" class="java"&gt;mvn archetype:generate -DarchetypeCatalog=local&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Plain JSF 2.0 and Expression Language 2.2 on Google Application Engine&lt;/h3&gt;&lt;br /&gt;There might be some of you, who just want to use the JSF 2.0 / Expression Language 2.2 integration with Google Application Engine.&lt;br /&gt;&lt;br /&gt;So... Hey.. you don't have to tear apart the &lt;b&gt;'deltaset-gae-archetype'&lt;/b&gt; folders.&lt;br /&gt;just use number &lt;b&gt;(2)&lt;/b&gt;  from the archetype Catalog : &lt;b&gt;'hello-jsf-el-2-gae-archetype'&lt;/b&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;mvn archetype:generate -DarchetypeCatalog=http://deltaset.googlecode.com/svn/maven2/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Deltaset Technology highlights&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; JSF 2.0 with Expression Language 2.2&lt;/li&gt;&lt;li&gt; JSR 303: Bean Validation - using Hibernate Validator&lt;/li&gt;&lt;li&gt; JSR 330: Dependency Injection for Java - using Spring 3.x&lt;/li&gt;&lt;li&gt; integrated with Spring Security 3.x&lt;/li&gt;&lt;li&gt; JSR 311: JAX-RS 1.1 for building RESTful Web services - using  Jersey 1.3&lt;/li&gt;&lt;li&gt; JAXB 2.1 - using https://jaxb.dev.java.net/&lt;/li&gt;&lt;li&gt; JPA 1.0 - using DataNucleus for Google Application Engine&lt;/li&gt;&lt;li&gt; Aspect Oriented Programming - using  AspectJ&lt;/li&gt;&lt;li&gt; JPA 2.0 - using EclipseLink (under development...)&lt;/li&gt;&lt;li&gt; JQuery 1.4.2&lt;/li&gt;&lt;li&gt; JQuery UI 1.8.4&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Deployment environments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; Google Application Engine&lt;/li&gt;&lt;li&gt; Jetty/Tomcat - Servlet 2.5 (under developmet...)&lt;/li&gt;&lt;li&gt; Glassfish (under development...)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;What's next ?&lt;/h3&gt;&lt;h3&gt;&lt;span class="Apple-style-span"  style="font-weight: normal;  font-size:16px;"&gt;Hopefully soon I will cover the following topics:&lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt; JSF 2.0 and Expression Language 2.2 on Google Application - how was that made possible ?&lt;/li&gt;&lt;li&gt; Request only CRUD for JSF 2.0&lt;/li&gt;&lt;li&gt; Using JSF 2.0 templates as Lego Blocks&lt;/li&gt;&lt;li&gt; Modular applications with JSF 2.0 (no OSGi)&lt;/li&gt;&lt;li&gt; Multitenant applications with Deltaset&lt;/li&gt;&lt;li&gt; Code generation with Deltaset (how-to create your own productivity tool)&lt;/li&gt;&lt;li&gt; Deltaset Faces - why is it a cool custom component set ?&lt;/li&gt;&lt;li&gt; JSF 2.0 and HTML 5 in the context of Deltaset (and not only)&lt;/li&gt;&lt;li&gt; JSF 2.0 and Spring Security&lt;/li&gt;&lt;li&gt; Deltaset on Jetty/Tomcat/Glassfish&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Was the project inspired by Spring Roo?&lt;/h3&gt;Well.. &lt;b&gt;not at all&lt;/b&gt; :)&lt;br /&gt;&lt;br /&gt;The initial idea was implemented in the end of 2007, it was based on JSF 1.2 and Richfaces, but never made it to the public (mainly due to lack of time.. ). It was used just in few proprietery projects.&lt;br /&gt;&lt;br /&gt;During my "small scale" demonstrations, I was asked several times questions like:&lt;br /&gt;&lt;br /&gt;"is there any relation to Spring Roo", "what is the difference with Spring Roo", "why don't you just create a jsf add-on for Spring Roo".&lt;br /&gt;&lt;br /&gt;I've answered to them, and I want to answer in front of all of you, who might be thinking about them now.&lt;br /&gt;&lt;br /&gt;The only relation with Spring Roo is that the both projects are trying to solve the issue with java productivity. And basically thats almost all in common :)&lt;br /&gt;&lt;br /&gt;The aproaches are completely different. Spring Roo uses AspectJ inter-type declarations (ITDs) as a code generation technique.&lt;br /&gt;Deltaset uses plain Groovy templates.&lt;br /&gt;&lt;br /&gt;Spring Roo is 'roundtrip' generation&lt;br /&gt;Deltaset is one-way.&lt;br /&gt;&lt;br /&gt;Spring Roo tryes to manage your generated code 'invisibly' - it is trying to stay out of your way, and still to controll the artifacts, you don't want to manage by hand.&lt;br /&gt;Deltaset just creates the needed files, and leaves everything else to you :)&lt;br /&gt;&lt;br /&gt;Spring Roo claims that you will '100% develop in Java'. Here I disagree.. ITDs are definitly a brilliant code-generation architecture, but this is not 100% Java, this is AspectJ :),&lt;br /&gt;If you want to use Spring Roo, you must use either Eclipse with AspectJ support , or SpringSource Tool Suite. They are great IDEs, but .. I like Netbeans :).&lt;br /&gt;Also.. try to explain AspectJ and ITDs to junior level developers... or to anyone who doesn't have experience with AspectJ.. well it is not that easy.&lt;br /&gt;Deltaset generates standard java files..&lt;br /&gt;&lt;br /&gt;Spring Roo generates 'Rich Domain Objects'.Nice.. but.. try using method level security :).. not trivial, at least until the Spring Roo guys upgrade to Spring Security 3.0.3.RELEASE - &lt;a href="https://jira.springframework.org/browse/SEC-1232" target="_blank"&gt;https://jira.springframework.org/browse/SEC-1232&lt;/a&gt; /&lt;br /&gt;Deltaset generates plain old 3-tier architecture. It generates method-level security by default:)&lt;br /&gt;&lt;br /&gt;Spring Roo uses Spring MVC and Google Web Toolkit&lt;br /&gt;Deltaset uses JSF 2.0&lt;br /&gt;&lt;br /&gt;So .. what is that comparasion showing.. : Deltaset is not copy of Spring Roo,&lt;br /&gt;&lt;br /&gt;and by the way &lt;u&gt;Spring Roo is Great Technology!&lt;/u&gt; ...quite polished :) I really like it !&lt;br /&gt;&lt;br /&gt;As final words.. I hope that you, dear reader, have enjoyed that post... And even more... That you are conviced, you have to try the 'Deltaset way'.&lt;br /&gt;&lt;br /&gt;Have fun :)&lt;br /&gt;And I'm definitly waiting for your feedback, questions and proposals ;)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4359843615303909040-3136886172926327846?l=dmakariev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dmakariev.blogspot.com/feeds/3136886172926327846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dmakariev.blogspot.com/2010/08/extreme-productivity-with-jsf-20-and.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/3136886172926327846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/3136886172926327846'/><link rel='alternate' type='text/html' href='http://dmakariev.blogspot.com/2010/08/extreme-productivity-with-jsf-20-and.html' title='Extreme productivity with JSF 2.0 and Deltaset'/><author><name>Makariev</name><uri>http://www.blogger.com/profile/16903085879969255590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://2.bp.blogspot.com/_M3eVzjYKrfs/SMH8QEkqQdI/AAAAAAAABI4/2PzCl6t6ABo/S220/my_pic2.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4359843615303909040.post-8468696881829128499</id><published>2010-01-25T20:27:00.000-08:00</published><updated>2010-08-28T17:05:37.109-07:00</updated><title type='text'>JSF 2.0 with Spring 3 and Spring Security 3 on Google Application Engine</title><content type='html'>&lt;div style="float:left;padding-right:20px;"&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_style = '1';&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_url = 'http://dmakariev.blogspot.com/2010/01/jsf-20-with-spring-3-and-spring.html';&lt;/script&gt;&lt;br /&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"&gt;&lt;/script&gt;&lt;/div&gt; In this post I'm going to show a simple fully integrated CRUD style application working on Google Application Engine.&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;br /&gt;The technologies used are :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JSF 2.0 - Mojarra 2.0.2&lt;/li&gt;&lt;li&gt;Spring 3.0.0.RELEASE &lt;/li&gt;&lt;li&gt;Spring Security 3.0.0.RELEASE &lt;/li&gt;&lt;li&gt;Hibernate Validator 4.0.2.GA as reference implementation of JSR 303: Bean Validation&lt;/li&gt;&lt;li&gt;AspectJ 1.6.7&lt;/li&gt;&lt;li&gt;Groovy and the gmaven-plugin&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;You can see a live demo at : &lt;a href="http://sandcode.appspot.com/"&gt;http://sandcode.appspot.com&lt;/a&gt;&lt;br /&gt;&lt;i&gt;UPDATE(22 August 2010)&lt;br /&gt;You can compare with : &lt;a href="http://deltaset-demo.appspot.com/"&gt;http://deltaset-demo.appspot.com&lt;/a&gt;&lt;br /&gt;and see the project created based on the ideas in that post : &lt;a href="http://www.deltaset.org"&gt;http://www.deltaset.org&lt;/a&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The application is build with Maven 2.2.1&lt;br /&gt;For local execution you would need Google App Engine SDK &lt;s&gt;1.3.0&lt;/s&gt; 1.3.1&lt;br /&gt;&lt;br /&gt;&lt;i&gt;The archetype was updated on 11 February 2010, so that works for latest Google App Engine - 1.3.1 &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;If you want to play and customize it you would need to have installed and configured Java, Maven and Google App Engine SDK&lt;br /&gt;&lt;br /&gt;Choose &lt;span style="font-weight:bold;"&gt;gae-archetype&lt;/span&gt; after running :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;mvn archetype:generate -DarchetypeCatalog=http://sandcode.googlecode.com/svn/maven2/ &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;build the application :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;mvn install&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;run it :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;dev_appserver target/YOUR_ARTIFACT_ID&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;type in your browser: &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;enjoy :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want to extend the application you can use the small generation utility coming with it :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;mvn -Pcrud -Ddomain=Book -Dfields=title,author,remarks&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The generator will create for you :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;src/main/java/YOUR_EXAMPLE_PACKAGE_NAME/app/domain/Book.java&lt;br /&gt;src/main/java/YOUR_EXAMPLE_PACKAGE_NAME/app/repository/BookRepository.java&lt;br /&gt;src/main/java/YOUR_EXAMPLE_PACKAGE_NAME/app/web/BookController.java&lt;br /&gt;src/main/webapp/secured/book/list.xhtml&lt;br /&gt;src/main/webapp/secured/book/detail.xhtml&lt;br /&gt;src/main/webapp/secured/book/form.xhtml&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It will also extend the menu :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;src/main/webapp/resources/app/menu.xhtml&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;with :&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;app:menu-group groupname="GEN ADDED - Book "&amp;gt;&lt;br /&gt;   &amp;lt;app:menu-item itemoutcome="/secured/book/list" itemvalue="#{msg['book.view.list']}"&amp;gt;&lt;br /&gt;   &amp;lt;app:menu-item itemoutcome="/secured/book/form" itemvalue="#{msg['book.view.form']}"&amp;gt;&lt;br /&gt;&amp;lt;/app:menu-item&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Extend the application default Messages bundle :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;src/main/resources/Messages.properties&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;with:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;#labels generated for Book&lt;br /&gt;book.view.detail=GEN Book detail&lt;br /&gt;book.view.form=GEN Book form&lt;br /&gt;book.view.list=GEN Book list&lt;br /&gt;book.title=GEN Title&lt;br /&gt;book.author=GEN Author&lt;br /&gt;book.remarks=GEN Remarks&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;This was the 2 min intro.. &lt;/span&gt;depending on your internet connection you &lt;span style="font-weight:bold;"&gt;can have&lt;/span&gt; a nicely running GAE application &lt;span style="font-weight:bold;"&gt;for about 2-5 min :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want to deploy it on your account of Google Application Engine you will have to edit by hand :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;src/main/webapp/WEB-INF/appengine-web.xml&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and then type :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;appcfg update target/YOUR_ARTIFACT_ID&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And... Some more... :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The application is having the following features :&lt;br /&gt;layerd architecture - domain, service, controller&lt;br /&gt;'request' based crud for JSF&lt;br /&gt;localized - currently supports English and Bulgarian. To add another language you need to :&lt;br /&gt;1. create a translated copy of Message.properties&lt;br /&gt;2. edit faces-config.xml&lt;br /&gt;3. download from &lt;a href="http://www.famfamfam.com/lab/icons/flags/"&gt;http://www.famfamfam.com/lab/icons/flags/&lt;/a&gt; the correct flag ;) and add it to src/main/webapp/resources/img/flag with the right name.&lt;br /&gt;4. create a translated copy of ValidationMessages.properties (needed by Bean Validation)&lt;br /&gt;&lt;br /&gt;Basic UI customization - the user can change the preffered language, the position of the menu and the colors of the application.&lt;br /&gt;Using of JSF 2.0 custom components, templating.&lt;br /&gt;Using of "&lt;span style="font-weight: bold;"&gt;JSR 303: Bean Validation&lt;/span&gt;".&lt;br /&gt;Using of "&lt;span style="font-weight: bold;"&gt;JSR 330: Dependency Injection for Java&lt;/span&gt;" annotations with Spring 3 ( javax.annotation.&lt;span style="font-weight: bold;"&gt;ManagedBean , @Inject, @Named&lt;/span&gt; ).&lt;br /&gt;Using of Java Config style for Spring 3 ( &lt;span style="font-weight: bold;"&gt;@Configuration&lt;/span&gt; ).&lt;br /&gt;Using of @Bean annotation with inplace implementation of an interface, directly in the @Configuration bean.&lt;br /&gt;Using of &lt;span style="font-weight: bold;"&gt;@RolesAllowed&lt;/span&gt; (javax.annotation.security.RolesAllowed) with Spring Security 3 for securing your application.&lt;br /&gt;Using of 2 distinct roles ROLE_USER and ROLE_ADMIN, securing of methods called with h:commandLink (or h:commandButton)&lt;br /&gt;'Native' integration between Spring Security and JSF : &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/src/main/java/com/googlecode/sandcode/sample/app/web/LoginBean.java"&gt;app/web/LoginBean.java&lt;/a&gt; ; &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/src/main/webapp/login.xhtml"&gt;src/main/webapp/login.xhtml&lt;/a&gt;&lt;br /&gt;Almost NO xml configuration for spring : &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/src/main/webapp/WEB-INF/applicationContext.xml"&gt;src/main/webapp/WEB-INF/applicationContext.xml&lt;/a&gt;&lt;br /&gt;AspectJ for logging &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/src/main/java/com/googlecode/sandcode/sample/app/aspect/TimeExecutionLoggingAspect.java"&gt;app/aspect/TimeExecutionLoggingAspect.java&lt;/a&gt; (well.. by default it is swithced off, but you can take a look in the &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/pom.xml"&gt;pom.xml&lt;/a&gt; )&lt;br /&gt;AspectJ and the Spring stereotype annotations (Repository, Service, etc..) can help you easy log only what you need : &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/src/main/java/com/googlecode/sandcode/sample/app/aspect/SystemArchitecture.java"&gt;app/aspect/SystemArchitecture.java&lt;/a&gt;&lt;br /&gt;AspectJ for static weaving of 3rd party jar files (in our case this is jsf-impl , because of a bug in the local Google App SDK ) : &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/src/main/java/com/googlecode/sandcode/sample/common/aspect/FixWebConfigurationAspect.java"&gt;common/aspect/FixWebConfigurationAspect.java&lt;/a&gt;&lt;br /&gt;Groovy gmaven-plugin and Groovy Templates for generation of files..&lt;br /&gt;Using of box-shadow and border-radius css properties for IE : &lt;a href="http://sandcode.googlecode.com/svn/tags/BLOG_JAN2010/crud-jpa-spring-gae/src/main/webapp/resources/css/gray.css"&gt;src/main/webapp/resources/css/gray.css&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy :)&lt;br /&gt;And I'm definitly waiting for your feedback, questions and proposals ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4359843615303909040-8468696881829128499?l=dmakariev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dmakariev.blogspot.com/feeds/8468696881829128499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dmakariev.blogspot.com/2010/01/jsf-20-with-spring-3-and-spring.html#comment-form' title='26 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/8468696881829128499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/8468696881829128499'/><link rel='alternate' type='text/html' href='http://dmakariev.blogspot.com/2010/01/jsf-20-with-spring-3-and-spring.html' title='JSF 2.0 with Spring 3 and Spring Security 3 on Google Application Engine'/><author><name>Makariev</name><uri>http://www.blogger.com/profile/16903085879969255590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://2.bp.blogspot.com/_M3eVzjYKrfs/SMH8QEkqQdI/AAAAAAAABI4/2PzCl6t6ABo/S220/my_pic2.JPG'/></author><thr:total>26</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4359843615303909040.post-7836019239770573073</id><published>2009-12-25T18:15:00.000-08:00</published><updated>2010-08-28T16:59:55.149-07:00</updated><title type='text'>JSF 2.0 with Maven 2 plugins for Glassfish v3, Jetty and Tomcat</title><content type='html'>&lt;div style="float:left;padding-right:20px;"&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_style = '1';&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var dzone_url = 'http://dmakariev.blogspot.com/2009/12/jsf-20-with-maven-2-plugins-for.html';&lt;/script&gt;&lt;br /&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;br /&gt;In this post I'm going to demonstrate how JSF 2.0 "Hello World" application could be developed with the Maven 2 plugins for Jetty, Tomcat and Glassfish v3. The application consists of two pages and request scoped managed bean. The first page (&lt;span style="font-style: italic;"&gt; &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/webapp/hello.xhtml"&gt;hello.xhtml&lt;/a&gt;&lt;/span&gt; ) asks the user "What's your name?", validates the input , then the second page ( &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/webapp/response.xhtml"&gt;&lt;span style="font-style: italic;"&gt;response.xhtml&lt;/span&gt; &lt;/a&gt;) greets the user with "Hi". The two pages share common layout defined in &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/webapp/template.xhtml"&gt;&lt;span style="font-style: italic;"&gt;template.xhtml&lt;/span&gt;&lt;/a&gt; and request scoped managed bean &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/java/com/googlecode/sandcode/helloworld/HelloWorld.java"&gt;&lt;span style="font-style: italic;"&gt;HelloWorld.java&lt;/span&gt;&lt;/a&gt; exposed under name "hi". The titles of the pages are set with UL expression &lt;span style="font-weight: bold; font-style: italic;"&gt;#{hi.greetFrom('greeting passed as parameter')}&lt;/span&gt;. The template loads its css and also one image file with the new ResourceHandler API.&lt;br /&gt;&lt;br /&gt;Prerequisites:&lt;br /&gt;* Basic knowladge of Java and Maven 2.&lt;br /&gt;* Installed Maven 2 ( &lt;a href="http://maven.apache.org/"&gt;http://maven.apache.org&lt;/a&gt; ). The sample was tested with version 2.2.1&lt;br /&gt;&lt;br /&gt;Quick start:&lt;br /&gt;The source can be downloaded from &lt;a href="http://sandcode.googlecode.com/svn/download/helloworld.zip"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;or could be checkout with subversion from:&lt;br /&gt;&lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld"&gt;http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Run the sample with one of the following commands :&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;* mvn package tomcat:run-war&lt;br /&gt;* mvn package jetty:run-war&lt;br /&gt;* mvn package -Pglassfish&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In your browser type the URL : &lt;a href="http://localhost:8080/helloworld"&gt;http://localhost:8080/helloworld&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Some details :&lt;br /&gt;&lt;br /&gt;In the &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/pom.xml"&gt;pom.xml&lt;/a&gt; file there are defined two profiles.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. The first profile &amp;lt;id&amp;gt;default&amp;lt;/id&amp;gt; is active by default and is needed for running the application with servlet container like tomcat or jetty.&lt;br /&gt;&lt;br /&gt;The needed dependencies are :&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;com.sun.faces&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;jsf-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;[2.0.1,)&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;com.sun.faces&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;jsf-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;[2.0.1,)&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;javax.el&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;el-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;org.glassfish.web&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;el-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;servlet-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.5&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;javax.servlet.jsp&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;jsp-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.1&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The Tomcat plugin is defined by :&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;tomcat-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;configuration&amp;gt;&lt;br /&gt;  &amp;lt;path&amp;gt;/${project.build.finalName}&amp;lt;/path&amp;gt;&lt;br /&gt;  &amp;lt;!-- Embedded port --&amp;gt;&lt;br /&gt;  &amp;lt;port&amp;gt;8080&amp;lt;/port&amp;gt;&lt;br /&gt;  &amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Details about the Tomcat plugin you can find at :&lt;br /&gt;&lt;a href="http://mojo.codehaus.org/tomcat-maven-plugin/index.html"&gt;http://mojo.codehaus.org/tomcat-maven-plugin/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Jetty plugin is defined by :&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;org.mortbay.jetty&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;maven-jetty-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;configuration&amp;gt;&lt;br /&gt;      &amp;lt;!-- Delete this block to have Jetty run default port (8080) --&amp;gt;&lt;br /&gt;      &amp;lt;connectors&amp;gt;&lt;br /&gt;          &amp;lt;connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"&amp;gt;&lt;br /&gt;              &amp;lt;port&amp;gt;8080&amp;lt;/port&amp;gt;&lt;br /&gt;          &amp;lt;/connector&amp;gt;&lt;br /&gt;      &amp;lt;/connectors&amp;gt;&lt;br /&gt;      &amp;lt;!-- force friendly name instead of artifact name + version --&amp;gt;&lt;br /&gt;      &amp;lt;contextPath&amp;gt;${project.build.finalName}&amp;lt;/contextPath&amp;gt;&lt;br /&gt;      &amp;lt;!-- This parameter will auto-deploy modified classes. --&amp;gt;&lt;br /&gt;      &amp;lt;!-- You can save changes in a file or class and refresh your browser to view the changes. --&amp;gt;&lt;br /&gt;      &amp;lt;scanIntervalSeconds&amp;gt;3&amp;lt;/scanIntervalSeconds&amp;gt;&lt;br /&gt;  &amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Details about the Jetty plugin you can find at :&lt;br /&gt;&lt;a href="http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin"&gt;http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin"&gt;http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. The second profile &amp;lt;id&amp;gt;glassfish&amp;lt;/id&amp;gt; is needed for running the application with JEE compatible server. In our case I'm using embedded Glassfish v3.&lt;br /&gt;The only needed dependency is :&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;jsf-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.0&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the GLassfish plugin is defined by :&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;org.glassfish&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;maven-embedded-glassfish-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;3.0&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;configuration&amp;gt;                          &lt;br /&gt;      &amp;lt;app&amp;gt;${project.build.directory}/${build.finalName}.war&amp;lt;/app&amp;gt;&lt;br /&gt;      &amp;lt;port&amp;gt;8080&amp;lt;/port&amp;gt;&lt;br /&gt;      &amp;lt;contextRoot&amp;gt;${build.finalName}&amp;lt;/contextRoot&amp;gt;&lt;br /&gt;      &amp;lt;autoDelete&amp;gt;true&amp;lt;/autoDelete&amp;gt;&lt;br /&gt;  &amp;lt;/configuration&amp;gt;&lt;br /&gt;  &amp;lt;executions&amp;gt;&lt;br /&gt;      &amp;lt;execution&amp;gt;&lt;br /&gt;          &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;br /&gt;          &amp;lt;goals&amp;gt;&lt;br /&gt;              &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;&lt;br /&gt;          &amp;lt;/goals&amp;gt;&lt;br /&gt;      &amp;lt;/execution&amp;gt;&lt;br /&gt;  &amp;lt;/executions&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;that plugin is binded to the 'package' phase of maven for convenience. It could be executed also with :&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mvn -Pglassfish embedded-glassfish:run&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Details about the glassfish plugin you can find at :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://docs.sun.com/app/docs/doc/821-1208/gijhs?a=view"&gt;http://docs.sun.com/app/docs/doc/821-1208/gijhs?a=view&lt;/a&gt;&lt;br /&gt;&lt;a href="http://docs.sun.com/app/docs/coll/1343.9"&gt;http://docs.sun.com/app/docs/coll/1343.9&lt;/a&gt;  - section "Sun GlassFish Enterprise Server v3 Embedded Server Guide"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interesing part of the web.xml is the following context parameter :&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;  &amp;lt;param-name&amp;gt;com.sun.faces.expressionFactory&amp;lt;/param-name&amp;gt;&lt;br /&gt;  &amp;lt;param-value&amp;gt;com.sun.el.ExpressionFactoryImpl&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It is needed by JSF when running under tomcat or jetty, so that faces could load the UL v2.2, which is needed for passing parameters in the EL expressions in the xhtmls.&lt;br /&gt;Also when running under plain servlet container the following dependency is needed:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;javax.el&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;el-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;org.glassfish.web&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;el-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Example of passing parameters (from &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/webapp/hello.xhtml"&gt;hello.xhtml&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;ui:define name="top"&amp;gt;&lt;br /&gt;  #{hi.greetFrom('initial page')}&lt;br /&gt;&amp;lt;/ui:define&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Where 'greetFrom' method is defined in &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/java/com/googlecode/sandcode/helloworld/HelloWorld.java"&gt;HelloWorld.java&lt;/a&gt; :&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@ManagedBean(name = "hi")&lt;br /&gt;@RequestScoped&lt;br /&gt;public class HelloWorld {&lt;br /&gt;  ...&lt;br /&gt;&lt;br /&gt;  public String greetFrom(String pageName) {&lt;br /&gt;      return "Hello World ! ( " + pageName + " )";&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In JSF 2.0 one of the most powerful features is the PDL (Page Description Language), and especially the possibility for encapsulating common fragmets of a page in 'templates'.&lt;br /&gt;&lt;br /&gt;In the sample you can see the usage of the &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/webapp/template.xhtml"&gt;template.xhtml&lt;/a&gt; :&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&lt;br /&gt;    xmlns:ui="http://java.sun.com/jsf/facelets"&lt;br /&gt;    xmlns:h="http://java.sun.com/jsf/html"&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;h:head&amp;gt;&lt;br /&gt;      &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&amp;gt;&lt;br /&gt;      &amp;lt;link href="#{resource['css/default.css']}" rel="stylesheet" type="text/css" /&amp;gt;&lt;br /&gt;      &amp;lt;link href="#{resource['css/cssLayout.css']}" rel="stylesheet" type="text/css" /&amp;gt;&lt;br /&gt;      &amp;lt;title&amp;gt;Hello World (facelets template)&amp;lt;/title&amp;gt;&lt;br /&gt;  &amp;lt;/h:head&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;h:body&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;div id="top" class="top"&amp;gt;&lt;br /&gt;          &amp;lt;div class="left"&amp;gt;&amp;lt;h:graphicImage url="#{resource['delta.png']}" /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;          &amp;lt;div class="right"&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;ui:insert name="top"&amp;gt;Top&amp;lt;/ui:insert&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;          &amp;lt;div style="clear:both"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;div id="content" class="center_content"&amp;gt;&lt;br /&gt;          &amp;lt;ui:insert name="content"&amp;gt;Content&amp;lt;/ui:insert&amp;gt;&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;/h:body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;in &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/webapp/hello.xhtml"&gt;hello.xhtml&lt;/a&gt; :&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"&lt;br /&gt;              xmlns:h="http://java.sun.com/jsf/html"&lt;br /&gt;              template="./template.xhtml"&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;ui:define name="top"&amp;gt;&lt;br /&gt;      #{hi.greetFrom('initial page')}&lt;br /&gt;  &amp;lt;/ui:define&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;ui:define name="content"&amp;gt;&lt;br /&gt;      &amp;lt;h2&amp;gt;What's your name?&amp;lt;/h2&amp;gt;&lt;br /&gt;      &amp;lt;h:form id="helloForm" &amp;gt;          &lt;br /&gt;          &amp;lt;h:inputText id="username" value="#{hi.name}" required="true"/&amp;gt;&lt;br /&gt;&lt;br /&gt;          &amp;lt;h:commandButton id="submit" action="response" value="Submit"/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;          &amp;lt;h:message for="username" styleClass="error"/&amp;gt;&lt;br /&gt;      &amp;lt;/h:form&amp;gt;&lt;br /&gt;  &amp;lt;/ui:define&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ui:composition&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and in &lt;a href="http://sandcode.googlecode.com/svn/trunk/jsf2/helloworld/src/main/webapp/response.xhtml"&gt;response.xhtml&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"&lt;br /&gt;              xmlns:h="http://java.sun.com/jsf/html"&lt;br /&gt;              template="./template.xhtml"&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;ui:define name="top"&amp;gt;&lt;br /&gt;      #{hi.greetFrom('response page')}&lt;br /&gt;  &amp;lt;/ui:define&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;ui:define name="content"&amp;gt;&lt;br /&gt;      &amp;lt;h:form id="responseform"&amp;gt;          &lt;br /&gt;          &amp;lt;h2&amp;gt;Hi, #{hi.name} !&amp;lt;/h2&amp;gt;&lt;br /&gt;          &amp;lt;h:commandButton id="back" value="Back" action="hello" /&amp;gt;&lt;br /&gt;      &amp;lt;/h:form&amp;gt;&lt;br /&gt;  &amp;lt;/ui:define&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/ui:composition&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;More about the new features of JSF 2.0 you can read here :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/"&gt;http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4359843615303909040-7836019239770573073?l=dmakariev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dmakariev.blogspot.com/feeds/7836019239770573073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dmakariev.blogspot.com/2009/12/jsf-20-with-maven-2-plugins-for.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/7836019239770573073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4359843615303909040/posts/default/7836019239770573073'/><link rel='alternate' type='text/html' href='http://dmakariev.blogspot.com/2009/12/jsf-20-with-maven-2-plugins-for.html' title='JSF 2.0 with Maven 2 plugins for Glassfish v3, Jetty and Tomcat'/><author><name>Makariev</name><uri>http://www.blogger.com/profile/16903085879969255590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://2.bp.blogspot.com/_M3eVzjYKrfs/SMH8QEkqQdI/AAAAAAAABI4/2PzCl6t6ABo/S220/my_pic2.JPG'/></author><thr:total>5</thr:total></entry></feed>
