<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>cout</title>
	<atom:link href="http://hardikmehta.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hardikmehta.wordpress.com</link>
	<description>&#60;&#60; About programming, Linux, music, stars, life and everything;</description>
	<lastBuildDate>Wed, 08 May 2013 11:19:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hardikmehta.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>cout</title>
		<link>http://hardikmehta.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hardikmehta.wordpress.com/osd.xml" title="cout" />
	<atom:link rel='hub' href='http://hardikmehta.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Quest for Window Manager: Xmonad</title>
		<link>http://hardikmehta.wordpress.com/2011/12/13/quset-for-window-manager-xmonad/</link>
		<comments>http://hardikmehta.wordpress.com/2011/12/13/quset-for-window-manager-xmonad/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 14:58:25 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[haskell]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[desktop enviroment]]></category>
		<category><![CDATA[dwm]]></category>
		<category><![CDATA[musca]]></category>
		<category><![CDATA[ratpoison]]></category>
		<category><![CDATA[tiling wms]]></category>
		<category><![CDATA[tmux]]></category>
		<category><![CDATA[window managers]]></category>
		<category><![CDATA[wmii]]></category>
		<category><![CDATA[xmonad]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=651</guid>
		<description><![CDATA[While I was tweaking a lot with my fluxbox and openbox desktop, I came to know about the tiling window managers like wmii, dwm, xmonad, awesome, musca, ratpoison etc. These wms[1] are very lightweight, minimalist and completely different in paradigm than the non-tiling wms. The main difference being that they manage the placing and if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=651&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">While I was tweaking a lot with my fluxbox and openbox desktop, I came to know about the tiling window managers like <a title="WMII" href="http://wmii.suckless.org/" target="_blank">wmii</a>, <a title="DWM" href="http://dwm.suckless.org/" target="_blank">dwm</a>, <a title="XMONAD" href="http://xmonad.org/" target="_blank">xmonad</a>, <a title="AWESOME" href="http://awesome.naquadah.org/" target="_blank">awesome,</a> <a title="Musca" href="http://aerosuidae.net/musca.html" target="_blank">musca</a>, <a title="Ratpoison" href="http://www.nongnu.org/ratpoison/" target="_blank">ratpoison</a> etc. These wms[1] are very lightweight, minimalist and completely different in paradigm than the non-tiling wms. The main difference being that they manage the placing and if necessary sizing of the windows themselves and as a user you are relieved from these mundane tasks. At first, with the word &#8220;tiling&#8221; I just recalled the option in Windows 3.1 which was used to arrange the windows as tiles on the desktop. At that time though, it made less sense as the screen sizes were generally very small. But now a days, with wide screens and often multiple monitors attached,  tiling your windows makes  good use of your real estate on the screen. At first, it feels a bit different, but after some usage, I realised that it can be very useful if you don&#8217;t have to spend time arranging windows on your desktop. You utilise maximum of your desktop space and save a lot of time so you can hack without any bells and whistles of a Desktop Environment coming in your way.</p>
<p style="text-align:justify;">All the window managers mentioned above have their own peculiarities and features. I don&#8217;t want to go into the details of each one so,  <a title="Comparison of tiling window managers" href="https://wiki.archlinux.org/index.php/Comparison_of_Tiling_Window_Managers" target="_blank">here</a> is the archlinux wiki page which compares the different tiling window managers.</p>
<p style="text-align:justify;">My choice fell on xmonad. It has several reasons. The first being it looks awesome (no pun intended). The second being the language behind it, yes haskell[2].  The configuration file is also written in haskell, with which it is possible to customize and  extend the basic features provided by xmonad.  It  surely is a challenge to learn a fresh new language to be able to understand the configuration file and  to customize. This actually was a plus point for me because  I already had heard  many interesting things about haskell, so  I wanted to learn it to have a feel of  a lazy and purely functional language.  So, xmonad being a new paradigm window manager for me, it was also an opportunity for me to start learning haskell.</p>
<p style="text-align:justify;">Some screenshots to give you  a feel of what I am talking about.</p>
<div id="attachment_668" class="wp-caption aligncenter" style="width: 586px"><a title="Xmonad clean" href="http://rangalo.deviantart.com/gallery/#/d4ix9nb" target="_blank"><img class="size-full wp-image-668 " title="Xmonad Clean" src="http://hardikmehta.files.wordpress.com/2011/12/xmonad_clean_tmb.png?w=632" alt="Xmonad Clean"   /></a><p class="wp-caption-text">Xmonad clean with conky, dzen , conky, mpd, weather status bar</p></div>
<div id="attachment_673" class="wp-caption aligncenter" style="width: 586px"><a href="http://rangalo.deviantart.com/#/d4ixaa5"><img class="size-full wp-image-673   " title="Xmonad Busy" src="http://hardikmehta.files.wordpress.com/2011/12/xmonad_busy_tmb.png?w=632" alt="Xmonad Busy"   /></a><p class="wp-caption-text">Xmonad running tmux and vim editing the primary configuration file of xmonad.</p></div>
<p style="text-align:justify;">Xmonad is a very efficient dynamic tiling window manager which is very slim in terms of memory usage. Although the core part is relatively plain in terms of features, there are plenty of extensions which could be used to take advantage of different features.  Although for me it was an interesting  opportunity to start learning  haskell and understand the config file,  it is not at all necessary to learn haskell to configure xmonad. There are many example configurations available on the <a title="xmonad config examples" href="http://haskell.org/haskellwiki/Xmonad/Config_archive" target="_blank">xmonad site</a> with screenshots.  The xmonad config file is generally well  readable, so it is possible and often recommended  to initially copy an example configuration and keep on modifying it until you get it customized to your needs. I also liked the way xmonad handles multiple screens. Actually in the beginning it felt a bit  strange, but after some experience with it,  it is so  intuitive, that you would not like multiple screen handling of any other window manager.</p>
<p style="text-align:justify;"><a title="xmonad.hs" href="https://github.com/rangalo/dotfiles/blob/master/.xmonad/xmonad.hs" target="_blank">This</a>  is  my config file which is more or less a basic configuration with some changes.  Please feel free to suggest any improvements or changes. I have started learning haskell by following the book <a title="Real world haskell" href="http://book.realworldhaskell.org/" target="_blank">Real World Haskell</a>, which in my opinion is a very good book for beginners. Please feel free to suggest any other useful resources for that as well.  I hope I will be able to use more of xmonad and fix some issues I am having with it.</p>
<p style="text-align:justify;">On the cons side, xmonad doesn&#8217;t handle swing (java) based applications very well. There is a workaround in the config file by setting the param  setWMName  to &#8220;LG3D&#8221; to get it working.  I am still  having problems related to focusing with eclipse java IDE.  I am looking for a solution to this issue.</p>
<p style="text-align:justify;"><em>Links:</em></p>
<p style="text-align:justify;">1.<a title="Window Managers" href="http://en.wikipedia.org/wiki/Window_manager" target="_blank"> Window Managers</a></p>
<p>2. <a title="Haskell" href="http://haskell.org/haskellwiki/Haskell" target="_blank">Haskell</a></p>
<br /> Tagged: <a href='http://hardikmehta.wordpress.com/tag/awesome/'>awesome</a>, <a href='http://hardikmehta.wordpress.com/tag/desktop-enviroment/'>desktop enviroment</a>, <a href='http://hardikmehta.wordpress.com/tag/dwm/'>dwm</a>, <a href='http://hardikmehta.wordpress.com/tag/haskell/'>haskell</a>, <a href='http://hardikmehta.wordpress.com/tag/musca/'>musca</a>, <a href='http://hardikmehta.wordpress.com/tag/ratpoison/'>ratpoison</a>, <a href='http://hardikmehta.wordpress.com/tag/tiling-wms/'>tiling wms</a>, <a href='http://hardikmehta.wordpress.com/tag/tmux/'>tmux</a>, <a href='http://hardikmehta.wordpress.com/tag/window-managers/'>window managers</a>, <a href='http://hardikmehta.wordpress.com/tag/wmii/'>wmii</a>, <a href='http://hardikmehta.wordpress.com/tag/xmonad/'>xmonad</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/651/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=651&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2011/12/13/quset-for-window-manager-xmonad/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2011/12/xmonad_clean_tmb.png" medium="image">
			<media:title type="html">Xmonad Clean</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2011/12/xmonad_busy_tmb.png" medium="image">
			<media:title type="html">Xmonad Busy</media:title>
		</media:content>
	</item>
		<item>
		<title>Mavenising seam projects [ part 2 ].</title>
		<link>http://hardikmehta.wordpress.com/2010/04/30/mavenising-seam-projects-part-2/</link>
		<comments>http://hardikmehta.wordpress.com/2010/04/30/mavenising-seam-projects-part-2/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 11:15:01 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javaee]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[seam framework]]></category>
		<category><![CDATA[seamframework]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=606</guid>
		<description><![CDATA[This part will continue the discussion started in part 1 [1]. We now come to the model and action modules which are of type ejb. Particularly in this example (Open18) they are just seam components i.e. pojos  annotated with @Name, but they could also have been ejbs. Bellow is the pom.xml for model module. It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=606&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">This part will continue the discussion started in part 1 [1].</p>
<p style="text-align:justify;">We now come to the model and action modules which are of type ejb. Particularly in this example (Open18) they are just seam components i.e. pojos  annotated with @Name, but they could also have been ejbs.</p>
<p style="text-align:justify;">Bellow is the pom.xml for model module. It contains all the entities (JPA)  and some helper classes. It shows jboss-seam as provided dependency which will be provided by the ear module which packages the artifact which will be deployed. This modules takes all the hibernate dependencies from the parent project.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;project xmlns=&quot;<a href="http://maven.apache.org/POM/4.0.0&#038;quot" rel="nofollow">http://maven.apache.org/POM/4.0.0&#038;quot</a>; xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance&#038;quot" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance&#038;quot</a>;
    xsi:schemaLocation=&quot;<a href="http://maven.apache.org/POM/4.0.0" rel="nofollow">http://maven.apache.org/POM/4.0.0</a> <a href="http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt" rel="nofollow">http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt</a>;
  &lt;parent&gt;
    &lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
    &lt;artifactId&gt;Open18&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
  &lt;artifactId&gt;model&lt;/artifactId&gt;
  &lt;packaging&gt;ejb&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;model&lt;/name&gt;
  &lt;url&gt;<a href="http://maven.apache.org&lt;/url&#038;gt" rel="nofollow">http://maven.apache.org&lt;/url&#038;gt</a>;
  &lt;dependencies&gt;
      &lt;dependency&gt;
            &lt;groupId&gt;org.jboss.seam&lt;/groupId&gt;
            &lt;artifactId&gt;jboss-seam&lt;/artifactId&gt;
            &lt;version&gt;2.2.0.GA&lt;/version&gt;
            &lt;type&gt;ejb&lt;/type&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
  	&lt;plugins&gt;
  		&lt;plugin&gt;
  			&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  			&lt;artifactId&gt;maven-ejb-plugin&lt;/artifactId&gt;
  			&lt;configuration&gt;
  				&lt;ejbVersion&gt;3.0&lt;/ejbVersion&gt;
  			&lt;/configuration&gt;
  		&lt;/plugin&gt;
  	&lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;
</pre>
<p style="text-align:justify;">Here the action module which is also of type ejb. It contains all the action classes which are in turn pojos annotated with @Name. The JSF dependency which we see is for the JSF message classes.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;project xmlns=&quot;<a href="http://maven.apache.org/POM/4.0.0&#038;quot" rel="nofollow">http://maven.apache.org/POM/4.0.0&#038;quot</a>; xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance&#038;quot" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance&#038;quot</a>;
    xsi:schemaLocation=&quot;<a href="http://maven.apache.org/POM/4.0.0" rel="nofollow">http://maven.apache.org/POM/4.0.0</a> <a href="http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt" rel="nofollow">http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt</a>;
  &lt;parent&gt;
    &lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
    &lt;artifactId&gt;Open18&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
  &lt;artifactId&gt;action&lt;/artifactId&gt;
  &lt;packaging&gt;ejb&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;action&lt;/name&gt;
  &lt;url&gt;<a href="http://maven.apache.org&lt;/url&#038;gt" rel="nofollow">http://maven.apache.org&lt;/url&#038;gt</a>;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
          &lt;artifactId&gt;model&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;

      &lt;dependency&gt;
            &lt;groupId&gt;org.jboss.seam&lt;/groupId&gt;
            &lt;artifactId&gt;jboss-seam&lt;/artifactId&gt;
            &lt;version&gt;2.2.0.GA&lt;/version&gt;
            &lt;type&gt;ejb&lt;/type&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
      &lt;dependency&gt;
            &lt;groupId&gt;javax.faces&lt;/groupId&gt;
            &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
            &lt;version&gt;1.2_02&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;

  &lt;/dependencies&gt;
  &lt;build&gt;
  	&lt;plugins&gt;
  		&lt;plugin&gt;
  			&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  			&lt;artifactId&gt;maven-ejb-plugin&lt;/artifactId&gt;
  			&lt;configuration&gt;
  				&lt;ejbVersion&gt;3.0&lt;/ejbVersion&gt;
  			&lt;/configuration&gt;
  		&lt;/plugin&gt;
  	&lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;
</pre>
<p><em>Links:</em></p>
<ol>
<li><a title="Mavenising seam projects [part1]" href="http://hardikmehta.wordpress.com/2010/03/07/mavenising-seam-projects-part-1/" target="_blank">Mavenising seam projects [ part 1 ].</a></li>
</ol>
<br /> Tagged: <a href='http://hardikmehta.wordpress.com/tag/javaee/'>javaee</a>, <a href='http://hardikmehta.wordpress.com/tag/jboss/'>jboss</a>, <a href='http://hardikmehta.wordpress.com/tag/maven/'>maven</a>, <a href='http://hardikmehta.wordpress.com/tag/seam/'>seam</a>, <a href='http://hardikmehta.wordpress.com/tag/seam-framework/'>seam framework</a>, <a href='http://hardikmehta.wordpress.com/tag/seamframework/'>seamframework</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/606/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=606&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2010/04/30/mavenising-seam-projects-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>Mavenising seam projects [ part 1 ].</title>
		<link>http://hardikmehta.wordpress.com/2010/03/07/mavenising-seam-projects-part-1/</link>
		<comments>http://hardikmehta.wordpress.com/2010/03/07/mavenising-seam-projects-part-1/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 14:51:32 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javaee]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[cdi]]></category>
		<category><![CDATA[jsr 299]]></category>
		<category><![CDATA[jsr299]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[seam framework]]></category>
		<category><![CDATA[seamframework]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=570</guid>
		<description><![CDATA[Seam [1] is a  very powerful framework for developing java EE web-based applications. It is the only java framework which glues all the tiers of a typical java EE web application together. It is no surprise that many seam features like using EJB 3.0  (for seam any pojo which is a seam component) directly as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=570&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">Seam [1] is a  very powerful framework for developing java EE web-based applications. It is the only java framework which glues all the tiers of a typical java EE web application together. It is no surprise that many seam features like using EJB 3.0  (for seam any pojo which is a seam component) directly as JSF backing beans, declarative scoping and conversation scope  has been included in the new Contexts and Dependency Injection for Java EE 6 (CDI) also known as JSR 299 [2].  JSR 299 combines best features of seam, Google Guice [3] and Spring [4]. Seam also has tons of other features which make it a very useful framework to learn for any Java developer. Seam by default uses ant. The seam-gen tool creates an ant project and itself is a wrapper to different ant targets.</p>
<p style="text-align:justify;">Maven on the other hand is emerging as the de-facto building tool for java. As I have already mentioned before, maven gives you a very good overview of your project and you are not lost in minor details. Those details are automatically taken care of. With seam projects, maven is especially useful because you know which dependencies are needed.</p>
<p style="text-align:justify;">When I started learning seam, by reading the very popular book Seam in Action by Dan Allan [5], I had already switched to maven for all my projects. I decided to mavenise the examples of the book. There are many such projects. The seam documentation also points to the seam-maven-refimpl project [6] which provides a nice template for any seam project. As I wanted to find out how the maven implementation a seam project differs from that of a standard java EE project first hand, I didn&#8217;t use the template provided by this project. I just started with a standard java EE project and started adding seam dependencies to it, until I had a working example.</p>
<p style="text-align:justify;">The implementation  can be found <a title="Seam2Examples" href="http://github.com/rangalo/Seam2Examples" target="_blank">here</a>. Please feel free to point out any mistakes or suggest improvements to th code.</p>
<p style="text-align:justify;">I have also tried to convert the first examples of the book ﻿﻿Seam 2.x Web Development by David Salter [7]. These examples are very simple i.e. without persistence, richfaces etc, although they use state less session beans.</p>
<p style="text-align:justify;">Here I will discuss the Open18 example from the Seam In Action book in detail.</p>
<p style="text-align:justify;">Here is the pom file of the main parent project which is no different from an ordinary Java EE project. The only seam specific thing is the jboss repository entry at the end.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
xmlns=&quot;<a href="http://maven.apache.org/POM/4.0.0&#038;quot" rel="nofollow">http://maven.apache.org/POM/4.0.0&#038;quot</a>;
         xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance&#038;quot" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance&#038;quot</a>;
         xsi:schemaLocation=&quot;<a href="http://maven.apache.org/POM/4.0.0" rel="nofollow">http://maven.apache.org/POM/4.0.0</a> <a href="http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt" rel="nofollow">http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt</a>;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
  &lt;artifactId&gt;Open18&lt;/artifactId&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;Open18&lt;/name&gt;
  &lt;url&gt;<a href="http://maven.apache.org&lt;/url&#038;gt" rel="nofollow">http://maven.apache.org&lt;/url&#038;gt</a>;
  &lt;modules&gt;
  	&lt;module&gt;action&lt;/module&gt;
  	&lt;module&gt;model&lt;/module&gt;
    &lt;module&gt;war&lt;/module&gt;
    &lt;module&gt;ear&lt;/module&gt;
  &lt;/modules&gt;
  &lt;build&gt;
  	&lt;plugins&gt;
  		&lt;plugin&gt;
  			&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  			&lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
  			&lt;configuration&gt;
  				&lt;source&gt;1.6&lt;/source&gt;
  				&lt;target&gt;1.6&lt;/target&gt;
  			&lt;/configuration&gt;
  		&lt;/plugin&gt;
  	&lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencyManagement&gt;
  	&lt;dependencies&gt;
  		&lt;dependency&gt;
  			&lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
  			&lt;artifactId&gt;ear&lt;/artifactId&gt;
  			&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  		&lt;/dependency&gt;
  		&lt;dependency&gt;
  			&lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
  			&lt;artifactId&gt;war&lt;/artifactId&gt;
  			&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  		&lt;/dependency&gt;
  		&lt;dependency&gt;
  			&lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
  			&lt;artifactId&gt;action&lt;/artifactId&gt;
  			&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  		&lt;/dependency&gt;
        &lt;dependency&gt;
  			&lt;groupId&gt;com.hardik.seaminaction&lt;/groupId&gt;
  			&lt;artifactId&gt;model&lt;/artifactId&gt;
  			&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
        &lt;/dependency&gt;
  	&lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
    &lt;dependencies&gt;
        &lt;!-- hibernate dependencies with provided scope --&gt;
    &lt;/dependencies&gt;

   &lt;repositories&gt;
  	&lt;repository&gt;
  		&lt;id&gt;jboss&lt;/id&gt;
  		JBoss Repository
        &lt;url&gt;<a href="http://repository.jboss.org/maven2/&lt;/url&#038;gt" rel="nofollow">http://repository.jboss.org/maven2/&lt;/url&#038;gt</a>;
  	&lt;/repository&gt;
  &lt;/repositories&gt;
&lt;/project&gt;
</pre>
<p style="text-align:justify;"><em>Links:</em></p>
<ol>
<li><a title="seamframework" href="http://seamframework.org/" target="_blank">Seam</a></li>
<li><a title="JSR 299" href="http://www.jcp.org/en/jsr/detail?id=299" target="_blank">Contexts and Dependency Injection in Java EE 6 (JSR 299)</a></li>
<li><a title="Guice" href="http://code.google.com/p/google-guice/" target="_blank">Google Guice</a></li>
<li><a title="Spring" href="http://www.springsource.org/" target="_blank">Spring framework</a></li>
<li><a title="Seam in action" href="http://www.manning.com/dallen/" target="_blank">Seam in action</a></li>
<li><a title="seam-maven-refimpl" href="http://code.google.com/p/seam-maven-refimpl/" target="_blank">Seam maven reference implementation</a></li>
<li><a title="Seam 2.x web development" href="http://www.packtpub.com/seam-2-x-web-development" target="_blank">Seam 2.x Web Development</a></li>
</ol>
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<br /> Tagged: <a href='http://hardikmehta.wordpress.com/tag/cdi/'>cdi</a>, <a href='http://hardikmehta.wordpress.com/tag/java/'>Java</a>, <a href='http://hardikmehta.wordpress.com/tag/javaee/'>javaee</a>, <a href='http://hardikmehta.wordpress.com/tag/jboss/'>jboss</a>, <a href='http://hardikmehta.wordpress.com/tag/jsr-299/'>jsr 299</a>, <a href='http://hardikmehta.wordpress.com/tag/jsr299/'>jsr299</a>, <a href='http://hardikmehta.wordpress.com/tag/maven/'>maven</a>, <a href='http://hardikmehta.wordpress.com/tag/seam/'>seam</a>, <a href='http://hardikmehta.wordpress.com/tag/seam-framework/'>seam framework</a>, <a href='http://hardikmehta.wordpress.com/tag/seamframework/'>seamframework</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/570/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/570/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=570&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2010/03/07/mavenising-seam-projects-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>Switched to Archlinux</title>
		<link>http://hardikmehta.wordpress.com/2010/03/07/switched-to-archlinux/</link>
		<comments>http://hardikmehta.wordpress.com/2010/03/07/switched-to-archlinux/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 13:24:25 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[arch linux]]></category>
		<category><![CDATA[archlinux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[sidux]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=514</guid>
		<description><![CDATA[At last a new post after a long time ! Lately, I was very busy with real life issues and concerns so could not find time to write. In spite of being a fan of debian [1], I decided to change my operating system. I was completely happy  with sidux [2] which is essentially debian [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=514&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">At last a new post after a long time !</p>
<p style="text-align:justify;">Lately, I was very busy with real life issues and concerns so could not find time to write.</p>
<p style="text-align:justify;">In spite of being a fan of debian [1], I decided to change my operating system. I was completely happy  with sidux [2] which is essentially debian sid with a pinch of spice, but wanted to try something new and different. I had heard a lot of good things about Archlinux [3]. First I decided to try it on a virtual machine and was impressed by the simplicity of the system. It is highly configurable and yet simple when it comes to configuring it to your taste.  For me the common thing is that sidux and Archlinux both are rolling distributions.  Arch claims to be optimized for i686, so at least theoretically it should be faster than sidux. Though,  I don&#8217;t have any benchmarks to support this. Debian has may be the highest number of binary packages available, but Arch has AUR [4] and ABS [5], so it becomes easy to compile a package from sources.</p>
<p style="text-align:justify;">Another reason, I switched to Arch was that I was experimenting with lightweight window managers like fluxbox, openbox, dwm, xmonad etc. The community at Archlinux provides a great support and knowledge base for them. In fact I got encouraged to try those window managers by browsing through the screenshot threads in the Archlinux forums. On the other hand, sidux officially  supports only Kde, and I somehow felt that the community at sidux discourages the use of alternatives to kde and also other lightweight applications.</p>
<p style="text-align:justify;">Although, it was not GUI based like sidux, the installation of Arch went rather smoothly. Archwiki [6] is an indispensable resource. I have a 4 years old Dell Inspiron 6000. The system seems to run smoothly. There are less daemons running compared to sidux, so the boot time is less. I have more or less the same setup as my sidux installation with openbox as main window manager and kde 4 as a fallback ! I am also maintaining my plasmoid plasma_pyweather [7], so I don&#8217;t want to get rid of kde altogether.</p>
<p style="text-align:justify;">I don&#8217;t know yet, if I will continue with Arch or go back to sidux again. I have realized that you need to read all the messages carefully when you upgrade the system with pacman, this was also true for sidux, but the forum with upgrade warning was a great help.  Anyway, I hope to post interesting things about my experience using Arch.</p>
<p style="text-align:justify;">Here some screenshots for those who want to see it to believe.</p>
<div id="attachment_547" class="wp-caption aligncenter" style="width: 550px"><a href="http://rangalo.deviantart.com/art/Arch-clean-156467243" target="_blank"><img class="size-full wp-image-547  " title="Arch clean" src="http://hardikmehta.files.wordpress.com/2010/03/arch_openbox-tmb1.png?w=632" alt=""   /></a><p class="wp-caption-text">Arch clean</p></div>
<p style="text-align:center;">
<p style="text-align:center;">
<div id="attachment_548" class="wp-caption aligncenter" style="width: 550px"><a href="http://rangalo.deviantart.com/art/Arch-dirty-156467465" target="_blank"><img class="size-full wp-image-548  " title="Arch dirty" src="http://hardikmehta.files.wordpress.com/2010/03/arch_dirty-tmb1.png?w=632" alt=""   /></a><p class="wp-caption-text">Arch dirty</p></div>
<p><em>Links:</em></p>
<ol>
<li><a title="Debian GNU/Linux" href="http://www.debian.org/" target="_blank">Debian GNU/Linux</a></li>
<li><a title="sidux" href="http://sidux.com/" target="_blank">sidux</a></li>
<li><a title="Arch Linux" href="http://www.archlinux.org/" target="_blank">Arch Linux</a></li>
<li><a title="Arch User Repository" href="http://http://wiki.archlinux.org/index.php/AUR" target="_blank">Arch User Repository</a></li>
<li><a title="Arch Build System" href="http://wiki.archlinux.org/index.php/ABS" target="_blank">Arch Build System</a></li>
<li><a title="Arch Wiki" href="http://wiki.archlinux.org/index.php/Main_Page" target="_blank">Arch Wiki</a></li>
<li><a title="A weather plasmoid in python" href="http://kde-look.org/content/show.php/plasma_pyweather?content=110137" target="_blank">A weather plasmoid in python</a></li>
</ol>
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<br /> Tagged: <a href='http://hardikmehta.wordpress.com/tag/arch-linux/'>arch linux</a>, <a href='http://hardikmehta.wordpress.com/tag/archlinux/'>archlinux</a>, <a href='http://hardikmehta.wordpress.com/tag/debian/'>debian</a>, <a href='http://hardikmehta.wordpress.com/tag/linux/'>Linux</a>, <a href='http://hardikmehta.wordpress.com/tag/sidux/'>sidux</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/514/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=514&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2010/03/07/switched-to-archlinux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2010/03/arch_openbox-tmb1.png" medium="image">
			<media:title type="html">Arch clean</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2010/03/arch_dirty-tmb1.png" medium="image">
			<media:title type="html">Arch dirty</media:title>
		</media:content>
	</item>
		<item>
		<title>Maven dependencies for a basic JSF project</title>
		<link>http://hardikmehta.wordpress.com/2009/09/12/maven-dependencies-for-a-basic-jsf-project/</link>
		<comments>http://hardikmehta.wordpress.com/2009/09/12/maven-dependencies-for-a-basic-jsf-project/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 07:52:02 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javaee]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java-server-faces]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[pom]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=497</guid>
		<description><![CDATA[With some search and experiments, I figured out the following maven dependencies for a basic JSF project. These dependencies also allow autocompletion of JSF tags in the IDEs like eclipse and intellij idea. I post this for my own reference and may be someone searching for it. Tagged: j2ee, java-server-faces, javaee, jsf, maven, pom<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=497&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">With some search and experiments, I figured out the following maven dependencies for a basic JSF project. These dependencies also allow autocompletion of JSF tags in the IDEs like eclipse and intellij idea. I post this for my own reference and may be someone searching for it.</p>
<p style="text-align:justify;">
<pre class="brush: xml; title: ; notranslate">
&lt;project xmlns=&quot;<a href="http://maven.apache.org/POM/4.0.0&#038;quot" rel="nofollow">http://maven.apache.org/POM/4.0.0&#038;quot</a>; xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance&#038;quot" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance&#038;quot</a>;
  xsi:schemaLocation=&quot;<a href="http://maven.apache.org/POM/4.0.0" rel="nofollow">http://maven.apache.org/POM/4.0.0</a> <a href="http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt" rel="nofollow">http://maven.apache.org/maven-v4_0_0.xsd&quot;&#038;gt</a>;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.hardik.jsfinaction&lt;/groupId&gt;
  &lt;artifactId&gt;HelloJsf&lt;/artifactId&gt;
&lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;name&gt;HelloJsf Maven Webapp&lt;/name&gt;
  &lt;url&gt;<a href="http://maven.apache.org&lt;/url&#038;gt" rel="nofollow">http://maven.apache.org&lt;/url&#038;gt</a>;
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.0&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;jstl&lt;/groupId&gt;
        &lt;artifactId&gt;jstl&lt;/artifactId&gt;
        &lt;version&gt;1.1.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;javax.faces&lt;/groupId&gt;
        &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
        &lt;version&gt;1.2_02&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;javax.faces&lt;/groupId&gt;
        &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
        &lt;version&gt;1.2-b19&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;taglibs&lt;/groupId&gt;
        &lt;artifactId&gt;standard&lt;/artifactId&gt;
        &lt;version&gt;1.1.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;javax.el&lt;/groupId&gt;
        &lt;artifactId&gt;el-api&lt;/artifactId&gt;
        &lt;version&gt;1.0&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
    &lt;finalName&gt;HelloJsf&lt;/finalName&gt;
&lt;plugins&gt;
&lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
            &lt;configuration&gt;
                &lt;source&gt;1.6&lt;/source&gt;
                &lt;target&gt;1.6&lt;/target&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
&lt;plugin&gt;
            &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
            &lt;artifactId&gt;tomcat-maven-plugin&lt;/artifactId&gt;
            &lt;configuration&gt;
                &lt;server&gt;tomcat&lt;/server&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
&lt;/project&gt;
</pre>
<br /> Tagged: j2ee, java-server-faces, javaee, jsf, maven, pom <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/497/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=497&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2009/09/12/maven-dependencies-for-a-basic-jsf-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>A weather plasmoid in python</title>
		<link>http://hardikmehta.wordpress.com/2009/08/13/a-weather-plasmoid-in-python/</link>
		<comments>http://hardikmehta.wordpress.com/2009/08/13/a-weather-plasmoid-in-python/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 20:02:53 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[forecast]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[google weather api]]></category>
		<category><![CDATA[kde4]]></category>
		<category><![CDATA[plasmoid]]></category>
		<category><![CDATA[pydev]]></category>
		<category><![CDATA[pykde4]]></category>
		<category><![CDATA[pyqt4]]></category>
		<category><![CDATA[python-plasmoid]]></category>
		<category><![CDATA[qt4]]></category>
		<category><![CDATA[weather]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=394</guid>
		<description><![CDATA[Ever since I heard about plasma I was eager to find ways to write my own plasmoid. But for the development of binary plasmoids, it is necessary to compile at least a part of kde4, at least this is what I understood from the prerequisite listed on the official tutorial. This discouraged me a bit. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=394&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">Ever since I heard about <a title="Plasma" href="http://plasma.kde.org/" target="_blank">plasma</a> I was eager to find ways to write my own plasmoid. But for the development of binary plasmoids, it is necessary to compile at least a part of kde4, at least this is what I understood from the prerequisite listed on the official <a href="http://techbase.kde.org/Development/Tutorials/Plasma/GettingStarted">tutorial</a>. This discouraged me a bit. Moreover, I think that installation of the binary gadgets also requires to either package them properly according to the distribution you want to distribute for or you need to provide the sources that requires the users to build them. This  in my opinion is really a huge overhead for small applications like desktop gadgets / widgets. Then I found that it is also possible to develop plasmoids with script languages like <a title="Plasmoids in python" href="http://techbase.kde.org/Development/Tutorials/Plasma#Plasma_Programming_with_Python" target="_blank">python</a>, <a title="Plasmoids in ruby" href="http://techbase.kde.org/Development/Tutorials/Plasma#Plasma_Programming_with_Ruby" target="_blank">ruby</a> and <a title="Plasmoids in javascript" href="http://techbase.kde.org/Development/Tutorials/Plasma#Plasma_Programming_with_JavaScript" target="_blank">javascript</a>.</p>
<p style="text-align:justify;">Even though, I didn&#8217;t know PyQT4 or PyKDE4 libraries at all, I decided to write my first plasmoid in python.  This is an exremely simple plasmoid, the core of which was put together in a few hours on a rainy weekend. I have to admit that being a java developer, my code is not pythonic enough.</p>
<p style="text-align:justify;">
<p style="text-align:justify;">It can be downloaded from: <a title="plasma_pyweather" href="http://kde-look.org/content/show.php?content=110137" target="_blank">kde-look</a>.</p>
<p style="text-align:justify;">Here the source code: <a title="plasma_pyweather" href="http://github.com/rangalo/plasma_pyweather/tree/non-widget" target="_blank">plasma_pyweather</a>.</p>
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;"><img class="alignleft size-full wp-image-459" style="margin-left:10px;margin-right:10px;" title="wplasmoid_greytrans" src="http://hardikmehta.files.wordpress.com/2009/08/wplasmoid_greytrans.png?w=632" alt="wplasmoid_greytrans"   />The layout is based on my conky setup described <a title="Conky weather script" href="http://hardikmehta.wordpress.com/2009/08/04/a-script-to-display-weather-forecast-for-conkyconky-screen-shot/" target="_blank">here</a>. I have tried to keep it as compact as possible including most of the provided information, if not all.  I don&#8217;t want the weather information to cover most of the screen.  The initial version of the plasmoid was written using the QT4 widgets, but was looking ugly.</p>
<p style="text-align:justify;">The weather information is fetched from <a title="Google weather api" href="http://blog.emerick.org/2008/05/07/google-weather-api-feed-documentation/" target="_blank">google weather api</a>. The location and the unit are configurable. The api provides forecast only for the next 3 days, so the number of forecast days were not made configurable.  Some how for google weather api the locale and so the unit is connected to the language, therefor  I had to convert the units myself. To keep the display compact I rounded the temperatures to integers.</p>
<p style="text-align:justify;">I got to learn PyQT4 and PyKDE4 libraries while writing this. Especially PyQT4 is a very powerful gui library for python.  It is fun programming with it. I have used <a title="Eclipse" href="http://eclipse.org/" target="_blank">eclipse</a> + <a title="Pydev" href="http://pydev.sourceforge.net/" target="_blank">pydev</a> for developing. In the beginning I didn&#8217;t have the auto-completion for PyQT4 as well as PyKDE4 in this environment, because they are not installed as pure python source code files. I could fix this with following <a title="Answer" href="http://stackoverflow.com/questions/1167065/autocompletion-not-working-with-pyqt4-and-pykde4-in-most-of-the-ides/1167292#1167292" target="_blank">answer</a>.</p>
<p style="text-align:justify;">The other interesting things, I learned was to use the <a title="QT4 Designer" href="http://doc.trolltech.com/4.0/qt4-designer.html" target="_blank">qt-designer </a>tool for creating gui. It is a nice <a title="WYSIWYG" href="http://en.wikipedia.org/wiki/WYSIWYG" target="_blank">WYSIWYG</a> tool for designing complex guis. The configuration form is designed using this tool. The qt-designer creates a .ui file, which is an xml file. The .ui file can be converted to the python source code using the pyuic4 tool in the following way.</p>
<pre class="brush: bash; title: ; notranslate">
pyuic4 -o configForm_ui.py ../ui/configForm.ui
</pre>
<p style="text-align:justify;">I also learned to use the .qrc file for resources like images. The .qrc file can be converted into python source code using  pyrcc4 tool</p>
<pre class="brush: bash; title: ; notranslate">
pyrcc4 -o images_rc.py images.qrc
</pre>
<p style="text-align:justify;">
<p style="text-align:justify;">The qrc file is also an xml file which contains the references to the images used. It can be created by just editing.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;RCC&gt;
    &lt;qresource prefix=&quot;/images&quot;&gt;
        &lt;file alias=&quot;sunny.svgz&quot;&gt;../images/sunny.svgz&lt;/file&gt;
        &lt;file alias=&quot;showers.svgz&quot;&gt;../images/showers.svgz&lt;/file&gt;
        &lt;file alias=&quot;not-available.svgz&quot;&gt;../images/not-available.svgz&lt;/file&gt;
        &lt;file alias=&quot;cloudy.svgz&quot;&gt;../images/cloudy.svgz&lt;/file&gt;
        &lt;file alias=&quot;thunderstorms.svgz&quot;&gt;../images/thunderstorms.svgz&lt;/file&gt;
        &lt;file alias=&quot;haze.svgz&quot;&gt;../images/haze.svgz&lt;/file&gt;
        &lt;file alias=&quot;windy.svgz&quot;&gt;../images/windy.svgz&lt;/file&gt;
    &lt;/qresource&gt;
&lt;/RCC&gt;
</pre>
<p style="text-align:justify;">I decided to write this weather plasmoid in python, because all the other weather plasmoids I found were binaries. I have also tried to keep the data and presentation layer separate, I hope I succeeded in that.  In fact plasma framework provides a very good way of doing that in terms of <a title="Data Engines" href="http://techbase.kde.org/Development/Tutorials/Plasma/Python/Using_DataEngines" target="_blank">data engines</a>. I would also like to use the data engines, may be with this or other plasmoid I may develop.</p>
<p style="text-align:justify;">The svg images for weather conditions are taken from kde-look. The credit goes to the original artist, painkiller10. I have considered only a number of weather conditions, so If you see a question mark image as the weather condition, let me know which condition it is, so I can update the code to consider it.</p>
<p style="text-align:justify;">Please feel free to report any bugs or suggestions for improvement. I am sure there is a big room of improvement from code point of view as well as functionality. I am also open for changing the layout or changing the information displayed if someone comes with a better suggestion than the current one.</p>
<p style="text-align:justify;"><strong>Some more screen shots:</strong></p>
<p style="text-align:justify;"><strong> </strong></p>
<div id="attachment_493" class="wp-caption aligncenter" style="width: 548px"><strong><strong><img class="size-full wp-image-493 " title="wplasmoid_seamless-tmb" src="http://hardikmehta.files.wordpress.com/2009/08/wplasmoid_seamless-tmb1.png?w=632" alt="Looks almost like conky with the seamless theme."   /></strong></strong><p class="wp-caption-text">Looks almost like conky with the seamless theme.</p></div>
<p><strong> </strong></p>
<div id="attachment_460" class="wp-caption aligncenter" style="width: 570px"><img class="size-full wp-image-460 " title="wplasmoid_settings" src="http://hardikmehta.files.wordpress.com/2009/08/wplasmoid_settings.png?w=632" alt="wplasmoid_settings"   /><p class="wp-caption-text">With settings dialog box</p></div>
<p style="text-align:center;">
<br /> Tagged: desktop, eclipse, forecast, gadget, google weather api, kde4, plasmoid, pydev, pykde4, pyqt4, Python, python-plasmoid, qt4, weather, widget <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/394/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/394/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=394&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2009/08/13/a-weather-plasmoid-in-python/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2009/08/wplasmoid_greytrans.png" medium="image">
			<media:title type="html">wplasmoid_greytrans</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2009/08/wplasmoid_seamless-tmb1.png" medium="image">
			<media:title type="html">wplasmoid_seamless-tmb</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2009/08/wplasmoid_settings.png" medium="image">
			<media:title type="html">wplasmoid_settings</media:title>
		</media:content>
	</item>
		<item>
		<title>A script to display weather forecast for conky</title>
		<link>http://hardikmehta.wordpress.com/2009/08/04/a-script-to-display-weather-forecast-for-conkyconky-screen-shot/</link>
		<comments>http://hardikmehta.wordpress.com/2009/08/04/a-script-to-display-weather-forecast-for-conkyconky-screen-shot/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 06:35:00 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[conky]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[fluxbox]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[google weather api]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[kde4]]></category>
		<category><![CDATA[openbox]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[weather]]></category>
		<category><![CDATA[weather forecast]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xslt]]></category>
		<category><![CDATA[xsltproc]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=400</guid>
		<description><![CDATA[Conky is undoubtedly the most configurable, versatile and amazing program I have ever come across.  With very little effort you can get a very sleek looking desktop. I have seen people using it to display all kinds of information under the sky.  Although, it can only display pure text, there is a possibility to use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=400&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">
<p style="text-align:justify;"><a title="conky" href="http://conky.sourceforge.net/" target="_blank">Conky</a> is undoubtedly the most configurable, versatile and amazing program I have ever come across.  With very little effort you can get a very sleek looking desktop. I have seen people using it to display all kinds of information under the sky.  Although, it can only display pure text, there is a possibility to use different symbolic fonts to display text based images.  Moreover, it is also very efficient program. Its own footprint is very small compared to most of the gadget frameworks like <a title="adesklets" href="http://adesklets.sourceforge.net/" target="_blank">adesklets</a>, <a title="gDesklets" href="http://www.gdesklets.de/" target="_blank">gDesklets</a> and of course <a title="plasma" href="http://plasma.kde.org/" target="_blank">plasma</a>.  Configuration is also relatively easy. The best way is to copy  configuration file from some one else and keep on changing it until you get what you want.  Another application worth mentioning here is <a title="dzen2" href="http://gotmor.googlepages.com/dzen" target="_blank">dzen2</a>. Dzen2 has ability to render any text graphically, although it lacks the built in variables of conky. In archlinux there is an application package called conky-cli which is a stripped down version of conky without X11 dependency. A combination of conky-cli and dzen2 is then used to make taskbars for minimalistic desktops like xmonad, wmii, dwm etc. Personally, I haven&#8217;t tried this combination yet.</p>
<p style="text-align:justify;"><img class="alignleft size-full wp-image-445" style="margin-left:10px;margin-right:10px;" title="conky screen shot" src="http://hardikmehta.files.wordpress.com/2009/08/conkydark_20090804.png?w=632" alt="conky screen shot"   /></p>
<p style="text-align:justify;"><a title="Ubuntu conky thread" href="http://ubuntuforums.org/showthread.php?t=281865" target="_blank">Ubuntu</a> and <a title="Arch conky thread" href="http://bbs.archlinux.org/viewtopic.php?id=39906" target="_blank">Archlinux</a> forums have dedicated threads with conky screen shots and config files. I came across many screen shots with weather information, forecast and small symbols with weather conditions. Most of them were using a perl script (for which I cannot find the link now) to fetch, parse and show the weather information from weather.com.  The weather symbols were ttf fonts.  I didn&#8217;t want to take the script one-to-one and perl is anyway too cryptic for me to  decipher. I decided to take the concept and develop something similar on my own.</p>
<p style="text-align:justify;">So I created the <a title="Weather script" href="http://github.com/rangalo/google_weather/tree/master" target="_blank">google weather</a> script. It is a simple bash script to fetch the xml file using <a title="Google" href="www.google.com" target="_blank">google</a> weather api, I changed the source because although weather.com was providing good information, they were changing the format of the request too often, their terms and conditions of usage were also not very comprehensible for me. Then I use different style-sheets to process the xml response and show different information depending on the argument passed to the bash script. I also use the weather.ttf fonts to render the symbols for different weather conditions.  For transforming xml, I use the <a title="xsltproc" href="http://xmlsoft.org/XSLT/xsltproc2.html" target="_blank">xsltproc</a> tool.</p>
<p style="text-align:justify;">Here is the conky running under kde4 desktop. With different desktop environments       conky needs to be adjusted  a bit. Another weakness of conky in integrating external scripts is that the output must be pre-formatted before supplying it to conky. Conky just takes the text and renders it.  In principle any executable can be called from conky to display its output.</p>
<p style="text-align:justify;">Conky has many built-in variables for displaying common system parameters which are well documented on the official <a title="Conky variables" href="http://conky.sourceforge.net/variables.html" target="_blank">documentation</a> page. Besides the common parameters like cpu / memory usage, uptime, upload-download speed, top 3 cpu using processes and top 3 memory using processes, the screen shot on the left also displays the dictionry.com <a title="Dictionary word of the day" href="http://dictionary.reference.com/wordoftheday/" target="_blank">word of the day</a> rss feed, which I find extremely useful. It also uses a similar script and xslt transformation. There is also a built-in rss feed processor in conky.</p>
<p style="text-align:justify;">I use <a title="mpd" href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki" target="_blank">mpd</a> for playing music. There is also built-in mpd support in conky and can be used to display information about current song being played. If you want to show different information at different places on the desktop, it is also possible to have multiple instances of conky running at the same time with different configuration files.</p>
<p style="text-align:justify;">As evident  in the screen shot it is difficult to adjust the spacing of the weather output due to mixing of different types and sizes of  fonts.  My script only considers some frequent weather conditions, but it can easily adapted to support many different weather conditions.  The spacing must be adjusted for individual setup by editing the line no. 16 in the  file fcConditions.xslt</p>
<p style="text-align:justify;">
<pre class="brush: xml; title: ; notranslate">
&lt;xsl:stylesheet xmlns:xsl=&quot;<a href="http://www.w3.org/1999/XSL/Transform&#038;quot" rel="nofollow">http://www.w3.org/1999/XSL/Transform&#038;quot</a>; version=&quot;1.0&quot; &gt;
    &lt;xsl:include href=&quot;conditionsInclude.xslt&quot;/&gt;
    &lt;xsl:output method=&quot;text&quot; disable-output-escaping=&quot;yes&quot; encoding=&quot;utf-8&quot;/&gt;
    &lt;xsl:template match=&quot;xml_api_reply&quot;&gt;
        &lt;xsl:apply-templates select=&quot;weather&quot;/&gt;
    &lt;/xsl:template&gt;

    &lt;xsl:template match=&quot;weather&quot;&gt;
        &lt;xsl:for-each select=&quot;forecast_conditions[position() &gt;= 2]&quot;&gt;
           &lt;xsl:call-template name=&quot;get-condition-symbol&quot;&gt;
                &lt;xsl:with-param name=&quot;condition&quot;&gt;
                    &lt;xsl:value-of select=&quot;condition/@data&quot;/&gt;
                &lt;/xsl:with-param&gt;
            &lt;/xsl:call-template&gt;
            &lt;xsl:if test=&quot;position() != 3&quot;&gt;
                &lt;xsl:text&gt; &lt;/xsl:text&gt;
            &lt;/xsl:if&gt;
        &lt;/xsl:for-each&gt;
    &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
</pre>
<p style="text-align:justify;">I have hard-coded the update interval to 1 hour. This can also be changed very easily to the required value by changing the value of the update variable in the weather.sh file.</p>
<pre class="brush: bash; title: ; notranslate">
# don't get the file if created within an hour
update=3600
</pre>
<p style="text-align:justify;">I use mainly following configurations for conky.</p>
<ul>
<li><a title="conkyrc" href="http://github.com/rangalo/dotfiles/blob/9261b02eb86f9605053523a0b4f84e882970928c/.conkyrc" target="_blank">Configuration for fluxbox / openbox</a>.</li>
<li><a title="conkyrc_kde4" href="http://github.com/rangalo/dotfiles/blob/9261b02eb86f9605053523a0b4f84e882970928c/.conkyrc_kde4" target="_blank">Configuration for kde4</a>.</li>
<li><a title="conkyrc_mpd" href="http://github.com/rangalo/dotfiles/blob/9261b02eb86f9605053523a0b4f84e882970928c/.conkyrc_mpd" target="_blank">Configuration for mpd</a>.</li>
</ul>
<p>I have released the script with GPL V3 license, so feel free to use it if you like it. Please comment about any bug reports, improvements, questions or suggestions.</p>
<p style="text-align:justify;">
<br /> Tagged: bash, conky, desktop, fluxbox, gadget, google weather api, kde, kde4, Linux, openbox, plugin, weather, weather forecast, widget, xml, xslt, xsltproc <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/400/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=400&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2009/08/04/a-script-to-display-weather-forecast-for-conkyconky-screen-shot/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>

		<media:content url="http://hardikmehta.files.wordpress.com/2009/08/conkydark_20090804.png" medium="image">
			<media:title type="html">conky screen shot</media:title>
		</media:content>
	</item>
		<item>
		<title>Created a repository with github for storing / sharing config files</title>
		<link>http://hardikmehta.wordpress.com/2009/07/30/created-a-repository-with-github-for-storing-sharing-config-files/</link>
		<comments>http://hardikmehta.wordpress.com/2009/07/30/created-a-repository-with-github-for-storing-sharing-config-files/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 19:56:20 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[dotfiles]]></category>
		<category><![CDATA[file sharing]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=403</guid>
		<description><![CDATA[I noticed that since long time dotfiles.org website which I used to store and share my config files was unreachable.  So I created a repository with github. It is called dotfiles. I will update all the links pointing to my configs files to the new location. If you still notice some old links please drop [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=403&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">I noticed that since long time dotfiles.org website which I used to store and share my config files was unreachable.  So I created a repository with github. It is called <a title="dotfiles on github" href="http://github.com/rangalo/dotfiles/tree/master" target="_blank">dotfiles</a>. I will update all the links pointing to my configs files to the new location. If you still notice some old links please drop a comment.</p>
<br /> Tagged: config, dotfiles, file sharing, github, repository <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/403/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=403&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2009/07/30/created-a-repository-with-github-for-storing-sharing-config-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>Maven quirk ( archetype-j2ee-simple )</title>
		<link>http://hardikmehta.wordpress.com/2009/07/09/maven-quirk/</link>
		<comments>http://hardikmehta.wordpress.com/2009/07/09/maven-quirk/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 19:03:17 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[javaee]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[apache-maven]]></category>
		<category><![CDATA[build-tools]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[ejb3]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[pom]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=334</guid>
		<description><![CDATA[Update: The issue has been fixed. There were two points. 1. I was using the wrong (deprecated) goal archetype:create instead of archetype:generate. 2. With the plugin archetype-j2ee-simple there is a bug which is already reported here. I got my answer from Antony Stubbs on Stackoverflow. At last I also decided to join the maven[1] bandwagon, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=334&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="background-color:#F2F2F2;">
<p style="padding-left:60px;"><strong>Update:</strong></p>
<p style="padding-left:60px;">The issue has been fixed. There were two points.</p>
<p style="padding-left:60px;">1. I was using the wrong (deprecated) goal archetype:create instead of archetype:generate.</p>
<p style="padding-left:60px;">2. With the plugin archetype-j2ee-simple there is a bug which is already reported <a title="ARCHETYPE-228" href="http://jira.codehaus.org/browse/ARCHETYPE-228" target="_blank">here</a>.</p>
<p style="padding-left:60px;">I got my answer from Antony Stubbs on <a title="Stackoverflow" href="http://stackoverflow.com/questions/1082012/maven-archetype-j2ee-simple-generates-a-failing-project/1146961#1146961" target="_blank">Stackoverflow</a>.</p>
</div>
<p style="text-align:justify;">At last I also decided to join the maven[1] bandwagon, I will start using maven for managing my projects. Convention over configuration  sounds  indeed a nice idea.  When I first heard about maven  I didn&#8217;t have a good &#8220;feeling&#8221; about it, may be because I was too comfortable with ant and believe to be able to achieve any task with it. But now after reading some documentation and articles about maven, I came to realise it is completely new paradigm than ant. In my opinion the best aspect of maven is that you always have the big picture of your project in mind instead of a small task or operation to be done.  I started liking maven and  also started learning it.  For reference I have started following  Maven: The Definitive Guide[2]. Another great advantage could be that if you know maven and a join a new team which also uses maven for project management, you don&#8217;t have to spend hours or may be days trying to figure out the structure of their project and being able to build it.</p>
<p style="text-align:justify;">Although I started liking maven, sometimes it feels like a strange tool, where you have to configure a lot to achieve your goal. if you want some custom stuff in your project. I also find it annoying that by default the compiler-plugin assumes you want to build for java 1.4 or java 1.3.  Moreover, because there are always so called sensible or obvious defaults assumed, in maven world, not all the obvious defaults are obvious to you and you have to know the documentation well to be able to know what those defaults are. and how you can achieve something different. It feels somewhat like javadocs, until you get used to the apis you need frequently, you have to rely on auto-completion of your IDE or have the javadoc always open. There is no wonder that the second part of the book, I mentioned contains only the maven reference.</p>
<p style="text-align:justify;">But, yes, I am here to talk about the quirk of maven which I encountered during my learning process. I am just a maven beginner, so may be this is normal behavior, but I don&#8217;t think so.</p>
<p style="text-align:justify;">So, while starting to learn maven, I started with a contrived JavaEE application (brave huh), which is taken as example in the very good book EJB 3 in Action[3]. I searched the net and found out about the maven archetype j2ee-simple <a title="Maven archetype j2ee simple" href="http://maven.apache.org/plugins/maven-archetype-plugin/examples/j2ee-simple.html" target="_blank">here.</a> I used following commandline to generate the stubs of a simple JavaEE project, actually I was interested in the standard directory structure.</p>
<p style="text-align:justify;">
<pre class="brush: bash; title: ; notranslate">mvn archetype:create -DgroupId=com.hardik -DartifactId=ActionBazaar -DarchetypeArtifactId=maven-archetype-j2ee-simple</pre>
<p style="text-align:justify;">
<p style="text-align:justify;">The project was created perfectly, but by default it was not compiling. When I executed mvn intall I had following errors.</p>
<p style="text-align:justify;">
<pre class="brush: java; title: ; notranslate">$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: unknown

Reason: Could not find the model file '/home/hardik/projects/ActionBazaar/site'. for project unknown

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Could not find the model file '/home/hardik/projects/ActionBazaar/site'. for project unknown
    at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:432)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:300)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
    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.project.ProjectBuildingException: Could not find the model file '/home/hardik/projects/ActionBazaar/site'. for project unknown
    at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1575)
    at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
    at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
    at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:632)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:515)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:588)
    at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:419)
    ... 12 more
Caused by: java.io.FileNotFoundException: /home/hardik/projects/ActionBazaar/site (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:106)
    at hidden.org.codehaus.plexus.util.xml.XmlReader.&lt;init&gt;(XmlReader.java:124)
    at hidden.org.codehaus.plexus.util.xml.XmlStreamReader.&lt;init&gt;(XmlStreamReader.java:67)
    at hidden.org.codehaus.plexus.util.ReaderFactory.newXmlReader(ReaderFactory.java:118)
    at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1570)
    ... 18 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: &lt; 1 second
[INFO] Finished at: Thu Jul 09 18:44:31 CEST 2009
[INFO] Final Memory: 1M/4M

[INFO] ------------------------------------------------------------------------</pre>
<p style="text-align:justify;">
<p style="text-align:justify;">It is talking about some model file for the site module. The site module is generally the &#8220;website&#8221; of your project that maven generates just by looking at your pom.xml file. I removed the site module from the module list of the pom file and it started working. But I still wonder why the default project structure doesn&#8217;t build. I am sure this is incorrect behavior.</p>
<p style="text-align:justify;">If someone has had the same problem, and was able to fix, please let me know.</p>
<p style="text-align:justify;">
<p style="text-align:justify;"><strong>References:</strong></p>
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<ol>
<li><a title="apache-maven" rel="imdb" href="http://maven.apache.org/" target="_blank">Apache-maven</a></li>
<li><a title="Maven Book" href="http://www.sonatype.com/books/maven-book/reference/" target="_blank">Maven: The Definitive Guide</a></li>
<li> <a title="EJB 3 In Action" href="http://www.manning.com/panda/" target="_blank">EJB 3 in Action</a></li>
</ol>
<p style="text-align:justify;">
<p style="text-align:justify;">
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:23px;width:1px;height:1px;">$ mvn install<br />
[INFO] Scanning for projects&#8230;<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[ERROR] FATAL ERROR<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] Error building POM (may not be this project&#8217;s POM).Project ID: unknown</p>
<p>Reason: Could not find the model file &#8216;/home/hardik/projects/ActionBazaar/site&#8217;. for project unknown</p>
<p>[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] Trace<br />
org.apache.maven.reactor.MavenExecutionException: Could not find the model file &#8216;/home/hardik/projects/ActionBazaar/site&#8217;. for project unknown<br />
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:432)<br />
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:300)<br />
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)<br />
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)<br />
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
at java.lang.reflect.Method.invoke(Method.java:597)<br />
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)<br />
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)<br />
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)<br />
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)<br />
Caused by: org.apache.maven.project.ProjectBuildingException: Could not find the model file &#8216;/home/hardik/projects/ActionBazaar/site&#8217;. for project unknown<br />
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1575)<br />
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)<br />
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)<br />
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:632)<br />
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:515)<br />
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:588)<br />
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:419)<br />
&#8230; 12 more<br />
Caused by: java.io.FileNotFoundException: /home/hardik/projects/ActionBazaar/site (No such file or directory)<br />
at java.io.FileInputStream.open(Native Method)<br />
at java.io.FileInputStream.&amp;lt;init&gt;(FileInputStream.java:106)<br />
at hidden.org.codehaus.plexus.util.xml.XmlReader.&amp;lt;init&gt;(XmlReader.java:124)<br />
at hidden.org.codehaus.plexus.util.xml.XmlStreamReader.&amp;lt;init&gt;(XmlStreamReader.java:67)<br />
at hidden.org.codehaus.plexus.util.ReaderFactory.newXmlReader(ReaderFactory.java:118)<br />
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1570)<br />
&#8230; 18 more<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] Total time: &lt; 1 second<br />
[INFO] Finished at: Thu Jul 09 18:44:31 CEST 2009<br />
[INFO] Final Memory: 1M/4M<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p></div>
<br /> Tagged: ant, apache-maven, build-tools, ejb, ejb3, j2ee, Java, javaee, maven, pom <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/334/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/334/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=334&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2009/07/09/maven-quirk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>
	</item>
		<item>
		<title>Glassfish plugin on Eclipse 3.5 (Galileo)</title>
		<link>http://hardikmehta.wordpress.com/2009/06/29/glassfish-plugin-on-eclipse-3-5-galileo/</link>
		<comments>http://hardikmehta.wordpress.com/2009/06/29/glassfish-plugin-on-eclipse-3-5-galileo/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 09:37:52 +0000</pubDate>
		<dc:creator>hardikmehta</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javaee]]></category>
		<category><![CDATA[eclipse-plugin]]></category>
		<category><![CDATA[galileo]]></category>
		<category><![CDATA[glassfish]]></category>

		<guid isPermaLink="false">http://hardikmehta.wordpress.com/?p=312</guid>
		<description><![CDATA[Eclipse 3.5 also called Galileo is out. I tried to install the glassfish application server plugin with the standard method described here, but it failed with the following error message After searching a lot I found a way to install it using the update site http://ajax.dev.java.net/eclipse, like any other plugin. This worked well. May be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=312&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:justify;">Eclipse 3.5 also called <a title="Eclipse Galileo" href="http://www.eclipse.org/galileo/" target="_blank">Galileo</a> is out. I tried to install the glassfish application server plugin with the standard method described <a title="Getting Glassfish plugin" href="https://glassfishplugins.dev.java.net/eclipse34/index.html#getting" target="_blank">here</a>, but it failed with the following error message</p>
<pre class="brush: java; title: ; notranslate">

session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,com.sun.enterprise.jst.server.sunappsrv,1.0.28
No repository found containing: org.eclipse.update.feature,com.sun.enterprise.jst.server.sunappsrv.feature,1.0.28

</pre>
<p style="text-align:justify;">After searching a lot I found a way to install it using the update site <a rel="nofollow" href="http://ajax.dev.java.net/eclipse">http://ajax.dev.java.net/eclipse</a>, like any other plugin. This worked well.</p>
<p style="text-align:justify;">May be the problem is temporary and after sometime the standard way will also start working.</p>
<br /> Tagged: eclipse, eclipse-plugin, galileo, glassfish, javaee <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hardikmehta.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hardikmehta.wordpress.com/312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hardikmehta.wordpress.com&#038;blog=3954424&#038;post=312&#038;subd=hardikmehta&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hardikmehta.wordpress.com/2009/06/29/glassfish-plugin-on-eclipse-3-5-galileo/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/74fde935e21ce03bcbbb2210d8e7a1a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hardikmehta</media:title>
		</media:content>
	</item>
	</channel>
</rss>
