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

<channel>
	<title>Stubbisms - Tony's Weblog</title>
	<atom:link href="http://stubbisms.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stubbisms.wordpress.com</link>
	<description>Random sutbbisms (mutterings) on my adventures around cyber space.</description>
	<lastBuildDate>Sat, 08 Oct 2011 22:14:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='stubbisms.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Stubbisms - Tony's Weblog</title>
		<link>http://stubbisms.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stubbisms.wordpress.com/osd.xml" title="Stubbisms - Tony&#039;s Weblog" />
	<atom:link rel='hub' href='http://stubbisms.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Linus&#8217; Git Talk Index</title>
		<link>http://stubbisms.wordpress.com/2010/04/28/linus-git-talk-index/</link>
		<comments>http://stubbisms.wordpress.com/2010/04/28/linus-git-talk-index/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 01:57:38 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=339</guid>
		<description><![CDATA[Youtube won&#8217;t let me post big enough comments, so I&#8217;m putting it here. 12:00 Distribution 15:00 CVS Merge Branching 17:50 Perforce at Google 18:18 Committers &#8211; Ostensibly not morons 21:30 Question 1 &#8211; how to migrate big code bases 22:00 An actual example of distribution 27:00 Question 2 &#8211; Politics have just been shifted? You [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=339&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Youtube won&#8217;t let me post big enough comments, so I&#8217;m putting it here.</p>
<span style="text-align:center; display: block;"><a href="http://stubbisms.wordpress.com/2010/04/28/linus-git-talk-index/"><img src="http://img.youtube.com/vi/4XpnKHJAok8/2.jpg" alt="" /></a></span>
<p>12:00 Distribution<br />
15:00 CVS Merge Branching<br />
17:50 Perforce at Google<br />
18:18 Committers &#8211; Ostensibly not morons<br />
21:30 Question 1 &#8211; how to migrate big code bases<br />
22:00 An actual example of distribution<br />
27:00 Question 2 &#8211; Politics have just been shifted? You still have to merge. How?<br />
27:38 Networks of trust and masturbation<br />
28:00 The way Linus and Kernel development works<br />
31:41 Question 3 &#8211; Are any companies using distributed systems? There seems to be a risk of code bases diverging too much.<br />
32:30 Mercurial &#8211; the only other open source distributed VCS worth looking at. Everything else is either centralised, or too slow or unstable.<br />
32:55 Question 3.5 &#8211; But is there an advantage for a company to have a centralised model?<br />
33:00 Companies think there is, but there isn&#8217;t.<br />
33:20 Git subversion (svn) interfacing<br />
34:55 Question 4 &#8211; How does merging work in git in regards to merge conflicts?<br />
37:55 Question 5 &#8211; Why is it necessary to be distributed in a company, if you had a system with really good merging?<br />
38:30 Centralised systems work, but cannot work _as well_ as distributed systems.<br />
40:00 Performance<br />
40:40 Branch visibility<br />
42:40 Ugly and stupid<br />
43:15 Question 6 &#8211; How many files can git support?<br />
45:54 Big SVN repositories<br />
47:36 Projects that share code<br />
49:25 Question 7 &#8211; If you have a huge tree, can you check out only part of it?<br />
50:20 Performance &#8211; it&#8217;s not how fast you do it, it&#8217;s what it enables you to do differently<br />
51:20 SVN designers are complete morons. It&#8217;s not branching &#8211; it&#8217;s the merging<br />
55:15 Git implementation &#8211; simple data structures, complicated source code<br />
56:14 Trust and reliability &#8211; data protection and security<br />
58:48 Linus&#8217;s guarantee &#8211; get out what you put in<br />
1:00:05 Trust and Google&#8217;s &#8220;just not that trustworthy&#8221; code hosting<br />
1:03:00 Content vs files &#8211; what changed?<br />
1:05:53 Question 8 &#8211; Would switching from Perforce just swap scalability problems for other scalability problems?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/339/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=339&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2010/04/28/linus-git-talk-index/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>
	</item>
		<item>
		<title>Git Script to Show Largest Pack Objects and Trim Your Waist Line!</title>
		<link>http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/</link>
		<comments>http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 01:07:13 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[cvsimport]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=322</guid>
		<description><![CDATA[This is a script I put together after migrating the Spring Modules project from CVS, using git-cvsimport (which I also had to patch, to get to work on OS X / MacPorts). I wrote it because I wanted to get rid of all the large jar files, and documentation etc, that had been put into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=322&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a script I put together <a href="http://stubbisms.wordpress.com/2009/07/08/spring-modules-fork/">after migrating the Spring Modules project from CVS</a>, using <a href="http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html">git-cvsimport</a> (which I also had to <a href="http://n2.nabble.com/cvs-import-and-internal-plumbing-commands-td3207876.html#a3207982">patch</a>, to get to work on OS X / MacPorts). I wrote it because I wanted to get rid of all the large jar files, and documentation etc, that had been put into source control. However, if _<em>large files</em>_ are deleted in the latest revision, then they can be hard to track down.</p>
<p>The script effectively side step this limitation, as it simply goes through a list of all objects in your pack file (so try and run git gc first, so that all your objects are in your pack), and list the top largest files, showing you their information. The, with the file locations, you can then run:</p>
<pre class="brush: bash;">
# remove a tree from entire repo history
git filter-branch --index-filter &quot;git rm -rf --cached --ignore-unmatch $files&quot; HEAD

# pull in a repo without the junk
a git pull file://$(pwd)/myGitRepo
</pre>
<p>Which will remove them from your entire history, trimming your waist line nicely! But be sure to follow the advice from the man page for filter-branch &#8211; there&#8217;s things you should be aware of, such as old tags (that one got me) etc&#8230; Rather than messing around trying to get it exactly right, I actually just retagged the new repo by matching the dates of the tags from the initial cvsimport &#8211; there were only 9 after all!</p>
<p>But for reference, here is the command I&#8217;m referring to, from the git-filter-branch man page:</p>
<blockquote><p>You really filtered all refs: use &#8211;tag-name-filter cat &#8212; &#8211;all when calling git-filter-branch.</p></blockquote>
<p>There&#8217;s a few different suggestions as to how to remove the loose objects from your repository, in order to <em>_really_</em> make it shrink straight away, my favourite being from the man page:</p>
<blockquote><p>git-filter-branch is often used to get rid of a subset of files, usually with some combination<br />
of &#8211;index-filter and &#8211;subdirectory-filter. People expect the resulting repository to be<br />
smaller than the original, but you need a few more steps to actually make it smaller, because<br />
git tries hard not to lose your objects until you tell it to. First make sure that:</p>
<p>o   You really removed all variants of a filename, if a blob was moved over its lifetime.  git<br />
log &#8211;name-only &#8211;follow &#8211;all &#8212; filename can help you find renames.</p>
<p>o   You really filtered all refs: use &#8211;tag-name-filter cat &#8212; &#8211;all when calling<br />
git-filter-branch.<br />
Then there are two ways to get a smaller repository. A safer way is to clone, that keeps your<br />
original intact.</p>
<p>o   Clone it with git clone file:///path/to/repo. The clone will not have the removed objects.<br />
See git-clone(1). (Note that cloning with a plain path just hardlinks everything!)</p></blockquote>
<p>Apart from the section on &#8220;are your objects _really_ loose?&#8221;, the most useful bit of information was running the git-pull command, which someone suggested from the <a href="http://kerneltrap.org/mailarchive/git/2007/10/7/331471">discussion on the git mailing list</a>. This was the only thing that actually worked for me, contrary to what it states about git-clone. However, be careful, as git pull by default doesn&#8217;t pull over all information&#8230;</p>
<p>And without further a due, here is the script:</p>
<pre class="brush: bash;">
#!/bin/bash
#set -x 

# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs

# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
IFS=$'\n';

# list all objects including their size, sort by size, take top 10
objects=`git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head`

echo &quot;All sizes are in kB's. The pack column is the size of the object, compressed, inside the pack file.&quot;

output=&quot;size,pack,SHA,location&quot;
for y in $objects
do
	# extract the size in bytes
	size=$((`echo $y | cut -f 5 -d ' '`/1024))
	# extract the compressed size in bytes
	compressedSize=$((`echo $y | cut -f 6 -d ' '`/1024))
	# extract the SHA
	sha=`echo $y | cut -f 1 -d ' '`
	# find the objects location in the repository tree
	other=`git rev-list --all --objects | grep $sha`
	#lineBreak=`echo -e &quot;\n&quot;`
	output=&quot;${output}\n${size},${compressedSize},${other}&quot;
done

echo -e $output | column -t -s ', '
</pre>
<p>Thanks to <a href="http://dound.com/about/">David Underhill</a> for the <a href="http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/">inspiration</a>, and the various posts on the <a href="http://kerneltrap.org/mailarchive/git/2007/10/7/331471">git mailing list</a>!</p>
<p>For other migration tips (svn) &#8211; see <a href="http://fpereda.wordpress.com/2008/06/11/how-i-migrated-paludis-to-git/">here: http://fpereda.wordpress.com/2008/06/11/how-i-migrated-paludis-to-git/</a></p>
<p>P.s. if someone tries running the script on Linux or Cygwin and it needs modifying, let me know and I&#8217;ll post the modified versions all next to each other in this article.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/322/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=322&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring Modules Fork</title>
		<link>http://stubbisms.wordpress.com/2009/07/08/spring-modules-fork/</link>
		<comments>http://stubbisms.wordpress.com/2009/07/08/spring-modules-fork/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 09:45:09 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[spring-modules]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=314</guid>
		<description><![CDATA[Ok guys &#8211; the project is up on git-hub! Install Git! &#8211; http://git-scm.com/ To download an anonymous repository run http://github.com/astubbs/spring-modules or sign up with git-hub and get your personal account! Let the patching begin! From the Wiki page: &#8220;&#8221;" This is a resurection of the extremely valuable and abandoned Spring-Modules project. The plan is to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=314&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">Ok guys &#8211; the project is up on git-hub!</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">Install Git! &#8211; http://git-scm.com/</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">To download an anonymous repository run http://github.com/astubbs/spring-modules or sign up with git-hub and get your personal account!</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">Let the patching begin!</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">From the Wiki page: &#8220;&#8221;"</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">This is a resurection of the extremely valuable and abandoned Spring-Modules project.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">The plan is to fully embrace Maven as the build tool and eventually throw out all the old build code.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">At this point, all the old jar libraries and generated documentation have been pruned from the repository history.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">This pruning has reduced the size of the repository from 95m to 7m. Nice.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">The idea will be to slowly add one by one, as the are compile ready, to the parent module section, so they can be included.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">Msg/email me on antony.stubbs@gmail.com to discuss!</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">&#8220;&#8221;"</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">I will try and get a development mailing list setup asap, but for now, email me on antony.stubbs@gmail.com with the [subject spring-module-fork] and I&#8217;ll start building a manual list.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">
<p>One thing I want to discuss is ow we can organise the issues on jira :/ I still have had no response from InspiSpring.</p></div>
<p>The project website: http://wiki.github.com/astubbs/spring-modules</p>
<p>Inspired by my work with Spring Modules (or <a href="http://jira.springframework.org/browse/MOD-217">difficulties</a> <a href="http://stubbisms.wordpress.com/2009/04/02/spring-modules-ehcache-and-ehcache-issues-you-should-be-aware-of/">with</a>), and as explained in this post on the Spring Modules forum, I am now announcing the Spring Modules Fork! An effort to bring back to life some very useful software!</p>
<blockquote><p><span style="font-family:verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;line-height:normal;font-size:11px;">I have emailed various people and even emailed suggesting an extensions project as described on the Spring site[1] but haven&#8217;t had any responses.</span></p>
<p>As Spring Modules has been officially declared dead [2] and i&#8217;m not getting nay replies to my mails I would like to fork the project into git-hub and get some vital patches applied &#8211; particularly on my area of interest &#8211; the cache module. I also would like to migrate the whole project to maven.</p>
<p>I&#8217;m posting here to get any thoughts or suggestions regarding this &#8211; hopefully a response from someone at Spring &#8211; particularly Colin Yates.</p>
<p>Let&#8217;s get this useful software moving again!</p></blockquote>
<p>Ok guys &#8211; the project is up on git-hub!</p>
<p>Install <a href="http://git-scm.com/">Git</a>! &#8211; http://git-scm.com/</p>
<p>To download an anonymous repository run <strong>git clone git://github.com/astubbs/spring-modules.git</strong> or sign up with git-hub and get your personal account!</p>
<p>Let the patching begin!</p>
<p>From the Wiki page:</p>
<blockquote><p>This is a resurrection of the extremely valuable and abandoned Spring-Modules project.</p>
<p>The plan is to fully embrace Maven as the build tool and eventually throw out all the old build code.</p>
<p>At this point, all the old jar libraries and generated documentation have been pruned from the repository history.</p>
<p>This pruning has reduced the size of the repository from 95m to 7m. Nice.</p>
<p>The idea will be to slowly add one by one, as the are compile ready, to the parent module section, so they can be included.</p>
<p>Msg/email me on antony.stubbs@gmail.com to discuss!</p></blockquote>
<p>I will try and get a development mailing list setup asap, but for now, email me on antony.stubbs@gmail.com with the [subject spring-module-fork] and I&#8217;ll start building a manual list. (If anyone knows a free mail list setup, let me know).</p>
<p>One thing I want to discuss is how we can organise the issues on jira :/ I still have had no response from Spring.</p>
<p>P.s.  I&#8217;ve also setup a mailing list now:</p>
<p><strong>Mailing List</strong></p>
<p><span style="font-family:helvetica, arial, clean, sans-serif;line-height:18px;"></p>
<p style="line-height:1.5em!important;margin:1em 0!important;padding:0;">Here are the essentials:</p>
<ul style="line-height:1.4em;margin:0 0 0 1.3em !important;padding:0;">
<li>Group name: spring-modules-fork</li>
<li>Group home page: http://groups.google.com/group/spring-modules-fork</li>
<li>Group email address spring-modules-fork@googlegroups.com</li>
</ul>
<p></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/314/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=314&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2009/07/08/spring-modules-fork/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse and IPhone+Google Fail</title>
		<link>http://stubbisms.wordpress.com/2009/06/05/eclipse-and-iphonegoogle-fail/</link>
		<comments>http://stubbisms.wordpress.com/2009/06/05/eclipse-and-iphonegoogle-fail/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 01:00:11 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=309</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=309&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_310" class="wp-caption aligncenter" style="width: 526px"><img class="size-full wp-image-310" title="eclipse fail" src="http://stubbisms.files.wordpress.com/2009/06/eclipse-fail.png?w=516&#038;h=194" alt="Eclipse Fail" width="516" height="194" /><p class="wp-caption-text">Eclipse Fail.</p></div>
<div id="attachment_311" class="wp-caption aligncenter" style="width: 330px"><img class="size-full wp-image-311" title="IMG_0002" src="http://stubbisms.files.wordpress.com/2009/06/img_0002.png?w=320&#038;h=480" alt="IPhone + Google Fail." width="320" height="480" /><p class="wp-caption-text">IPhone + Google Fail.</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=309&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2009/06/05/eclipse-and-iphonegoogle-fail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2009/06/eclipse-fail.png" medium="image">
			<media:title type="html">eclipse fail</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2009/06/img_0002.png" medium="image">
			<media:title type="html">IMG_0002</media:title>
		</media:content>
	</item>
		<item>
		<title>spring-modules-ehcache and ehcache issues you should be aware of</title>
		<link>http://stubbisms.wordpress.com/2009/04/02/spring-modules-ehcache-and-ehcache-issues-you-should-be-aware-of/</link>
		<comments>http://stubbisms.wordpress.com/2009/04/02/spring-modules-ehcache-and-ehcache-issues-you-should-be-aware-of/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 00:56:11 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[ehcache]]></category>
		<category><![CDATA[issues]]></category>
		<category><![CDATA[jira]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=305</guid>
		<description><![CDATA[Anyone looking at or currently using spring-modules-ehcache should be aware of a couple of issues: spring-modules is no longer maintained a cache cannot be re-configured after it&#8217;s construction. save your-self some headache and use the recommended ehcache.xml method instead of programmatic configuration the HashCodeCacheKey generator in spring-modules-ehcache suffers from inconsistency issues. This is a problem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=305&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Anyone looking at or currently using <a href="https://springmodules.dev.java.net/">spring-modules</a>-<a href="https://springmodules.dev.java.net/docs/reference/0.8/html/cache.html">ehcache</a> should be aware of a couple of issues:</p>
<ol>
<li>spring-modules is <a href="http://forum.springsource.org/showthread.php?t=67698)">no longer maintained</a></li>
<li>a cache cannot be re-configured after it&#8217;s construction. save your-self some headache and use the recommended ehcache.xml method instead of programmatic configuration</li>
<li>the HashCodeCacheKey generator in spring-modules-ehcache suffers from <a href="http://jira.springframework.org/browse/MOD-255">inconsistency</a> <a href="http://jira.springframework.org/browse/MOD-478">issues</a>. This is a problem when setting up a distributed cache, or using a disk persistent cache (diskPersistent=&#8221;true&#8221;). A fix is described in the <a href="http://jira.springframework.org/browse/MOD-255">jira</a></li>
<li>the logging system in ehcache 1.6 has changed from commons logging to JDK logging &#8211; currently contrary to what the documentation will tell you. If anyone can tell me how to get the logging working in 1.6, I would be greatly appreciative.</li>
<li>the 0.8 and 0.8a pom&#8217;s in repo1 have broken pom&#8217;s. The fix is under <a href="http://jira.springframework.org/browse/MOD-463">http://jira.springframework.org/browse/MOD-463</a></li>
<li>contrary to what is <a href="http://mvnrepository.com/artifact/org.springmodules">available in repo1</a>, there is a newer version available &#8211; 0.9. A patch and pom files have been <a href="http://jira.springframework.org/browse/MOD-463">posted</a>, but you will have to install it to your company&#8217;s repo manually, a-la something along the lines of:</li>
</ol>
<p>mvn install:install-file -DgroupId=org.springmodules -DartifactId=spring-modules-cache -Dversion=0.9 -Dpackaging=jar -Dfile=Downloads/spring-modules-0.9/sources/spring-modules-cache-src.zip  -Dclassifier=sources</p>
<p>mvn install:install-file -DgroupId=org.springmodules -DartifactId=spring-modules-cache -Dversion=0.9 -Dpackaging=jar -Dfile=Downloads/spring-modules-0.9/sources/spring-modules-cache.jar  -Dclassifier=sources</p>
<p>mvn install:install-file -DgroupId=org.springmodules -DartifactId=spring-modules -Dversion=0.9 -Dpackaging=jar  -DpomFile=Downloads/spring-modules-0.9-maven2-poms/pom.xml</p>
<p>and on the parent pom spring-modules:</p>
<p>mvn install -N</p>
<p>And just for an example, an ehcache.xml with disk persistent, ever-lasting entries:</p>
<pre>&lt;ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ehcache.sf.net/ehcache.xsd"&gt;

    &lt;diskStore path="java.io.tmpdir" /&gt; 

    &lt;cacheManagerEventListenerFactory class="" properties="" /&gt;

    &lt;!-- eternal used during development for web services --&gt;
    &lt;defaultCache
            maxElementsInMemory="10000"
            eternal="true"
            timeToIdleSeconds="120"
            timeToLiveSeconds="120"
            overflowToDisk="true"
            diskSpoolBufferSizeMB="5"
            maxElementsOnDisk="10000000"
            diskPersistent="true"
            diskExpiryThreadIntervalSeconds="120"
            memoryStoreEvictionPolicy="LRU"
            /&gt;

    &lt;cache name="webservice"
            maxElementsInMemory="10000"
            eternal="true"
            timeToIdleSeconds="1200"
            timeToLiveSeconds="1200"
            overflowToDisk="true"
            diskSpoolBufferSizeMB="1"
            maxElementsOnDisk="10000000"
            diskPersistent="true"
            diskExpiryThreadIntervalSeconds="120"
            memoryStoreEvictionPolicy="LRU"
            /&gt;

&lt;/ehcache&gt;</pre>
<p>And spring-context so you can use declaritive caching:</p>
<pre>&lt;bean id="cacheProviderFacade" class="org.springmodules.cache.provider.ehcache.EhCacheFacade"&gt;
        &lt;property name="cacheManager" ref="cacheManager" /&gt;
    &lt;/bean&gt;

    &lt;bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"&gt;
        &lt;property name="configLocation" value="classpath:ehcache.xml" /&gt;
    &lt;/bean&gt;

    &lt;bean id="cachingAttributeSource" class="org.springmodules.cache.annotations.AnnotationCachingAttributeSource" /&gt;

    &lt;bean id="autoproxy" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" /&gt;

    &lt;bean id="myKeyGenerator" class="com.componence.mubito.webservices.clients.MyCacheKeyGenerator" /&gt;

    &lt;bean id="cachingInterceptor" class="org.springmodules.cache.interceptor.caching.MetadataCachingInterceptor"&gt;
        &lt;property name="cacheProviderFacade" ref="cacheProviderFacade" /&gt;
        &lt;property name="cachingAttributeSource" ref="cachingAttributeSource" /&gt;
        &lt;property name="cachingModels"&gt;
            &lt;props&gt;
                &lt;prop key="webservicesCache"&gt;cacheName=webservice&lt;/prop&gt;
            &lt;/props&gt;
        &lt;/property&gt;
    &lt;/bean&gt;

    &lt;bean id="cachingAttributeSourceAdvisor" class="org.springmodules.cache.interceptor.caching.CachingAttributeSourceAdvisor"&gt;
        &lt;constructor-arg ref="cachingInterceptor" /&gt;
    &lt;/bean&gt;</pre>
<p>And annotate the methods you want cached with:</p>
<pre>@Cacheable(modelId = "webservicesCache")</pre>
<h1 style="text-align:center;">Update!</h1>
<p>Due to these dificulties and more, I have forked the long dead Spring Modules project!</p>
<p>Check out the project page here:</p>
<p><a href="http://wiki.github.com/astubbs/spring-modules">http://wiki.github.com/astubbs/spring-modules</a></p>
<p>Discuss it on the google group:</p>
<p><a href="groups.google.com/group/spring-modules-fork/">groups.google.com/group/spring-modules-fork/</a></p>
<p>And submit your patches here:</p>
<p><a href="http://github.com/astubbs/spring-modules/">http://github.com/astubbs/spring-modules/</a></p>
<p>Happy moduling!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/305/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=305&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2009/04/02/spring-modules-ehcache-and-ehcache-issues-you-should-be-aware-of/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>
	</item>
		<item>
		<title>Fighting Scala &#8211; Scala to Java List Conversion</title>
		<link>http://stubbisms.wordpress.com/2009/02/18/fighting-scala-scala-to-java-list-conversion/</link>
		<comments>http://stubbisms.wordpress.com/2009/02/18/fighting-scala-scala-to-java-list-conversion/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 01:42:47 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Wicket]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=275</guid>
		<description><![CDATA[Apparently this is going to be addressed in Scala 2.8, but until then there&#8217;s an annoying little detail when dealing with Java libraries (in my case, Wicket), from Scala. That being that methods requiring java.util.List types cannot be called with scala.List types. The offending code: Causes this compilation error: error: overloaded method constructor ListView with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=275&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Apparently this is going to be addressed in Scala 2.8, but until then there&#8217;s an annoying little detail when dealing with Java libraries (in my case, Wicket), from Scala. That being that methods requiring java.util.List types cannot be called with scala.List types.</p>
<p>The offending code:</p>
<pre class="brush: java;">
val issues = List( 1, 2, 3 )
new org.apache.wicket.markup.html.list.ListView(wicketId, issues) {...
</pre>
<p><img class="size-full wp-image-290 alignnone" title="3" src="http://stubbisms.files.wordpress.com/2009/02/3.gif?w=596&#038;h=33" alt="3" width="596" height="33" /></p>
<p>Causes this compilation error:<br />
<code>error: overloaded method constructor ListView with alternatives (java.lang.String,java.util.List[T])org.apache.wicket.markup.html.list.ListView[T]  (java.lang.String,org.apache.wicket.model.IModel[java.util.List[T]])org.apache.wicket.markup.html.list.ListView[T] cannot be applied to (String,List[String])</code></p>
<p>There is a collection of implicit conversion functions for going from java.util.List to scala.List in the <a href="http://www.scala-lang.org/docu/files/api/scala/collection/jcl/Conversions$object.html">scala.collection.jcl.Conversions</a> object, but not go go the other way around. These functions look like:</p>
<pre class="brush: java;">
object Conversions {

implicit def convertSet[T](set : java.util.Set[T]) = Set(set)
implicit def convertList[T](set : java.util.List[T]) = Buffer(set)
implicit def convertSortedSet[T](set : java.util.SortedSet[T]) = SortedSet(set)
implicit def convertMap[T,E](set : java.util.Map[T,E]) = Map(set)
implicit def convertSortedMap[T,E](set : java.util.SortedMap[T,E]) = SortedMap(set)&lt;/code&gt;

implicit def unconvertSet[T](set : SetWrapper[T]) = set.underlying
implicit def unconvertCollection[T](set : CollectionWrapper[T]) = set.underlying
implicit def unconvertList[T](set : BufferWrapper[T]) = set.underlying
implicit def unconvertSortedSet[T](set : SortedSetWrapper[T]) = set.underlying
implicit def unconvertMap[T,E](set : MapWrapper[T,E]) = set.underlying
implicit def unconvertSortedMap[T,E](set : SortedMapWrapper[T,E]) = set.underlying

}
</pre>
<p><img class="size-full wp-image-293 alignnone" title="22" src="http://stubbisms.files.wordpress.com/2009/02/22.gif?w=755&#038;h=234" alt="22" width="755" height="234" /></p>
<p>With some friendly advice, I created the following conversion functions to do the conversion, including 2-dimensional (lists of lists) lists.</p>
<pre class="brush: java;">
implicit def convertScalaListToJavaList(aList:List[String]) = java.util.Arrays.asList(aList.toArray: _*)
implicit def convertScalaListListToJavaList(aList:List[List[String]]) = java.util.Arrays.asList(aList.toArray: _*)
</pre>
<p><img class="size-full wp-image-294 alignnone" title="11" src="http://stubbisms.files.wordpress.com/2009/02/11.gif?w=910&#038;h=33" alt="11" width="910" height="33" /></p>
<p>The obscure notation (<code>aList.toArray: _*</code>) is required as described in section <em>8.8 Repeated Parameters page 188</em> of the <strong>Programming in Scala</strong> book:</p>
<blockquote><p><em>&#8220;This notation tells the compiler to pass each element of arr as its own argument to echo, rather than all of it as a single argument.&#8221;</em></p></blockquote>
<p>and in <em>4.6.2 Repeated Parameters</em> in <strong>The Scala Language Speciﬁcation Version 2.7</strong>:</p>
<blockquote><p><em>Furthermore, assume the deﬁnition: </em><br />
<strong>def sum(args: Int*)<br />
val xs = List(1, 2, 3)</strong><br />
<em>The following applications method sum is ill-formed: </em><br />
<strong>sum(xs) //<em> ***** error: expected: Int, found: List[Int]</em></strong><br />
<em>By contrast, the following application is well formed and yields again the result 6: </em><br />
<strong>sum(xs: _*)</strong></p></blockquote>
<p>To cut the story short, it is required because the <code>asList</code> method accepts variable number of object arguments, but we are passing in a single list object. The <code>: _*</code> tells the compiler to instead pass in each element of the list individually, so that it looks like varargs. And as suggested by someone on the channel, it is consistent, if obscure, notation. When you read it, keep in mind that <code>variableName: ObjectType</code> is normal notation in Scala for specifying the type of a declared parameter. So instead of a concrete type, we are specifying &#8220;any&#8221; type ( &#8216;_&#8217; ), &#8220;any&#8221; number of times ( &#8216;*&#8217; ).</p>
<p>Not so bad eh? ;P</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/275/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/275/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/275/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/275/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/275/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/275/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/275/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/275/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/275/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/275/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/275/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/275/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/275/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/275/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=275&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2009/02/18/fighting-scala-scala-to-java-list-conversion/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2009/02/3.gif" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2009/02/22.gif" medium="image">
			<media:title type="html">22</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2009/02/11.gif" medium="image">
			<media:title type="html">11</media:title>
		</media:content>
	</item>
		<item>
		<title>Aaaaand we&#8217;re done.</title>
		<link>http://stubbisms.wordpress.com/2008/12/25/aaaaand-were-done/</link>
		<comments>http://stubbisms.wordpress.com/2008/12/25/aaaaand-were-done/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 15:09:13 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[Holland]]></category>
		<category><![CDATA[Portals]]></category>
		<category><![CDATA[Portlet Events]]></category>
		<category><![CDATA[Portlets]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Wicket]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=255</guid>
		<description><![CDATA[Just under 4 months ago, I left New Zealand, heading for The Netherlands (Holland) to take up an invitation to work on Portal technology at Componence. This has taken me to Armin van Buren in Belgium, Lviv and Kiev in Ukraine, Munich and the Oktoberfest (thanks Stefan! I am sooo coming back next year) and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=255&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just under 4 months ago, I left New Zealand, heading for The Netherlands (Holland) to take up an invitation to work on <a href="http://en.wikipedia.org/wiki/Web_portal#Standards">Portal</a> technology at <a href="http://www.componence.com">Componence</a>. This has taken me to <a href="http://www.arminvanbuuren.com/">Armin van Buren</a> in Belgium, Lviv and Kiev in Ukraine, Munich and the <a href="http://www.oldworld.ws/okfest.html">Oktoberfest</a> (thanks Stefan! I am sooo coming back next year) and I trip to Oslo, Norway to visit an old university friend.</p>
<p>Oh and in the Netherlands I found an 80,000 EURO TV. Nice.</p>
<div id="attachment_266" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-266" title="big-tv" src="http://stubbisms.files.wordpress.com/2008/12/big-tv.jpg?w=300&#038;h=225" alt="That's 80,000 EURO$, 194,025 NZ$, 112,000 US$" width="300" height="225" /><p class="wp-caption-text">That&#39;s 80,000 EURO$, 194,025 NZ$, 112,000 US$. I think the ones sitting next to it there are 40&quot; TVs - they look small eh?</p></div>
<p>On my way over to Europe, I went through San Francisco which was really cool &#8211; while I was there I snapped some fan-boy pics:</p>
<div id="attachment_265" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-265" title="google" src="http://stubbisms.files.wordpress.com/2008/12/google.jpg?w=300&#038;h=225" alt="Motorcycle tour of the Google campus" width="300" height="225" /><p class="wp-caption-text">Motorcycle tour of the Google campus</p></div>
<p>And now, here I am, in Melmo Sweden, enjoying the beginnings of my holiday with old family friends from Australia. Like a flash, my contract is over. It all stemmed from my seemingly <a href="http://web.mac.com/jonathan.locke/iWeb/JonathanLocke/Blog/7F86A9C2-308E-43C5-98EA-92516404E854.html#comment_layer">innocent comment</a> on a blog from a core member of the Wicket team. Just goes to show, if you open yourself to opportunity and put yourself out there a bit, you never know what will happen.</p>
<p>I had a few posts planned regarding this, but this has been a very busy trip with lots of new aspects of life to get used to. Now that my &#8216;proof&#8217; is complete, I shall re-balance things a bit and get a whole lot of draft posts out onto the blog.</p>
<h1>I left my job at IBM to follow my passions&#8230;</h1>
<p>I left my job at IBM in New Zealand before I found this contract. There are a few reasons why I left, but they are pretty much summed with with saying that I felt I could progress in my career at a pace more suited to my liking if I left. One of those aspects was working overseas. Buy me a beer and I&#8217;ll tell you the whole story.</p>
<p>What I really want to do is work on new technology, not simply the application of.</p>
<p>Ever since I was young I wanted to work on satellites at NASA which is not really the typical childhood dream. But working on Play Station 4 would suffice <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h1>My Work on Wicket Portlets</h1>
<p>One major aspect of my work here was completeing the <a href="http://jcp.org/en/jsr/detail?id=286">Portlet 2.0 specification JCR 286</a> implementation in <a href="http://wicket.apache.org/">Wicket</a>. Wicket of course being one of the Top web development frameworks today and a pleasure to work with. All the work sits under the Wicket issue <a href="https://issues.apache.org/jira/browse/WICKET-1620">WICKET-1620</a>.</p>
<h2>JavaDoc</h2>
<p>When I came on the scene, Portlet 1.0 support was complete, with the help of Apache Portal Bridges and work on Wicket resource serving support was mostly complete. The first daunting task however, was completeing the documentation for nearly the entire existing Portlet support in Wicket. This was a big learning experience and a deep look into Wicket internals (which btw, made me a <em>bit</em> nervous about my upcoming event implementation task). This was mostly completed in <a href="https://issues.apache.org/jira/browse/WICKET-1875">WICKET-1875</a>, with the a lot more additional javadoc included in my patches for WICKET-1620.</p>
<h2>Events</h2>
<p>It was pretty much decided that I wasn&#8217;t going to try and do anything at this stage with the public render parameters part of the spec, and was going to focus on the Events system. This was a much bigger task than any of the other parts of the Portlet 2.0 spec, and a lot more complicated than I expected.</p>
<p>However, in the end, I think I came up with a pretty nice solution. After some false starts, I ended up implementing with custom</p>
<ul>
<li>WebRequestCycleProcessor</li>
<li>AbstractBehavior</li>
<li>BehaviorRequestTarget</li>
</ul>
<p>aptly named</p>
<ul>
<li>PorletWebRequestProcessor</li>
<li>AbstractPortletEventListenerBehaviour</li>
<li>PortletEventRequestTarget</li>
</ul>
<p>This really fits into Wicket superbly well, a testament to the sophisticated, yet reasonably straight forward (considering the problem domain) extensibility of Wicket. Bravo.</p>
<p>The patches are sitting with the issue, and now that I have some extra time, I will massage them some more and I&#8217;m confident that they will be in Wicket 1.5. Included with the patches is also a simple example application.</p>
<p>Known issues with the implementation at this stage are:</p>
<ol>
<li>Issues around events in response to events</li>
<li>Resource URL&#8217;s being generated for links, in some cases, instead of Action URL&#8217;s.</li>
</ol>
<p>On my second to last day at Componence, I gave a presentation to the company on the work I had done. Posted below are two small sections of that presentation (Keynote is lots of fun) which show the gist of it.</p>
<div id="attachment_258" class="wp-caption aligncenter" style="width: 613px"><img class="size-full wp-image-258" title="wicketevents-diagram" src="http://stubbisms.files.wordpress.com/2008/12/wicketevents-diagram.png?w=603&#038;h=499" alt="Basic flow of code through the events sub-system" width="603" height="499" /><p class="wp-caption-text">Basic flow of code through the events sub-system</p></div>
<p>Triggering an event is merely a call into the Portlet API and letting the hosting Portal take care of the rest.</p>
<p>The basic steps for receiving a Portlet event are as follows:</p>
<ol>
<li>Wicket receives an event request &#8211; this is like a normal HTTP request (or a Action request in Portlet speak &#8211; so to speak <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Wicket calls into the custom (registered) PorletWebRequestProcessor.</li>
<li>The PorletWebRequestProcessor checks the context is an <a href="http://www.bluesunrise.com/portlet-api/javax/portlet/EventRequest.html">Event Request</a> &#8211; otherwise the processing is delegated to the parent.</li>
<li>The <a href="http://www.wicketframework.org/apidocs/wicket/IRequestTarget.html">Request Target</a> is resolved to the custom PortletEventRequestTarget.</li>
<li>During the normal Wicket request processing, at the appropriate stage, calls into our PortletEventRequestTarget the <a href="http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/request/target/IEventProcessor.html#processEvents(org.apache.wicket.RequestCycle)">processEvents</a> method from the <a href="http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/request/target/IEventProcessor.html">IEventProcessor.</a></li>
<li>Inside this method call, we search through the page&#8217;s component tree looking for behaviours attached to components which extend the AbstractPortletEventListenerBehaviour. The search performed is a depth first recursive search. I have a niggling feeling that this could perhaps be improved somehow.</li>
<li>When found, the event name is checked to see if it matches the name of event the behaviour is registered as wanting to subscribe to.</li>
<li>If they match, we call into the behaviour, passing in the <a href="http://www.bluesunrise.com/portlet-api/javax/portlet/Event.html">Event.</a></li>
<li>Hey presto!</li>
</ol>
<p>In hind sight it all seems a little simple now <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  But of course I have come out the other end a much wiser and learned man &#8211; gotta love the opportunity to learn from Open Source! So my current view is of course, biased.</p>
<div id="attachment_257" class="wp-caption aligncenter" style="width: 671px"><img class="size-full wp-image-257" title="wicketevents-code" src="http://stubbisms.files.wordpress.com/2008/12/wicketevents-code.png?w=661&#038;h=470" alt="wicketevents-code" width="661" height="470" /><p class="wp-caption-text">Code example of using the events API</p></div>
<p>I&#8217;m very proud of the work I&#8217;ve done on Wicket and am very excited to see it make it into trunk. As I said before, the next step is to polish up the patch and remove extra unneeded code (it&#8217;s pretty big), so that the core guys can review it properly.</p>
<div id="attachment_267" class="wp-caption aligncenter" style="width: 235px"><img class="size-medium wp-image-267" title="talk" src="http://stubbisms.files.wordpress.com/2008/12/talk.jpg?w=225&#038;h=300" alt="A snapshot of the end of my talk at Componence about Wicket et al" width="225" height="300" /><p class="wp-caption-text">A snapshot of the end of my talk at Componence about Wicket et al</p></div>
<h1>What&#8217;s Next</h1>
<p>I&#8217;m meeting up with my girl friend soon on the 28th of December in Amsterdam, after which we&#8217;re off to Paris for new years, then tripping around Europe for January.</p>
<p>During that time, I am sure we will find our selves with some time to relax and so I thought that time might be useful to finish the several draft articles I have waiting in my blog queue (19!). They are all nagging at the back of my mind&#8230;</p>
<p>Hopefully this stint will lead onto more exciting work at and maybe even some more presenting and teaching &#8211; I am still eager to make anyone who wants to learn, sit through my <a href="http://stubbisms.wordpress.com/2008/07/15/scala-lovegame-enspired-overview-presentation/">Scala presentation</a> <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> , even if I haven&#8217;t used Scala since I wrote the thing!</p>
<p>I still have aspirations of consulting, teaching, <a href="http://en.wikipedia.org/wiki/South_America">traveling</a>, <a href="http://images.google.co.nz/images?hl=sv&amp;client=firefox-a&amp;rls=org.mozilla:en-US:official&amp;hs=9m9&amp;q=vancouver&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=wi">experiencing</a> and <a href="http://en.wikipedia.org/wiki/New_York_City">working</a> in <a href="http://en.wikipedia.org/wiki/United_Kingdom">other</a> <a href="http://images.google.co.nz/images?hl=en&amp;client=firefox-a&amp;rls=org.mozilla:en-US:official&amp;hs=N9o&amp;q=oman&amp;um=1&amp;ie=UTF-8&amp;sa=X&amp;oi=image_result_group&amp;resnum=4&amp;ct=title">parts</a> of the <a href="http://images.google.co.nz/images?q=dubai&amp;ie=utf-8&amp;oe=utf-8&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a&amp;um=1&amp;sa=N&amp;tab=wi">world</a> and of working at Sony Computer Entertainment of America. But not to worry &#8211; they are still in the queue.</p>
<p>Until next time &#8211; peace out.</p>
<p>The crazy Kiwi.</p>
<h1>Update</h1>
<p>Good news &#8211; as of my latest patch submition, &#8220;Issues around events in response to events&#8221; has been fixed!</p>
<p>The example applicayion now includes two links &#8211; one that triggers an event, and one that triggers an event which will in turn trigger another event within the same request cycle.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/255/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=255&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2008/12/25/aaaaand-were-done/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2008/12/big-tv.jpg?w=300" medium="image">
			<media:title type="html">big-tv</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2008/12/google.jpg?w=300" medium="image">
			<media:title type="html">google</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2008/12/wicketevents-diagram.png" medium="image">
			<media:title type="html">wicketevents-diagram</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2008/12/wicketevents-code.png" medium="image">
			<media:title type="html">wicketevents-code</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2008/12/talk.jpg?w=225" medium="image">
			<media:title type="html">talk</media:title>
		</media:content>
	</item>
		<item>
		<title>RE: Maven2 &#8211; it can be quite good</title>
		<link>http://stubbisms.wordpress.com/2008/08/28/re-maven2-it-can-be-quite-good/</link>
		<comments>http://stubbisms.wordpress.com/2008/08/28/re-maven2-it-can-be-quite-good/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 09:44:34 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[gant]]></category>
		<category><![CDATA[gradle]]></category>
		<category><![CDATA[ivy]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=240</guid>
		<description><![CDATA[This dude has comments disabled on his post, and I just wanted to correct him on something. &#8220;as long as you use the standard Maven directory structure&#8221; and &#8220;Standard directory structure&#8221; section That isn&#8217;t correct. All you have to do is configure your custom source directory location, test source directory and any resource directories and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=240&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This <a href="http://ivan.truemesh.com/archives/000731.html">dude has comments disabled on his post</a>, and I just wanted to correct him on something.</p>
<blockquote><p>&#8220;as long as you use the standard Maven directory structure&#8221; and<br />
&#8220;Standard directory structure&#8221; section</p>
<p>That isn&#8217;t correct. All you have to do is configure your custom source<br />
directory location, test source directory and any resource directories<br />
and all things Maven will work just as if you were using the standard<br />
convention.</p>
<p>Maven also does a whole lot more you haven&#8217;t mentioned here, so just<br />
to refer people:<br />
<a href="http://maven.apache.org/maven-features.html" target="_blank">http://maven.apache.org/maven-features.html</a></p>
<p>Not to mention the hordes of plugins that are coming out.</p>
<p>Some of my take on the subject:<br />
<a href="../2008/08/28/maven-is-to-ant-as-a-nail-gun-is-to-hammer-and-nails-you-need-to-move-on/" target="_blank">http://stubbisms.wordpress.com/2008/08/28/maven-is-to-ant-as-a-nail-gun-is-to-hammer-and-nails-you-need-to-move-on/</a></p></blockquote>
<h2>update</h2>
<p>For Google&#8217;s sake, this is a reply to a blog post by <a href="http://www.leshazlewood.com/">Les Hazlewood</a> regarding the issue of grafting Maven onto legacy projects, legacy being that they weren&#8217;t layed out with Maven in mind.</p>
<p>My reply to <a href="http://www.leshazlewood.com/?p=44#comment-66801">his post wasn&#8217;t going to come out right</a> so here it is:</p>
<p>Hi Guys,</p>
<p>Good comments!</p>
<p>Here is the Maven POM you might be looking for, to build your sample app. I think it&#8217;s output is what you&#8217;re after, but I couldn&#8217;t check for sure as I had dificulty with your Ant build (fingers crossed this posts ok) <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;org.jsecurity&lt;/groupId&gt;
    &lt;artifactId&gt;jsecurity-spring-hibernate-sample&lt;/artifactId&gt;
&lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;0.9-SNAPSHOT&lt;/version&gt;
    &lt;build&gt;
        &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
&lt;plugins&gt;
&lt;plugin&gt;
                &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                &lt;configuration&gt;
                    &lt;source&gt;1.5&lt;/source&gt;
                    &lt;target&gt;1.5&lt;/target&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
&lt;plugin&gt;
                &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                &lt;configuration&gt;
                    &lt;webResources&gt;
                        &lt;resource&gt;
                            &lt;directory&gt;WEB-INF&lt;/directory&gt;
                            &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt;
                        &lt;/resource&gt;
                    &lt;/webResources&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;artifactId&gt;hibernate&lt;/artifactId&gt;
            &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
            &lt;version&gt;3.2.6.ga&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;artifactId&gt;spring&lt;/artifactId&gt;
            &lt;version&gt;2.5.5&lt;/version&gt;
            &lt;type&gt;jar&lt;/type&gt;
            &lt;scope&gt;compile&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.jsecurity&lt;/groupId&gt;
            &lt;artifactId&gt;jsecurity&lt;/artifactId&gt;
            &lt;version&gt;0.9.0-snapshot&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.jsecurity&lt;/groupId&gt;
            &lt;artifactId&gt;jsecurity-support&lt;/artifactId&gt;
            &lt;version&gt;0.9.0-snapshot&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;hsqldb&lt;/groupId&gt;
            &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
            &lt;version&gt;1.8.0.7&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;log4j&lt;/groupId&gt;
            &lt;artifactId&gt;log4j&lt;/artifactId&gt;
            &lt;version&gt;1.2.14&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
&lt;/project&gt;
</pre>
<p>I also add to add a POM to the &#8216;support-spring&#8217; module:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;

    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;groupId&gt;org.jsecurity&lt;/groupId&gt;
    &lt;artifactId&gt;jsecurity-support&lt;/artifactId&gt;
    &lt;version&gt;0.9.0-snapshot&lt;/version&gt;
    &lt;name&gt;JSecurity-support&lt;/name&gt;
    &lt;url&gt;http://www.jsecurity.org&lt;/url&gt;

    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
            &lt;artifactId&gt;commons-beanutils&lt;/artifactId&gt;
            &lt;version&gt;1.7.0&lt;/version&gt;
            &lt;scope&gt;compile&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;artifactId&gt;spring&lt;/artifactId&gt;
            &lt;version&gt;2.5.5&lt;/version&gt;
            &lt;type&gt;jar&lt;/type&gt;
            &lt;scope&gt;compile&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.jsecurity&lt;/groupId&gt;
            &lt;artifactId&gt;jsecurity&lt;/artifactId&gt;
            &lt;version&gt;0.9.0-snapshot&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
            &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
            &lt;version&gt;2.5&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.easymock&lt;/groupId&gt;
            &lt;artifactId&gt;easymock&lt;/artifactId&gt;
            &lt;version&gt;2.3&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;version&gt;4.3.1&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;

    &lt;build&gt;
        &lt;!-- non-standard source locations --&gt;
        &lt;sourceDirectory&gt;${basedir}/src&lt;/sourceDirectory&gt;
        &lt;testSourceDirectory&gt;${basedir}/test&lt;/testSourceDirectory&gt;
&lt;pluginManagement&gt;
&lt;plugins&gt;
&lt;plugin&gt;
                    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                    &lt;version&gt;2.0.2&lt;/version&gt;
                    &lt;configuration&gt;
                        &lt;source&gt;${maven.compile.source}&lt;/source&gt;
                        &lt;target&gt;${maven.compile.target}&lt;/target&gt;
                        &lt;encoding&gt;${jsecurity.encoding}&lt;/encoding&gt;
                    &lt;/configuration&gt;
                &lt;/plugin&gt;
            &lt;/plugins&gt;
        &lt;/pluginManagement&gt;
&lt;plugins&gt;
&lt;plugin&gt;
                &lt;!-- generate the IntelliJ project files --&gt;
                &lt;artifactId&gt;maven-idea-plugin&lt;/artifactId&gt;
                &lt;configuration&gt;
                    &lt;jdkLevel&gt;${maven.compile.source}&lt;/jdkLevel&gt;
                    &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
&lt;plugin&gt;
                &lt;!-- generate the Eclipse project files --&gt;
                &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                &lt;configuration&gt;
                    &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                    &lt;downloadJavadocs&gt;false&lt;/downloadJavadocs&gt;
                &lt;/configuration&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;
&lt;properties&gt;
        &lt;!-- Default configuration for compiler source and target JVM --&gt;
        &lt;maven.compile.source&gt;1.5&lt;/maven.compile.source&gt;
        &lt;maven.compile.target&gt;1.5&lt;/maven.compile.target&gt;
        &lt;!--
            Encoding of Java source files: Make sure, that the compiler
            and the javadoc generator use the right encoding.
            Subprojects may overwrite this, if they are using another
            encoding.
        --&gt;
        &lt;jsecurity.encoding&gt;iso-8859-1&lt;/jsecurity.encoding&gt;
        &lt;jsecurity.docEncoding&gt;${jsecurity.encoding}&lt;/jsecurity.docEncoding&gt;

    &lt;/properties&gt;

&lt;/project&gt;
</pre>
<p>Note that most of this would be cut down with the use of a parent POM, which I haven&#8217;t used here.</p>
<p>Note that you will also have to have jsecurity and the support module either &#8216;installed&#8217; in your local repo (mvn install) or in your workspace in Elcipse when using m2eclipse.</p>
<p>The resultant structure looks like this:</p>
<p><a href="http://stubbisms.files.wordpress.com/2008/08/dir.png"><img class="aligncenter size-full wp-image-249" src="http://stubbisms.files.wordpress.com/2008/08/dir.png?w=502&#038;h=263" alt="" width="502" height="263" /></a></p>
<p>Let me know if you have any queries&#8230;</p>
<p>Also if you add:</p>
<pre class="brush: xml;">
&lt;plugin&gt;
    &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
    &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
</pre>
<p>to the plugins section of your pom, you can then run the application in place using jetty with:</p>
<blockquote><p>mvn jetty:run-war</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/stubbisms.wordpress.com/240/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/stubbisms.wordpress.com/240/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/240/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=240&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2008/08/28/re-maven2-it-can-be-quite-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2008/08/dir.png" medium="image" />
	</item>
		<item>
		<title>Maven is to Ant as a Nail Gun is to Hammer and Nails &#8211; you need to move on.</title>
		<link>http://stubbisms.wordpress.com/2008/08/28/maven-is-to-ant-as-a-nail-gun-is-to-hammer-and-nails-you-need-to-move-on/</link>
		<comments>http://stubbisms.wordpress.com/2008/08/28/maven-is-to-ant-as-a-nail-gun-is-to-hammer-and-nails-you-need-to-move-on/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 05:02:40 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[build tools]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[the future]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=199</guid>
		<description><![CDATA[No, wait, &#8220;Maven is to Ant as Linux From Scratch! is to Ubuntu&#8220;&#8230; No, no, hold up &#8211; &#8220;Maven is to Ant as the Vidalia Slice Wizzard is to the Potato Peeler&#8220;&#8230;. I think Maven is great. I discovered something really neat-o the other day. The definition of the word Maven: &#8220;an expert or connoisseur.&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=199&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://stubbisms.files.wordpress.com/2008/08/fitzwillie.jpg"><img class="alignright size-medium wp-image-231" src="http://stubbisms.files.wordpress.com/2008/08/fitzwillie.jpg?w=224&#038;h=300" alt="" width="224" height="300" /></a>No, wait, &#8220;<a href="http://maven.apache.org/">Maven</a> is to Ant as <a href="http://www.linuxfromscratch.org/"><em>Linux From Scratch!</em></a> is to <em><a href="http://www.ubuntu.com/">Ubuntu</a></em>&#8220;&#8230;</p>
<p>No, no, hold up &#8211; &#8220;Maven is to Ant as the <em><a href="http://www.asseenontv.com/prod-pages/vid_slice_wiz_ontv.html">Vidalia Slice Wizzard</a></em> is to the <em><a href="http://en.wikipedia.org/wiki/Potato_peeler">Potato Peeler</a></em>&#8220;&#8230;.</p>
<p>I think Maven is great.</p>
<p>I discovered something really neat-o the other day. The <a href="http://dictionary.reference.com/search?q=maven&amp;db=*">definition of the word Maven</a>:</p>
<p style="text-align:center;"><em>&#8220;an expert or connoisseur.&#8221;</em></p>
<p style="text-align:left;">Maven is Just That(tm). You don&#8217;t have to know anything about building*, you leave it to the Maven. The Expert. The Connoisseur you might say&#8230;</p>
<p style="text-align:left;">It knows how to do <em>so much</em> for you. It has <a href="http://maven.apache.org/plugins/index.html">many many tricks up it&#8217;s sleeves</a>, and people are teaching it <a href="http://maven.apache.org/guides/development/guide-helping.html">more and more every day</a>! Plus Ant seems to be considered effectively complete and not under much active development. The <a href="http://www.apache.org/">leaders in the game</a> are moving onto <a href="http://maven.apache.org/">greener pastures</a>.</p>
<h1>Dependencies in Control</h1>
<p>The main complaint people have is the online thing. That being, you, reasonably, pretty much have to be online for Maven to work reliably.</p>
<p>One fix for this is to host your own Maven repo inside your project directory and commit it to version control. This is effectively the same as having a /libs dir and sticking all your jars in there, except you get all the benefits of Maven&#8217;s dependency management. Great!</p>
<p>Here&#8217;s an example</p>
<ol>
<li>run mvn -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true dependency:copy-dependencies<br />
This creates /target/dependencies with a repo-like layout of all your projects dependencies</li>
<li>Copy /target/dependencies to something like /libs</li>
<li>Add to pom.xml the location of repository like so:
<pre>&lt;project&gt;
...
	&lt;repositories&gt;
		&lt;repository&gt;
			&lt;releases /&gt;
			&lt;id&gt;local&lt;/id&gt;
			&lt;name&gt;local&lt;/name&gt;
			&lt;url&gt;file:///${basedir}/libs&lt;/url&gt;
		&lt;/repository&gt;
	&lt;/repositories&gt;
&lt;/project&gt;
NB: ${basedir} is required otherwise Maven complains about not having an absolute path.</pre>
</li>
<li>commit!</li>
<li>Note &#8211; you can also do this for a multi module project, and have all modules share the same common repository. You should just make sure you run the copy-dependencies command from your parent pom.</li>
<li>You can also install your custom dependecies into such a repository such as Oracle db drivers using the <a href="http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html">install-file goal</a>:
<pre>mvn install:install-file -Dfile=your-artifact-1.0.jar \
                         [-DpomFile=your-pom.xml] \
                         [-DgroupId=org.some.group] \
                         [-DartifactId=your-artifact] \
                         [-Dversion=1.0] \
                         [-Dpackaging=jar] \
                         [-Dclassifier=sources] \
                         [-DgeneratePom=true]
                         [-DcreateChecksum=true]</pre>
<p>NB: the easier way to use the install-file goal, is to not use it, try and build your project, then Maven will complain about the missing dependency, and prompt you with instructions on how to use install-file with nearly all the options pre-filled in, according to the dependency description in your POM.</li>
</ol>
<h1>Taking Maven completely Off-Line</h1>
<p>The other thing people talk alot about is other build tools that are better than Ant, e.g. Gant, <a href="http://raven.rubyforge.org/">Raven</a> (ruby build scripts for Java) or some other one I heard of recently &#8211; ah-ha! found it &#8211; <a href="https://gosling.dev.java.net/">Gosling</a> (I&#8217;m sure I read a recent article about it somewhere, that pointed to a newer website?) that lets you write your build in Java and then just wraps Ant! Bizzaro.</p>
<p>Another one is that people are concerned about their build tool changing itself over time, and so their build is not necessarily stable and reproducible. I for one love the idea of self upgrading software &#8211; hey, it&#8217;s one step closer to the <a href="http://en.wikipedia.org/wiki/Skynet_(fictional)">end of the world</a> right? <a href="http://itre.cis.upenn.edu/~myl/languagelog/archives/000399.html">Well I for one welcome our build tool overlords.</a> But seriously, I think that the advantage of having the build tool upgrade itself and getting the latest bug fixes and feature updates, outweighs the disadvantage of the build breaking one day. So what? &#8211; You take an hour out, or half a day, or even a day, and fix it!</p>
<p>Buut, if you work in a stiff, rigid environment, or work for NASA or the militar or something, then there&#8217;s a way around this as well. This is also the suggested best practice for dealing with plugins. (O.k., I remember reading this information somewhere, but it was harder to find again than i thought.)</p>
<ol>
<li>Run mvn help:effective-pom -Doutput=effective.pom this produces a list of the plugin versions your project is currently using.</li>
<li>Open effective.pom and copy the build-&gt;pluginManagement section into your pom, optionally deleting the configuration and just keeping the goupid, artifactid and version.</li>
<li>Make sure your project packages, to test you got the pluginManagement right.</li>
<li>Rename your local repository to repository.back</li>
<li>Run mvn dependency:go-offline &#8211; this will download all plugins and their dependencies for your project, into a clean repository.</li>
<li>Move the repository into  your project directory.</li>
<li>Add the project repository to your POM as described above.</li>
<li>Try running your mvn package with the &#8211;offline option and make sure everythings ok.</li>
<li>Rename your backup from repository.bak back to repository.</li>
<li>Commit.</li>
<li>Done! You should be able to now build the project off of a fresh checkout and an empty repository.</li>
<li>If you&#8217;ve gone this far, you may as well also commit the version of Maven your using into your source control as well, in a directory such as /tools/maven.</li>
</ol>
<p>***</p>
<p>When <a href="http://jira.codehaus.org/browse/MDEP-177">MDEP-177</a> is addressed, this will be much easier to do.</p>
<p>On another note, as far as running off-line is concerned, the other really neat-o thing you should definately do if there are more than two of you on location (or if you&#8217;re keen to share snapshots easily), is setup a local Maven repository cache/proxy/mirror using <a href="http://nexus.sonatype.org/">Nexus</a>. IMO, don&#8217;t bother trying Artefactory or the other one, Nexus is da&#8217; bomb.</p>
<h1>Ant, Ivy and Transition</h1>
<p>What i don&#8217;t think these people seem to appreciate, is that the beauty of Maven is that you <em>don&#8217;t write any build logic</em>**! All these other tools don&#8217;t really address this problem! Making Ant easier to write, still means you have to write Ant! Yuck! As far as I&#8217;m concerned, our job is to further the state of the art of technology, and this means effectively achieving more while doing less! Maven is exactly that.</p>
<p><a href="http://ant.apache.org/ivy/">Ivy</a> is all well and good, but Maven is just so much more. In fact, since Maven does everything Ivy does (to a degree), and <a href="http://maven.apache.org/ant-tasks.html">Maven can be used from Ant</a> (i.e. so you can integrate Maven&#8217;s dependency management into your Ant build instead of using Ivy), I would propose that the Ivy developers stop working Ivy now, and try to bring to Maven&#8217;s dependency management system whatever it was they thought they could do better with Ivy. A little competition never hurt anyone though&#8230;</p>
<p>If you don&#8217;t want to adopt Maven out-right (i.e. if you have a very large project), using the Maven Ant tasks, you could use Maven for your dependency management instead of doing it all manually with Ant or better with Ivy. This is what the JBoss Application Server team have done btw &#8211; you can see their source code for hints on how to get started.</p>
<p>Or, you can do as I have done on my last project at IBM, start using Maven entirely for the components you are working on, and integrate the output of it into your legacy Ant build.</p>
<h2>How to Integrate Maven into a Legacy Ant multi-component Build</h2>
<p>I first created a POM that modelled the non-Maven component that my Maven components wanted to rely on, then you add this phase to your Ant build, to get it to install the POM and it&#8217;s artefacts into the local repository. That way the other Maven built components don&#8217;t need to think about Ant at all.</p>
<pre class="brush: xml;">
&lt;!-- Maven ant task --&gt;
&lt;import file=&quot;../common.xml&quot; /&gt;

&lt;target name=&quot;maven-repo-install&quot; depends=&quot;install-parent-pom&quot;&gt;
	&lt;artifact:dependencies settingsFile=&quot;../tools/maven/conf/settings.xml&quot; /&gt;
&lt;property name=&quot;M2_HOME&quot; value=&quot;../tools/maven&quot; /&gt;

	&lt;artifact:localRepository id=&quot;local.repository&quot; path=&quot;c:/repository&quot; layout=&quot;default&quot; /&gt;

	&lt;!-- install main pom --&gt;
	&lt;artifact:pom id=&quot;pom.es&quot; file=&quot;pom.xml&quot;&gt;
		&lt;localRepository refid=&quot;local.repository&quot; /&gt;
	&lt;/artifact:pom&gt;

	&lt;artifact:install&gt;
		&lt;localRepository refid=&quot;local.repository&quot; /&gt;
&lt;pom refid=&quot;pom.es&quot; /&gt;
	&lt;/artifact:install&gt;
&lt;/target&gt;
</pre>
<p>The gotcha with this is that when you call Ant on this build.xml, you need to add the maven-ant-tasks jar to it&#8217;s classpath. You can also make a .bat or .sh out of this:</p>
<blockquote><p>REM // add maven-ant-tasks ant targets<br />
ant -lib ..\tools\maven-ant-tasks-lib %*</p></blockquote>
<p>In order to make sure your Ant built project&#8217;s Maven twin has access to it&#8217;s parent if it needs it, add this step as a dependency on your installation:</p>
<pre class="brush: xml;">
&lt;!-- setup maven parent --&gt;
&lt;target name=&quot;install-parent-pom&quot;&gt;
	&lt;!-- install pom --&gt;
	&lt;maven basedir=&quot;../&quot; goal=&quot;install&quot; mvnargs=&quot;-N&quot; /&gt;
&lt;/target&gt;
</pre>
<p>In order to easily call a Maven command from an Ant script, I pilfered this and modified it, from the JBoss Application Server build script &#8211; thanks guys!:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;project name=&quot;common-ant-tasks&quot;&gt;

	&lt;!-- maven execution target definition --&gt;
	&lt;macrodef name=&quot;maven&quot;&gt;
		&lt;attribute name=&quot;goal&quot; /&gt;
		&lt;attribute name=&quot;basedir&quot; /&gt;
		&lt;attribute name=&quot;mvnArgs&quot; default=&quot;&quot; /&gt;
		&lt;!--
			programRoot should point to the root directory of the oasis project
			structure. I.e. the directory which contains setup and tools.
		--&gt;
		&lt;attribute name=&quot;project.root&quot; default=&quot;${basedir}/../&quot; /&gt;
		&lt;element name=&quot;args&quot; implicit=&quot;true&quot; optional=&quot;true&quot; /&gt;
		&lt;sequential&gt;
			&lt;!-- maven location --&gt;
&lt;property name=&quot;maven.dir&quot; value=&quot;@{project.root}/tools/maven&quot; /&gt;
&lt;property name=&quot;mvn&quot; value=&quot;${maven.dir}/bin/mvn.bat&quot; /&gt;
&lt;property name=&quot;thirdparty.maven.opts&quot; value=&quot;&quot; /&gt;
			&lt;!-- check mvn exists --&gt;
			&lt;available file=&quot;${mvn}&quot; property=&quot;isFileAvail&quot; /&gt;
			&lt;fail unless=&quot;isFileAvail&quot; message=&quot;Maven not found here ${mvn}!&quot; /&gt;

			&lt;!-- call maven --&gt;
			&lt;echo message=&quot;Calling mvn command located in ${maven.dir}&quot; /&gt;
			&lt;echo message=&quot; - from dir: @{basedir}&quot; /&gt;
			&lt;echo message=&quot; - running Maven goals: @{goal}&quot; /&gt;
			&lt;echo message=&quot; - running Maven arguments: @{mvnArgs}&quot; /&gt;
			&lt;java classname=&quot;org.codehaus.classworlds.Launcher&quot; fork=&quot;true&quot;
				dir=&quot;@{basedir}&quot; resultproperty=&quot;maven.result&quot;&gt;
				&lt;classpath&gt;
					&lt;fileset dir=&quot;${maven.dir}/boot&quot;&gt;
						&lt;include name=&quot;*.jar&quot; /&gt;
					&lt;/fileset&gt;
					&lt;fileset dir=&quot;${maven.dir}/lib&quot;&gt;
						&lt;include name=&quot;*.jar&quot; /&gt;
					&lt;/fileset&gt;
					&lt;fileset dir=&quot;${maven.dir}/bin&quot;&gt;
						&lt;include name=&quot;*.*&quot; /&gt;
					&lt;/fileset&gt;
				&lt;/classpath&gt;
				&lt;sysproperty key=&quot;classworlds.conf&quot; value=&quot;${maven.dir}/bin/m2.conf&quot; /&gt;
				&lt;sysproperty key=&quot;maven.home&quot; value=&quot;${maven.dir}&quot; /&gt;
				&lt;arg line=&quot;--batch-mode ${thirdparty.maven.opts} -ff @{goal} @{mvnArgs}&quot; /&gt;
			&lt;/java&gt;
			&lt;!-- check maven return result --&gt;
			&lt;fail message=&quot;Unable to build Maven goals. See Maven output for details.&quot;&gt;
				&lt;condition&gt;
					&lt;not&gt;
						&lt;equals arg1=&quot;${maven.result}&quot; arg2=&quot;0&quot; /&gt;
					&lt;/not&gt;
				&lt;/condition&gt;
			&lt;/fail&gt;
		&lt;/sequential&gt;
	&lt;/macrodef&gt;
&lt;/project&gt;
</pre>
<p>And if you have other legacy Ant built components that want to be able to blindy use Ant to build their dependencies, and you aren&#8217;t using Maven Ant tasks in that project, you can wrap the dependent Maven built projects Maven build using this, which uses the above <a href="http://ant.apache.org/manual/CoreTasks/macrodef.html">Ant macro definition</a>:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!-- Redirects to Maven to build --&gt;
&lt;project name=&quot;anAntBuiltProject&quot; default=&quot;install&quot; basedir=&quot;.&quot;&gt;

	&lt;!-- Maven ant task --&gt;
	&lt;import file=&quot;../common.xml&quot;/&gt;

	&lt;target name=&quot;install&quot;&gt;
		&lt;maven basedir=&quot;${basedir}&quot; goal=&quot;install -N&quot;/&gt;
	&lt;/target&gt;

&lt;/project&gt;
</pre>
<h1>Conclusion</h1>
<p>The future&#8217;s got to go somewhere, and Maven is a huge innovation in the build department, and is definitely a big leap in the right direction.</p>
<p>In fact, I wouldn&#8217;t be surprised if someone migrates the Ant build to Maven <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  &#8211; that&#8217;s a joke btw.</p>
<p>*** I haven&#8217;t actually tried this yet <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Let me know how you get along if you give it a go.</p>
<p>** This is the best case scenario, and for most projects i think it&#8217;s true. However, if you get yourself into funky corner cases, sometimes you gotta throw in some plugin-Fu or some embedded ant-Fu to get things just the way you want. Although, i have only had to do this when dealing with the headache of grafting maven onto legacy projects which didn&#8217;t have standard build procedures in mind.</p>
<p>* Ok yes, but you have to know how to use Maven. But Maven is a lot easier to use in the long run than Ant fo sure.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/stubbisms.wordpress.com/199/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/stubbisms.wordpress.com/199/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=199&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2008/08/28/maven-is-to-ant-as-a-nail-gun-is-to-hammer-and-nails-you-need-to-move-on/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>

		<media:content url="http://stubbisms.files.wordpress.com/2008/08/fitzwillie.jpg?w=224" medium="image" />
	</item>
		<item>
		<title>WordPress &#8211; prevent smileys in code quotes</title>
		<link>http://stubbisms.wordpress.com/2008/08/10/wordpress-prevent-smileys-in-code-quotes/</link>
		<comments>http://stubbisms.wordpress.com/2008/08/10/wordpress-prevent-smileys-in-code-quotes/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 15:49:18 +0000</pubDate>
		<dc:creator>Antony Stubbs</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[smileys]]></category>
		<category><![CDATA[sourcecode]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://stubbisms.wordpress.com/?p=126</guid>
		<description><![CDATA[I finally figured out how to prevent wordpress from replacing some of my source quotes with smiley faces. WordPress appears to replace all &#8220;) with smileys, as after it&#8217;s parsed into html, &#8221; get&#8217;s converted to &#38;quote; which when a &#8221; appears right before a ) works out to be &#38;quot;) (FYI &#38;quot; ) - [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=126&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://nexus404.com/Blog/2007/04/15/clever-multi-tool-hammer/"><img class="alignleft" src="http://nexus404.com/Blog/wp-content/uploads/2007/04/ultimate-geeks-multi-tool-hammer.jpg" alt="" width="267" height="246" /></a>I finally figured out how to prevent wordpress from replacing some of my source quotes with smiley faces.</p>
<p>WordPress appears to replace all <em>&#8220;)</em> with smileys, as after it&#8217;s parsed into html, &#8221; get&#8217;s converted to &amp;quote; which when a &#8221; appears right before a ) works out to be <em>&amp;quot;)</em> (FYI</p>
<pre>&amp;quot; )<em><em> - but without the space</em></em></pre>
<p>) and if you look closely, there&#8217;s a little <em> <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ( </em></p>
<pre><em>; ) - but without the space</em></pre>
<p><em>)</em> in there!</p>
<pre class="brush: java;">
System.out.println(&quot;Hello world!&quot;) ;
</pre>
<pre class="brush: java;">
println &quot;addDependency(['${scope}'], \&quot;${contructSignature(it)}\&quot;) {&quot;
</pre>
<p>So, inserting a space between the &#8221; and the ) stops it from triggering! Hurrah!</p>
<pre class="brush: java;">
System.out.println( &quot;Hello world!&quot; );
</pre>
<pre class="brush: java;">
println &quot;addDependency(['${scope}'], \&quot;${contructSignature(it)}\&quot; ) {&quot;
</pre>
<p>However, as you can see, if the ) is immediately followed by a ; then WordPress seems to leave the &amp;quot;); alone&#8230;</p>
<pre class="brush: java;">
System.out.println(&quot;Hello world!&quot;);
</pre>
<p>I&#8217;ve Googled for this before and not found anything, so just thought I&#8217;d share the love!</p>
<p>Now to go back and fix some old posts&#8230; =D</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/stubbisms.wordpress.com/126/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/stubbisms.wordpress.com/126/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stubbisms.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stubbisms.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stubbisms.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stubbisms.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stubbisms.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stubbisms.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stubbisms.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stubbisms.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stubbisms.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stubbisms.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stubbisms.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stubbisms.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stubbisms.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stubbisms.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stubbisms.wordpress.com&amp;blog=2056670&amp;post=126&amp;subd=stubbisms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stubbisms.wordpress.com/2008/08/10/wordpress-prevent-smileys-in-code-quotes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fe013b53190b7ae87bc563f77b4a0a06?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony</media:title>
		</media:content>

		<media:content url="http://nexus404.com/Blog/wp-content/uploads/2007/04/ultimate-geeks-multi-tool-hammer.jpg" medium="image" />
	</item>
	</channel>
</rss>
