<?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/"
	>

<channel>
	<title>cwash into software &#187; java</title>
	<atom:link href="http://cwash.org/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://cwash.org</link>
	<description>+= construction + craftsmanship;</description>
	<lastBuildDate>Thu, 29 Sep 2011 04:23:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>What is Hamcrest?</title>
		<link>http://cwash.org/2009/06/03/what-is-hamcrest/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=what-is-hamcrest</link>
		<comments>http://cwash.org/2009/06/03/what-is-hamcrest/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 10:37:54 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Developer Testing]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[assertThat]]></category>
		<category><![CDATA[CapTech]]></category>
		<category><![CDATA[developer testing]]></category>
		<category><![CDATA[hamcrest]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=220</guid>
		<description><![CDATA[What is Hamcrest?  An introduction to the constraint/matcher/predicate framework for Java.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2009/06/03/what-is-hamcrest/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>As of JUnit 4.4, if you happen to peek into the distributed JAR you&#8217;ll notice something a little off: in addition to the org.junit.* packages there is this a funny-looking org.hamcrest.* package sticking out like a sore thumb.  You may have seen other projects pick up a dependency on Hamcrest lately as well, and I bet you&#8217;re wondering what it is.  Let&#8217;s get to the bottom of it.<span id="more-220"></span></p>
<h3>Introduction</h3>
<p>The &#8220;I&#8217;m Feeling Lucky&#8221; Google search for the term <em>hamcrest</em> currently takes you to the project&#8217;s Google Code page that states Hamcrest:</p>
<blockquote><p>Provides a library of matcher objects (also known as constraints or predicates) allowing &#8216;match&#8217; rules to be defined declaratively, to be used in other frameworks.</p></blockquote>
<p>That&#8217;s a pretty good description if you already know what a Matcher is&#8230; but it doesn&#8217;t explain much for a beginner.  So what does Hamcrest really do for you?  </p>
<div id="attachment_221" class="wp-caption alignright" style="width: 210px"><a href="http://cwash.org/wp-content/uploads/2009/05/sammy.jpg"><img class="size-full wp-image-221" title="Sammy Stevens" src="http://cwash.org/wp-content/uploads/2009/05/sammy.jpg" alt="Sammy Stevens - Flea Market!" width="200" height="157" /></a><p class="wp-caption-text">It&#39;s just like... It&#39;s just like... A mini... REGEX!</p></div>
<p>A good way to think of it is that <strong>Hamcrest is to objects what regular expressions are to text</strong>.<br />
 Hamcrest provides you with a set of methods that effectively define a <strong>DSL</strong> to do <em>pattern-matching on objects</em>.</p>
<p>What can you use it for?  Well, like regular expressions, the possibilities are endless.  Some really novel uses have come about recently, but the most prominent use has been in the area of testing &#8211; hence the JUnit dependency.  </p>
<h3>A Brief History</h3>
<p>Hamcrest evolved out of the library JMock, being used to write specialized constraints on what you expected to happen to a Mock object when standing in for a real implementation.  A more fluent assertion syntax arose from these constraints which allowed you to chain together main constraint calls under a single <strong>assertThat</strong> method.  Later JMock&#8217;s author, Joe Walnes, refactored the constraint API out into its own library called Hamcrest as people became interested in using it outside of a testing framework for all kinds of different things.  He also started calling the constraints &#8220;matchers&#8221; though they can go by both names or, in some circles, &#8220;predicates.&#8221;  Other testing frameworks and even JUnit, notorious for not requiring any dependencies and staying conceptually small, have picked it up.</p>
<p>All those old friendly org.junit.Assert.* static methods are still around in JUnit 4.4+.  They&#8217;re useful for certain things, but by and large they&#8217;ve fallen out of style.  The new kid on the block, JUnit&#8217;s <strong>assertThat</strong> method allows you to pass a Matcher in to create an assertion that you would otherwise use a specialized-assert method.  Why is assertThat so useful?  A few different reasons.  Not only does it provide a more generic way to specify assertions, it also alows the framework to know specifically what you&#8217;re trying to assert.  That allows the framework to generate failure messages for you.</p>
<h3>Fail message&#8230; win?</h3>
<p>It&#8217;s always been a good idea to use the overridden version of assertX method that also takes a String for a failure message, for example:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">assertTrue<span style="color: #009900;">&#40;</span>blackbeard.<span style="color: #006633;">getOccupations</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">contains</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;pirate&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <br />
&nbsp; &nbsp; blackbeard.<span style="color: #006633;">getOccupations</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">contains</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;captain&quot;</span><span style="color: #009900;">&#41;</span>, <br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;Expected Blackbeard to be a pirate or a captain&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>If we passed in an object representing a childhood version of Blackbeard, say, (before he took to the high-seas) then we&#8217;d expect to see our failure message:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">java.lang.AssertionError: Expected Blackbeard to be a pirate or a captain</div></div>
<p>It&#8217;s always been a good idea to provide these messages.  But there&#8217;s no getting around the fact that they&#8217;re repetitive, tedious, and redundant.</p>
<p>Using Hamcrest matchers alongside assertThat makes JUnit smart enough to generate meaningful failure messages for you: writing your assertion with <strong>Hamcrest matchers provides the framework with enough contextual information to generate meaningful failure messages on your behalf</strong>.  No need to maintain an extra arbitrary String to make sense of your failed assertions:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">assertThat<span style="color: #009900;">&#40;</span>blackbeard.<span style="color: #006633;">getOccupations</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; anyOf<span style="color: #009900;">&#40;</span>hasItem<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;pirate&quot;</span><span style="color: #009900;">&#41;</span>,hasItem<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;captain&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>This may not look like much of an improvement, but it also doesn&#8217;t read any worse.    We can ditch the extra String parameter as well.  When this fails we&#8217;ll get a pretty cool failure message for free:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">java.lang.AssertionError: <br />
Expected: (a collection containing &quot;pirate&quot; or a collection containing &quot;captain&quot;)<br />
&nbsp; &nbsp; &nbsp;got: &lt; []&gt;</div></div>
<p><em>Note: I&#8217;m using JUnit 4.6 &#8211; in order to get this syntax to work you need to do some static imports:</em></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">import static org.junit.Assert.*;<br />
import static org.hamcrest.CoreMatchers.*;<br />
import static org.junit.matchers.JUnitMatchers.*;</div></div>
<p>It looks like there&#8217;s still work being done to make this DSL read more fluently in JUnit; something like:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">assertThat<span style="color: #009900;">&#40;</span>blackbeard.<span style="color: #006633;">getOccupations</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; either<span style="color: #009900;">&#40;</span>hasItem<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;pirate&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">or</span><span style="color: #009900;">&#40;</span>hasItem<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;captain&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<h3>Other Cool Stuff</h3>
<h5>Getting Reused</h5>
<p>TestNG, JMock and many other testing frameworks will certainly benefit from what Hamcrest offers, but we&#8217;re starting to see this being used in many other places as well.  I&#8217;ll be interested to see how well matchers work together or are maintained seeing that they&#8217;re relatively easy to create.  Hopefully frameworks will contribute useful matchers back to the project.</p>
<h5>Chaining</h5>
<p>Because the matchers are implemented as a DSL using the <a href="http://martinfowler.com/dslwip/MethodChaining.html">method chaining idiom</a>, they&#8217;re extremely easy to combine and extend.</p>
<h5>Matchers For Regular Expressions</h5>
<p>To bring the blog post full circle, I found this earlier tonight: the <a href="http://code.google.com/p/hamcrest-text-patterns/">Hamcrest Text Patterns project</a>.  Its goal is to have you write Hamcrest-style regular expressions using matchers which will produce much more readable regular expression code.  For example, have a look at this test that I found in the project:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">PatternMatcher emailAddressMatcher <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PatternMatcher<span style="color: #009900;">&#40;</span>sequence<span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; capture<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;user&quot;</span>, oneOrMore<span style="color: #009900;">&#40;</span>anyCharacter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>, <br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;@&quot;</span>, <br />
&nbsp; &nbsp; capture<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;host&quot;</span>, oneOrMore<span style="color: #009900;">&#40;</span>anyCharacter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
PatternMatcher mailToURLMatcher <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PatternMatcher<span style="color: #009900;">&#40;</span>sequence<span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; capture<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;scheme&quot;</span>, text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mailto&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>, <br />
&nbsp; &nbsp; <span style="color: #0000ff;">&quot;:&quot;</span>, <br />
&nbsp; &nbsp; capture<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;email&quot;</span>, emailAddressMatcher<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
assertThat<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mailto:npryce@users.sf.net&quot;</span>, matchesPattern<span style="color: #009900;">&#40;</span>mailToURLMatcher<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>By providing a friendly name for each capture (user, host, scheme, email) you can provide meaningful messages programmatically about what doesn&#8217;t match up when something doesn&#8217;t match.</p>
<h3>Conclusion</h3>
<p>I hope you choose to take a closer look at Hamcrest because it brings a big bang-for-the-buck and has the potential to guide us to more human-friendly, readable code.</p>
<h3>Further Reading</h3>
<ul>
<li>Have a look at Joe Walnes&#8217; blog for a great <a href="http://joe.truemesh.com/blog/000511.html">introduction to using assertThat</a> as well as other <a href="http://joe.truemesh.com/blog/000705.html">creative uses of Hamcrest matchers</a>.</li>
<li>Also take a look at Nat Pryce&#8217;s blog for <a href="http://www.natpryce.com/articles/000662.html">more info on Hamcrest</a> and Testing in general.</li>
</ul>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2009/06/03/what-is-hamcrest/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=What+is+Hamcrest%3F&amp;link=http://cwash.org/2009/06/03/what-is-hamcrest/&amp;notes=What%20is%20Hamcrest%3F%20%20An%20introduction%20to%20the%20constraint%2Fmatcher%2Fpredicate%20framework%20for%20Java.&amp;short_link=http://bit.ly/bJB6uY&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>November 19, 2008 -- <a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/" title="Java 6 and Maven 2.0.9 on Leopard">Java 6 and Maven 2.0.9 on Leopard</a> (7)</li><li>July 8, 2010 -- <a href="http://cwash.org/2010/07/08/transactions-part-1/" title="Transactions, Part 1">Transactions, Part 1</a> (0)</li><li>January 7, 2010 -- <a href="http://cwash.org/2010/01/07/eliminate-branching-if-statements-to-produce-better-code/" title="Eliminate Branching (IF Statements) to Produce Better Code">Eliminate Branching (IF Statements) to Produce Better Code</a> (0)</li><li>July 29, 2009 -- <a href="http://cwash.org/2009/07/29/what-id-tell-myself-about-design-if-i-were-just-beginning/" title="What I&#8217;d Tell Myself About Design If I Were Just Beginning">What I&#8217;d Tell Myself About Design If I Were Just Beginning</a> (5)</li><li>July 24, 2009 -- <a href="http://cwash.org/2009/07/24/the-elements-of-reusable-code/" title="The Elements of Reusable Code">The Elements of Reusable Code</a> (0)</li><li>February 17, 2009 -- <a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/" title="Don&#8217;t Unit Test Anymore&#8230; No, Really!">Don&#8217;t Unit Test Anymore&#8230; No, Really!</a> (6)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>September 10, 2008 -- <a href="http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/" title="Axis2 client using ADB &#8211; runtime dependencies">Axis2 client using ADB &#8211; runtime dependencies</a> (6)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2009/06/03/what-is-hamcrest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSGi-ggity-Giggity</title>
		<link>http://cwash.org/2009/04/15/osgi-ggity-giggity/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=osgi-ggity-giggity</link>
		<comments>http://cwash.org/2009/04/15/osgi-ggity-giggity/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 21:40:01 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[CapTech]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[modularity]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=205</guid>
		<description><![CDATA[Thoughts on the OSGi service platform for modularity.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2009/04/15/osgi-ggity-giggity/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p><strong>Update:</strong> A great article on OSGi popped up on Javalobby today.  <a href="http://java.dzone.com/articles/dozen-osgi-myths-and">Check it out</a>.</p>
<p>I haven&#8217;t yet written any thoughts about OSGi but it&#8217;s something that&#8217;s increasingly found its way on to my radar over the past year and a half or so.  I&#8217;ve been doing a little bit of reading and research on it lately, (a quick introduction can be found via <a href="http://www.infoq.com/interviews/osgi-adrian-colyer">Adrian Colyer&#8217;s talks on InfoQ</a> about it).  Needless to say it&#8217;s got me excited.  Really excited &#8211; to the point where I&#8217;m catching myself geeking out uncontrollably like Quagmire from Family Guy.  What&#8217;s got me all giggity? <span id="more-205"></span> Let&#8217;s take a step back first.</p>
<p>With Java there has always been a focus on modularity, but it&#8217;s come up in different intermediate forms.  Any typical Java developer can go on for hours about the importance for layering and properly isolating, decoupling and packaging components and subsystems.  Java has the idea of a package, and the idea of JARs came about fairly early on in the process.  But what became difficult was that often each layer had to have its own supporting infrastructure in place to be built independently, and someone needed to know how all of those JAR dependencies mapped out at build time and runtime.  This was a necessary evil so that we could have individually deployable modules or subsystems.  Once you got there, it was all worth it.</p>
<p>The problem was that while you may have been diligent and rigorous in your approach to applying how your projects were laid out and built, quite often the framework space solved this problem over and over again in many different ways.  Going to upgrade a library was not an easy task, because you had to typically upgrade it across each of your layers, and what&#8217;s more, there was no consistent approach to manage transitive dependencies amongst the modules each library used.  Library selection and dependency management was the work of a greybeard within your project and it took a while to change a library or upgrade.  Not to mention a near certainty that you&#8217;d need to execute your entire suite of regression tests to make sure nothing broke.</p>
<p>After seeing many Java frameworks being cajoled into a Maven build in order to manage builds and transitive dependencies, there has been increased awareness on the part of the vendor (be it commercial or open source) space on modularity.  But we&#8217;ve only focused on the problem of solving modularity from a build-centric view.  In other words, &#8220;How can I package and manage these build artifacts in such a way that consumers can easily integrate them into their project in a consistent and automated way?&#8221;  This was the pie-in-the-sky idea behind Maven as I see it, and they pretty much made it happen.  You&#8217;d be hard pressed to find a framework today that doesn&#8217;t support it in some fashion.</p>
<p>But there&#8217;s a whole separate piece of modularity that takes place at <em>runtime</em>.  In the context of my historical explanation of modularity within Java, you can look at OSGi&#8217;s ability to manage dependencies dynamically at runtime (via a header in your JAR MANIFEST file) as a &#8220;modularity win&#8221; and icing on the cake.  But OSGi indeed goes farther than that.  OSGi gives you the ability to install/uninstall, start and stop bundles dynamically (think Eclipse plugins) via its lifecycle, and that just plain gives me the &#8220;giggities.&#8221;  To account for truly dynamic modularity OSGi also gives you requires and provides semantics (also declared via headers) akin to the requires and provides semantics you see in dynamic languages like Ruby and some Javascript packaging/dependency management frameworks.  While this may seem like its strength is only in making a clear separation between APIs you use and export, its real strength is that this allows you to truly isolate your modules at runtime from trickery that can (and has) happened on a classloader level.  &#8220;That couldn&#8217;t possibly work on an App server,&#8221; you say?  I was skeptical, too, but not so fast&#8230;</p>
<p>If you&#8217;re the type that keeps up with the JCP space, you probably know there is a JSR &#8220;trinity&#8221; (equally as mysterious as its holy counterpart to the outside viewer) to provide a more robust modularization mechanism in varying degrees.  That &#8220;quagmire&#8221; withstanding, OSGi has been mounting a considerable lead as <em>the</em> modularization system of choice in the JavaSE and EE/App server space.  (It was already a formidable player in the embedded/mobile space, where it evolved from.)  Nearly all major App server vendors have integrated the OSGi model into their core, which means they&#8217;ve probably cleaned up any classloader nastiness they&#8217;ve resorted to in the past.  And now you&#8217;re seeing some of the leading frameworks like Spring and Web Beans/Seam 3 (and subsequently have signed up to publish themselves as OSGi bundles.)  Not to mention the success that Eclipse has seen since refactoring itself to work off its OSGi implementation, Equinox.</p>
<p>If OSGi can continue to make inroads in the framework space,  I think its prospects to the &#8220;in the trenches&#8221; Java developer are very exciting indeed.  Expect me to babble on more about this in the future&#8230;</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=OSGi-ggity-Giggity&amp;link=http://cwash.org/2009/04/15/osgi-ggity-giggity/&amp;notes=Thoughts%20on%20the%20OSGi%20service%20platform%20for%20modularity.&amp;short_link=http://bit.ly/99Hc01&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>July 24, 2009 -- <a href="http://cwash.org/2009/07/24/the-elements-of-reusable-code/" title="The Elements of Reusable Code">The Elements of Reusable Code</a> (0)</li><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>November 19, 2008 -- <a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/" title="Java 6 and Maven 2.0.9 on Leopard">Java 6 and Maven 2.0.9 on Leopard</a> (7)</li><li>March 19, 2008 -- <a href="http://cwash.org/2008/03/19/new-wave-logging/" title="New Wave Logging">New Wave Logging</a> (0)</li><li>July 8, 2010 -- <a href="http://cwash.org/2010/07/08/transactions-part-1/" title="Transactions, Part 1">Transactions, Part 1</a> (0)</li><li>January 7, 2010 -- <a href="http://cwash.org/2010/01/07/eliminate-branching-if-statements-to-produce-better-code/" title="Eliminate Branching (IF Statements) to Produce Better Code">Eliminate Branching (IF Statements) to Produce Better Code</a> (0)</li><li>July 29, 2009 -- <a href="http://cwash.org/2009/07/29/what-id-tell-myself-about-design-if-i-were-just-beginning/" title="What I&#8217;d Tell Myself About Design If I Were Just Beginning">What I&#8217;d Tell Myself About Design If I Were Just Beginning</a> (5)</li><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2009/04/15/osgi-ggity-giggity/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Must Haves/References For Modern Java EE Developers</title>
		<link>http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=must-havesreferences-for-modern-java-ee-developers</link>
		<comments>http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 01:10:54 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[JBoss Seam]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[guice]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javaee]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[references]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[testng]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=46</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/";</script>I&#8217;ve been doing a lot of reading lately and have been meaning to plug some of my favorite reads, and one of the things that I&#8217;ve been trying to read with an eye toward is for converting those that have been stuck on &#8220;behind-the-curve&#8221; projects to the new way of thinking and doing things. As [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>I&#8217;ve been doing a lot of reading lately and have been meaning to plug some of my favorite reads, and one of the things that I&#8217;ve been trying to read with an eye toward is for converting those that have been stuck on &#8220;behind-the-curve&#8221; projects to the new way of thinking and doing things.  As such, and just in time for the weekend, I&#8217;ve compiled a list of my favorites with an eye to the &#8220;movers and shakers&#8221; that have driven innovation in the Enterprise Java world recently.  Note that even though some of these links are specific to certain frameworks/technologies, there is a common thread throughout most of these that have a bigger focus on the best way to solve problems using Java 5/EE 5 constructs and concepts.</p>
<p>A book that should be on any Java developer&#8217;s shelf is <a href="http://www.amazon.com/gp/product/0321356683?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321356683">Effective Java (2nd Edition)</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=0321356683" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  <em>Make sure you get the second edition</em>, for all of the Java 5 changes.  <a href="http://www.youtube.com/watch?v=pi_I7oD_uGI">This talk by Joshua</a> should whet your appetite.  (His <a href="http://www.youtube.com/watch?v=aAb7hSCtvGw">talk on good API design</a> is also very good.)  You should also take a look at Bob Lee&#8217;s <a href="http://www.youtube.com/watch?v=FFXhXZnmEQM">talk on Guice</a>.  Guice&#8217;s philosophy and focus on typesafety has spilled over into Web Beans (and newer versions of Seam) and its annotation based approach has heavily influenced newer Spring features.  I especially like his points on type safety around the 11-minute mark.  The walkthrough at the end of the talk from &#8220;old way&#8221; to &#8220;new way&#8221; is great for people who haven&#8217;t really gotten away from Factories, Delegates, and Service Locators yet.</p>
<p>The Guice video mentions that a common thread in modern Java frameworks is a focus on testability. Testing is a very important concept that nearly all new frameworks have embraced, but you still need know-how to be successful with testing.  I&#8217;ve come across some great books recently in the automated (developer) testing arena.  I&#8217;ve found the most thorough book on the topic out there is Lasse Koskela&#8217;s <a href="http://www.amazon.com/gp/product/1932394850?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1932394850">Test Driven</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=1932394850" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  The ideas and topics discussed in the book are really language independent, and work equally well with other languages.  To cut your teeth on TestNG, which the Seam documentation turned me onto, I recommend the TestNG developers&#8217; book <a href="http://www.amazon.com/gp/product/0321503104?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321503104">Next Generation Java Testing: TestNG and Advanced Concepts</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=0321503104" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  Cedric Beust, also the author of EJBGen, and Hani Suleiman, author of the Bile Blog, produced a book that was a suprisingly good read.  It&#8217;s packed with a lot of knowledge and some interesting takes on EE concepts.  Newer versions of JUnit also include many of these features and concepts, so you&#8217;ll get the underpinnings of these concepts in this book.  <a href="http://www.youtube.com/watch?v=TtcEpryRy44">This video</a> gives you a basis to TestNG&#8217;s approach.</p>
<p>As one of the growing number of developers who have an application in the <a href="http://seamframework.org/Documentation/SeamInProductionListing" target="_new">Seam In Production</a> page, there are a few Seam resources I have to share.  Even if you don&#8217;t get into Seam, it should be on your radar because a lot of the core concepts around conversations have evolved into Web Beans, and are found other frameworks like Apache Orchestra and Spring WebFlow.  Pete Muir did a <a href="https://jboss.webex.com/ec0600l/eventcenter/recording/recordAction.do;jsessionid=JwTdnQw2TZrh1Zq715zmXWwHBD2ZW2fDynhW2dh7NxYnK1pKkLly!-1137412519?theAction=poprecord&#038;actname=%2Feventcenter%2Fframe%2Fg.do&#038;apiname=lsr.php&#038;renewticket=0&#038;renewticket=0&#038;actappname=ec0600l&#038;entappname=url0106l&#038;needFilter=false&#038;&#038;isurlact=true&#038;entactname=%2FnbrRecordingURL.do&#038;rID=34057132&#038;rKey=F88E0DE2EA1FAC2D&#038;recordID=34057132&#038;rnd=9027886079&#038;siteurl=jboss&#038;SP=EC&#038;AT=pb&#038;format=short">Webcast</a> that&#8217;s a great introduction to Seam 2.  </p>
<p>Author of <a href="http://solutionsfit.com/blog/" target="_new">one of my favorite Seam blogs</a>, Jacob Orshalick, has created a <a href="http://refcardz.dzone.com/refcardz/core-seam?oid=hom6084">DZone RefCard for Seam 2.1 Core</a>.  It&#8217;s right off the presses, being published this week, but is a great quick-capsule review of what Seam can do for you, and nice to have on your desk if you&#8217;re writing Seam.  If you need more in-depth descriptions of what&#8217;s on the RefCard, Jacob also coauthored the latest edition of the great Seam reference <a href="http://www.amazon.com/gp/product/0137129394?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0137129394">Seam Framework: Experience the Evolution of Java EE</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=0137129394" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.<br />
Dan Allen&#8217;s <a href="http://www.amazon.com/gp/product/1933988401?ie=UTF8&#038;tag=cwasintosoft-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1933988401">Seam in Action</a><img src="http://www.assoc-amazon.com/e/ir?t=cwasintosoft-20&#038;l=as2&#038;o=1&#038;a=1933988401" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> is another excellent resource.  Of course, the awesome <a href="http://seamframework.org/Documentation">Seam Docs</a> and <a href="http://www.seamframework.org/Community/Forums">Forums</a> always come in handy.  You should also RSS <a href="http://in.relation.to/">in.relation.to</a> – the Hibernate/Seam developers&#8217; group blog.</p>
<p>I know I&#8217;m leaving some great things out.  What resources do you think someone who is used to J2EE should take a look at to get them &#8220;up to speed&#8221; with the state of the art?</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Must+Haves%2FReferences+For+Modern+Java+EE+Developers&amp;link=http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/&amp;notes=I%27ve%20been%20doing%20a%20lot%20of%20reading%20lately%20and%20have%20been%20meaning%20to%20plug%20some%20of%20my%20favorite%20reads%2C%20and%20one%20of%20the%20things%20that%20I%27ve%20been%20trying%20to%20read%20with%20an%20eye%20toward%20is%20for%20converting%20those%20that%20have%20been%20stuck%20on%20%22behind-the-curve%22%20projects%20to%20the%20new%20way%20of%20thinking%20and%20doing%20things.%20%20As%20such%2C%20a&amp;short_link=http://bit.ly/bpUdbq&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>March 19, 2008 -- <a href="http://cwash.org/2008/03/19/new-wave-logging/" title="New Wave Logging">New Wave Logging</a> (0)</li><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>February 17, 2009 -- <a href="http://cwash.org/2009/02/17/dont-unit-test-anymore-no-really/" title="Don&#8217;t Unit Test Anymore&#8230; No, Really!">Don&#8217;t Unit Test Anymore&#8230; No, Really!</a> (6)</li><li>January 13, 2009 -- <a href="http://cwash.org/2009/01/13/on-software-quality/" title="On Software Quality">On Software Quality</a> (8)</li><li>August 21, 2008 -- <a href="http://cwash.org/2008/08/21/weblogic-92-seam-victory-is-mine/" title="Weblogic 9.2 + Seam : Victory is Mine!">Weblogic 9.2 + Seam : Victory is Mine!</a> (1)</li><li>August 2, 2008 -- <a href="http://cwash.org/2008/08/02/how-i-escape-the-reuse-trap/" title="How I Escape the &#8220;Reuse Trap&#8221;">How I Escape the &#8220;Reuse Trap&#8221;</a> (0)</li><li>July 21, 2008 -- <a href="http://cwash.org/2008/07/21/pimp-my-build/" title="Pimp My Build">Pimp My Build</a> (0)</li><li>March 13, 2008 -- <a href="http://cwash.org/2008/03/13/continuous-integration-dissected/" title="Continuous Integration Dissected">Continuous Integration Dissected</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java 6 and Maven 2.0.9 on Leopard</title>
		<link>http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=java-6-and-maven-209-on-leopard</link>
		<comments>http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 07:21:42 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[CapTech]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=31</guid>
		<description><![CDATA[A discussion/walk through of how to set up Java 6 and upgrade Maven (that is now included in the OS) in Leopard.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>Trying to run through a screencast I&#8217;m putting together after upgrading to Leopard, I noticed Maven giving me a <a href="http://www.nabble.com/archetype-generate%2C-goal-not-found-td17001546.html#a17251047" target="_blank">strange error</a> when trying to run archetype:generate and realized that Leopard includes its own version of Maven (and Ant) out of the box.  The problem is that it&#8217;s version 2.0.6, which doesn&#8217;t have support for this feature.  I then set about trying to upgrade Maven (and in the process, Java) and here is what I uncovered.<span id="more-31"></span></p>
<p>First of all, I screwed myself over a bit by customizing my /etc/profile under Tiger; there were changes to this file that came in with Leopard but I can&#8217;t see where the updater tried to merge them in at all.  There are changes in Leopard to how paths are configured using a script called /etc/path_helper, but I don&#8217;t have any of that getting executed.  It took me a while to figure out this was the reason my .profile, .bash_profile, etc weren&#8217;t getting source&#8217;d properly.  What I did was pull out all of my updates to /etc/profile and just add in the following:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.profile</div></div>
<p>So at least now I have my .profile getting loaded properly.  I&#8217;d still be interested to see someone&#8217;s /etc/profile that works out of the box with the call to /etc/path_helper, but this is all beside the point.</p>
<p>Applying the Java update was painless – it worked fine through the Apple Software Update utility.  You can download it <a href="http://support.apple.com/downloads/Java_for_Mac_OS_X_10_5_Update_2" target="_blank">here</a> manually if you need to.</p>
<p>Next, you&#8217;ll probably notice that Java 6 isn&#8217;t enabled by default.  <a href="http://blog.libinpan.com/2008/04/29/java-se-6-on-leopard-officially/" target="_blank">This blog</a> will show you how to switch over to 6 using the Java Preferences utility.  There is a flaw in the ointment, though – for some reason it appears that it doesn&#8217;t switch over all of the symlinks properly.  Maven&#8217;s startup script gets confused by this in a few steps.  You can read more about it in <a href="http://www.nabble.com/-jira--Created:-(MNG-3707)-mvn-script-cannot-compile-sources-which-use-java-1.6-classes-if-JAVA_HOME-is-set-td18967741.html" target="_blank">this message</a> (some JIRA comments) from their mailing list.  The workaround is to just point your JAVA_HOME directly to the 1.6/Home directory.</p>
<p>You can install the newer version of Maven at this point.  I saw <a href="http://www.kelvinwong.ca/2008/11/10/upgrade-your-maven-on-os-x-leopard/" target="_blank">this post</a> detailing the instructions, but it was what I expected.  Just download the latest version and extract it to where you keep these kinds of things.  Then you just have to update your .profile (or .bash_profile) to set up some environmental variables for you.  Here&#8217;s what I included in my ~/.profile:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">JAVA_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>JavaVM.framework<span style="color: #000000; font-weight: bold;">/</span>Versions<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.6</span><span style="color: #000000; font-weight: bold;">/</span>Home<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">M2_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>Java<span style="color: #000000; font-weight: bold;">/</span>apache-maven-2.0.9<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">M2</span>=<span style="color: #007800;">$M2_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$M2</span>:<span style="color: #007800;">$PATH</span></div></div>
<p>You&#8217;ll need to do source ~/.profile or exit out of your terminal and open it up again for the changes to take effect.  Once you do you can test to make sure you&#8217;re seeing the right version of Maven:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cwash:~ chris$ which mvn<br />
/Java/apache-maven-2.0.9/bin/mvn</div></div>
<p>You can also check this by doing:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cwash:~ chris$ mvn -v<br />
Maven version: 2.0.9<br />
Java version: 1.6.0_07<br />
OS name: &quot;mac os x&quot; version: &quot;10.5.5&quot; arch: &quot;x86_64&quot; Family: &quot;mac&quot;</div></div>
<p>I guess we can chalk this one up to kicking the tires on Leopard.  Hope this makes the process a little less painless for someone else!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Java+6+and+Maven+2.0.9+on+Leopard&amp;link=http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/&amp;notes=A%20discussion%2Fwalk%20through%20of%20how%20to%20set%20up%20Java%206%20and%20upgrade%20Maven%20%28that%20is%20now%20included%20in%20the%20OS%29%20in%20Leopard.&amp;short_link=http://bit.ly/aT7bVG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>August 1, 2008 -- <a href="http://cwash.org/2008/08/01/new-apple-wireless-keyboard/" title="New Apple Wireless Keyboard">New Apple Wireless Keyboard</a> (1)</li><li>July 21, 2008 -- <a href="http://cwash.org/2008/07/21/pimp-my-build/" title="Pimp My Build">Pimp My Build</a> (0)</li><li>July 8, 2010 -- <a href="http://cwash.org/2010/07/08/transactions-part-1/" title="Transactions, Part 1">Transactions, Part 1</a> (0)</li><li>January 7, 2010 -- <a href="http://cwash.org/2010/01/07/eliminate-branching-if-statements-to-produce-better-code/" title="Eliminate Branching (IF Statements) to Produce Better Code">Eliminate Branching (IF Statements) to Produce Better Code</a> (0)</li><li>July 29, 2009 -- <a href="http://cwash.org/2009/07/29/what-id-tell-myself-about-design-if-i-were-just-beginning/" title="What I&#8217;d Tell Myself About Design If I Were Just Beginning">What I&#8217;d Tell Myself About Design If I Were Just Beginning</a> (5)</li><li>July 24, 2009 -- <a href="http://cwash.org/2009/07/24/the-elements-of-reusable-code/" title="The Elements of Reusable Code">The Elements of Reusable Code</a> (0)</li><li>June 9, 2009 -- <a href="http://cwash.org/2009/06/09/mocking-with-jmockit/" title="Mocking with JMockit">Mocking with JMockit</a> (5)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Axis2 client using ADB &#8211; runtime dependencies</title>
		<link>http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=axis2-client-using-adb-runtime-dependencies</link>
		<comments>http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 22:04:49 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Axis2]]></category>
		<category><![CDATA[Dependencies]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=28</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/";</script>I couldn&#8217;t find any definitive answer to this question, so here&#8217;s what I found, just incase anyone else needs this little nugget of information: the runtime dependencies for an Axis2 client that uses Axis Data Binding (ADB): activation.jar axiom-api.jar axiom-dom.jar axiom-impl.jar axis2-java2wsdl.jar axis2-jaxws.jar axis2-jaxws-api.jar axis2-metadata.jar axis2-saaj.jar axis2-saaj-api.jar backport-util-concurrent.jar commons-codec.jar commons-fileupload.jar commons-httpclient.jar neethi.jar wsdl4j.jar wstx-asl.jar xml-resolver.jar [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>I couldn&#8217;t find any definitive answer to this question, so here&#8217;s what I found, just incase anyone else needs this little nugget of information: the runtime dependencies for an Axis2 client that uses Axis Data Binding (ADB):<br />
activation.jar<br />
axiom-api.jar<br />
axiom-dom.jar<br />
axiom-impl.jar<br />
axis2-java2wsdl.jar<br />
axis2-jaxws.jar<br />
axis2-jaxws-api.jar<br />
axis2-metadata.jar<br />
axis2-saaj.jar<br />
axis2-saaj-api.jar<br />
backport-util-concurrent.jar<br />
commons-codec.jar<br />
commons-fileupload.jar<br />
commons-httpclient.jar<br />
neethi.jar<br />
wsdl4j.jar<br />
wstx-asl.jar<br />
xml-resolver.jar<br />
xmlbeans.jar</p>
<p>It&#8217;s long, I know &#8211; but not as long as what you find in $AXIS2_HOME/lib!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Axis2+client+using+ADB+-+runtime+dependencies&amp;link=http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/&amp;notes=I%20couldn%27t%20find%20any%20definitive%20answer%20to%20this%20question%2C%20so%20here%27s%20what%20I%20found%2C%20just%20incase%20anyone%20else%20needs%20this%20little%20nugget%20of%20information%3A%20the%20runtime%20dependencies%20for%20an%20Axis2%20client%20that%20uses%20Axis%20Data%20Binding%20%28ADB%29%3A%0D%0Aactivation.jar%0D%0Aaxiom-api.jar%0D%0Aaxiom-dom.jar%0D%0Aaxiom-impl.jar%0D%0Aaxis2-java2w&amp;short_link=http://bit.ly/bxsEIU&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>November 19, 2008 -- <a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/" title="Java 6 and Maven 2.0.9 on Leopard">Java 6 and Maven 2.0.9 on Leopard</a> (7)</li><li>July 21, 2008 -- <a href="http://cwash.org/2008/07/21/pimp-my-build/" title="Pimp My Build">Pimp My Build</a> (0)</li><li>March 19, 2008 -- <a href="http://cwash.org/2008/03/19/new-wave-logging/" title="New Wave Logging">New Wave Logging</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Pimp My Build</title>
		<link>http://cwash.org/2008/07/21/pimp-my-build/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=pimp-my-build</link>
		<comments>http://cwash.org/2008/07/21/pimp-my-build/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 18:18:50 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[ivy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javaee]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[static analysis]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://cwash.org/?p=5</guid>
		<description><![CDATA[In terms of the sheer number of moving parts, extravagance, and complexity, the build-tool landscape is one of bells and whistles that can be a little tough to stay on top of. There are a few important pieces of a robust and valuable build, no matter what tools you use to achieve it, and by breaking the build into modules or categories, we can make a little bit of sense out of the chaos.
]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/07/21/pimp-my-build/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>In terms of the sheer number of moving parts, extravagance, and complexity, the build-tool landscape is one of bells and whistles that can be a little tough to stay on top of. There are a few important pieces of a robust and valuable build, no matter what tools you use to achieve it, and by breaking the build into modules or categories, we can make a little bit of sense out of the chaos.</p>
<p>In our vast build-tool landscape, there tend to be some zealous cults out there, entrenched deeply in their own camps and unwilling to venture out to explore what the rest of the landscape has to offer.   Thus, there have been some religious-like differences of opinion about which build tools are better and why.  Sadly you run across these types of biases all too often, which only pollutes the landscape and makes it more difficult to wrap your head the most basic questions underlying all tools:</p>
<ul>
<li>What does it accomplish?</li>
<li>When is it (or isn&#8217;t it) right for the job?</li>
<li>How do I use it effectively and efficiently?</li>
</ul>
<p>With a pragmatic view, we can try to cut through a lot of the BS and figure out if a tool is worth its weight in:</p>
<ol>
<li> dependencies/design complexity.</li>
<li>ease of use/interface complexity.</li>
<li>architectural decisions/compromises that it brings to the table.</li>
</ol>
<p>Does the tool get us to the goal of a single button build/deploy?  If the answer is yes, I&#8217;ll welcome it with open arms.  Does it add me a form of feedback or some kind of statistic that could be a kind of gauge on a dashboard?  Then I may be interested in it, but it&#8217;s not nearly as vital.</p>
<p>Here&#8217;s an outline of what I typically look to include in a project&#8217;s build before I am satisfied:</p>
<ul>
<li>Compile &#8211; Obviously your build script would be for naught if you didn&#8217;t include this piece.  There&#8217;s also something to be said about some dynamic/interpreted languages (that run on the JVM) taking the hit on this step and producing compiled versions.  The argument is akin to compiling your JSPs back in the day.</li>
<li>Unit test suite &#8211; Another one of those no-brainers!  You&#8217;ll obviously want to integrate your ability to run a single test or test suite from a build tool quickly and easily.</li>
<li>Test reports &#8211; Test reports are an important way of visualizing the health of your project and are usually the first place you&#8217;ll go when you see something wrong.  A must have.</li>
<li>Transitive dependency management &#8211; This is one of those sticky subjects that people like to argue about religiously.  Really the important thing to note here is that a crucial part of keeping your build clean and manageable is figuring out how to represent and resolve <em>transitive</em> dependencies, or second-level dependencies.  If your code directly depends on a library, odds are that library has its own run-time dependencies that need to be satisified in order for it to work properly.  Since managing the different versions of many different libraries can become tough when you start to look at different &#8220;stacks&#8221; of software, many people advocate having a tool help you resolve these dependencies so it&#8217;s not as daunting a task to get the entire stack to work again when you need to upgrade a single library.  Maven and Ivy solve this problem by introducing repositories that will house and dynamically resolve these versioning issues, in much the same manner as yum or apt-get does in the Linux world.  A lot of newbs will make the mistake of thinking this type of functionality will let them turn off their brain when it comes to think about their project&#8217;s dependencies.  They will be sorely mistaken!  The point of these to make resolving conflicts in transitive dependencies easier, they do not replace your brain, nor your obligation to know the dependencies in your project and how they fit together!</li>
<li>Utility ant tasks &#8211; the daunting part of learning how to write good builds has a bit to do with how much you know about the ant task landscape.  Nearly all libraries have tools that plug into ant, but which ones do you really need to know about?  I&#8217;ve found a few are quite powerful, particularly <a title="Replace Task" href="http://ant.apache.org/manual/CoreTasks/replace.html" target="_blank">replace</a>, <a title="Uptodate Task" href="http://ant.apache.org/manual/CoreTasks/uptodate.html">uptodate</a>, <a title="CvsTagDiff task" href="http://ant.apache.org/manual/CoreTasks/cvstagdiff.html" target="_blank">cvstagdiff</a> (and corresponding svn&#8217;s), <a title="XMLTask" href="http://www.oopsconsultancy.com/software/xmltask/" target="_blank">xmltask</a> and <a title="dbdeploy" href="http://dbdeploy.com/" target="_blank">dbdeploy</a>.  I think these tools should be looked at when you are trying to figure out how to accomplish something specific, and for that reason, they&#8217;re a bit more like &#8220;bells and whistles&#8221; than anything else.  The same goes for the next category, which arguably doesn&#8217;t even need to live in your build (but if you&#8217;re a team player, it&#8217;s a definite nice to have):</li>
<li>Static analysis &#8211; There have been a barage of slick static-analysis tools that have entered the Java landscape recently.  A few are <a title="FindBugs" href="http://findbugs.sourceforge.net/" target="_blank">FindBugs</a>, <a title="PMD" href="http://pmd.sourceforge.net/" target="_blank">PMD</a>, <a title="CheckStyle" href="http://checkstyle.sourceforge.net/" target="_blank">CheckStyle</a>.  While most of these tools have plugins that integrate nicely into an IDE, it&#8217;s also helpful to have them plugged into your build, too.  Just to make sure everyone is following the rules.  A few others I&#8217;ve seen that focus on cyclomatic complexity, cohesion/coupling are <a title="Metrics" href="http://metrics.sourceforge.net/">Metrics</a> and <a title="JDepend" href="http://clarkware.com/software/JDepend.html" target="_blank">JDepend</a>.</li>
</ul>
<p>What build tools fit into your pimped out script?</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/07/21/pimp-my-build/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Pimp+My+Build&amp;link=http://cwash.org/2008/07/21/pimp-my-build/&amp;notes=In%20terms%20of%20the%20sheer%20number%20of%20moving%20parts%2C%20extravagance%2C%20and%20complexity%2C%20the%20build-tool%20landscape%20is%20one%20of%20bells%20and%20whistles%20that%20can%20be%20a%20little%20tough%20to%20stay%20on%20top%20of.%20There%20are%20a%20few%20important%20pieces%20of%20a%20robust%20and%20valuable%20build%2C%20no%20matter%20what%20tools%20you%20use%20to%20achieve%20it%2C%20and%20by%20breaking%20the%20build%20into%20modules%20or%20categories%2C%20we%20can%20make%20a%20little%20bit%20of%20sense%20out%20of%20the%20chaos.%0D%0A&amp;short_link=http://bit.ly/aspzBG&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>November 19, 2008 -- <a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/" title="Java 6 and Maven 2.0.9 on Leopard">Java 6 and Maven 2.0.9 on Leopard</a> (7)</li><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>September 10, 2008 -- <a href="http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/" title="Axis2 client using ADB &#8211; runtime dependencies">Axis2 client using ADB &#8211; runtime dependencies</a> (6)</li><li>March 19, 2008 -- <a href="http://cwash.org/2008/03/19/new-wave-logging/" title="New Wave Logging">New Wave Logging</a> (0)</li><li>March 13, 2008 -- <a href="http://cwash.org/2008/03/13/continuous-integration-dissected/" title="Continuous Integration Dissected">Continuous Integration Dissected</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/07/21/pimp-my-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Wave Logging</title>
		<link>http://cwash.org/2008/03/19/new-wave-logging/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-wave-logging</link>
		<comments>http://cwash.org/2008/03/19/new-wave-logging/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 19:34:39 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[JBoss Seam]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[web beans]]></category>

		<guid isPermaLink="false">http://cwash.org/2008/03/19/new-wave-logging/</guid>
		<description><![CDATA[Tired of messy logging logic cluttering your code with a bunch of if/else statements?  Don't let logging cramp your style! The approach <a href="http://www.seamframework.org" title="JBoss Seam">Seam</a> takes to logging makes your code pretty again (and other things).  What does this mean for you?  No more "<em>code guards</em>"!

A nice byproduct of the genius of Seam's design is that many common problems can be solved by using <em>EL </em>as veritable swiss-army knife.  We'll look at this through a logging example specifically, though it's just one of many different innovative ways of solving problems using Java5 features and <a href="http://docs.jboss.com/seam/2.0.1.GA/reference/en/html_single/#elenhancements">EL</a> as a general approach.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/03/19/new-wave-logging/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>Tired of messy logging logic cluttering your code with a bunch of if/else statements?  Don&#8217;t let logging cramp your style! The approach <a href="http://www.seamframework.org" title="JBoss Seam">Seam</a> takes to logging makes your code pretty again (and other things).  What does this mean for you?  No more &#8220;<em>code guards</em>&#8220;!</p>
<p>A nice byproduct of the genius of Seam&#8217;s design is that many common problems can be solved by using <em>EL </em>as veritable swiss-army knife.  We&#8217;ll look at this through a logging example specifically, though it&#8217;s just one of many different innovative ways of solving problems using Java5 features and <a href="http://docs.jboss.com/seam/2.0.1.GA/reference/en/html_single/#elenhancements">EL</a> as a general approach.</p>
<h3>WTF is a code guard?</h3>
<p>What goes without saying in most of the discussions regarding logging is that excessive logging can be the largest and most common performance bottleneck in code that meets its functional requirements.  Thus, logging APIs introduce the idea of log levels, to ease the burden of excessive logging.  Generally, log levels are a configuration setting on a per-environment basis.  Development environments will typically log most dependent code at the <em>info </em>level, and cut that up to the <em>debug</em> level for custom code or when things go awry with a piece of dependent code.  Testing environments typically log at <em>info</em> while production will often just log at the <em>warn</em> level.</p>
<p>While this is all well and good, we find that for a lot of the logging we do, we typically run across an ugly little flaw in this approach that&#8217;s produced an equally ugly hack as a work-around.  Enter the <em>code guard</em>.  From the log4j docs:</p>
<blockquote><p>Code guards are typically used to guard code that only needs to execute in support of logging, that otherwise introduces undesirable runtime overhead in the general case (logging disabled). Examples are multiple parameters, or expressions (e.g. string + &#8221; more&#8221;) for parameters. Use the guard methods of the form log.is&lt;Priority&gt;() to verify that logging should be performed, before incurring the overhead of the logging  method call. Yes, the logging methods will perform the same check, but only after resolving parameters.</p></blockquote>
<p>What&#8217;s all this business about resolving parameters?  Let&#8217;s look at an example:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// unguarded code</span><br />
log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: &quot;</span> <span style="color: #339933;">+</span> foo <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;, BAR: &quot;</span> <span style="color: #339933;">+</span> foo.<span style="color: #006633;">getBar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// guarded code</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>log.<span style="color: #006633;">isDebugEnabled</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: &quot;</span> <span style="color: #339933;">+</span> foo <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;, BAR: &quot;</span> <span style="color: #339933;">+</span> foo.<span style="color: #006633;">getBar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>So, we need this cluttered if/else around only to ensure that our expressions (concats, usually) won&#8217;t get resolved unless we actually want them to.  Why is there no other recourse?  The answer isn&#8217;t surprising – it comes down to the way the API was designed.  All log4j logging methods take a single argument &#8212; which made a lot of sense, I suppose when the powers that be first designed logging APIs. They soon realized that in order to use their API, one has to use an expression to resolve all parameters into a single argument prior to calling the method!  This is why a code guard is needed.</p>
<p>Java5 introduces a feature that allows for <a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html" title="Variable Length Arguments" target="_blank">varargs</a>, and taking advantage of this can help us with our ugly little logging problem, e.g.</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: #0, BAR: #1&quot;</span>, foo, foo.<span style="color: #006633;">getBar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>With this approach, our expressions won&#8217;t get resolved until after we&#8217;re in debug(), and we can let it do the dirty work inside the method.  The first thing that our logging method does is check to see if its level is valid, otherwise it&#8217;ll fall out immediately.  Because the concatenation happens inside the log method, we don&#8217;t need a code guard to protect us.</p>
<p>This is the approach that Seam takes to logging.  Seam&#8217;s <a href="http://docs.jboss.com/seam/latest-2/api/org/jboss/seam/log/Log.html" title="Seam's Log Interface">Log</a> interface provides not only a solution that removes the need for code guards, it also allows you to use EL in your log messages (if you&#8217;re trying to dive into a Seam component&#8230;) &#8211; e.g.</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: #{foo}, BAR: #{foo.bar}&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Much better.  By and large, this is the way you do logging in Seam.  Because binding occurs late, you never really run into the problem where you need to even think about using something like a &#8220;code guard.&#8221;  Code what you&#8217;re supposed to; not noise! <strong>This is just one of many novel ways to use EL in Seam</strong>, and why it really deserves a look as a way to write better code, faster and as a far more productive platform for Java programmers (fed up with JavaSE/EE 1.4) than Rails/Grails.</p>
<p>See the <a href="http://in.relation.to/Bloggers/TheWebBeansManifesto" target="_blank" title="Web Beans Manifesto">Web Beans Manifesto</a> for much more on this approach.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/03/19/new-wave-logging/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>January 21, 2009 -- <a href="http://cwash.org/2009/01/21/16-apps-that-lessen-teh-suck-of-web-development-in-xp/" title="16 Apps That Lessen TEH SUCK of Web Development in XP">16 Apps That Lessen TEH SUCK of Web Development in XP</a> (8)</li><li>January 13, 2009 -- <a href="http://cwash.org/2009/01/13/on-software-quality/" title="On Software Quality">On Software Quality</a> (8)</li><li>December 1, 2008 -- <a href="http://cwash.org/2008/12/01/24ways/" title="24ways">24ways</a> (1)</li><li>November 19, 2008 -- <a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/" title="Java 6 and Maven 2.0.9 on Leopard">Java 6 and Maven 2.0.9 on Leopard</a> (7)</li><li>September 10, 2008 -- <a href="http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/" title="Axis2 client using ADB &#8211; runtime dependencies">Axis2 client using ADB &#8211; runtime dependencies</a> (6)</li><li>August 21, 2008 -- <a href="http://cwash.org/2008/08/21/weblogic-92-seam-victory-is-mine/" title="Weblogic 9.2 + Seam : Victory is Mine!">Weblogic 9.2 + Seam : Victory is Mine!</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/03/19/new-wave-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

