<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CUUFRX8yfCp7ImA9WhRaFE4.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530</id><updated>2012-02-17T10:00:14.194+11:00</updated><category term="xmas" /><category term="unsubscribe" /><category term="java" /><category term="git" /><category term="snow leopard" /><category term="jdk" /><category term="tracker" /><category term="mac" /><category term="holiday" /><category term="keyboard" /><category term="dependency" /><category term="maven" /><category term="minor" /><category term="version" /><category term="euro" /><category term="major" /><category term="repository" /><category term="clean" /><category term="us layout" /><category term="svn" /><title>sam://</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sam.leberrigaud.org/" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/HXRD" /><feedburner:info uri="blogspot/hxrd" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;AkQFRn4yeSp7ImA9Wx9aFEU.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-5443142120535298812</id><published>2011-03-07T19:48:00.007+11:00</published><updated>2011-03-07T19:58:37.091+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-07T19:58:37.091+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="keyboard" /><category scheme="http://www.blogger.com/atom/ns#" term="euro" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="us layout" /><title>Currency</title><content type="html">&lt;p&gt;I'm in Europe, sometime I need to write prices in euro, in emails, documents etc. However I use an American keyboard, on a mac, which makes things a bit trickier when one wants to use the € symbol…&lt;/p&gt;

&lt;p&gt;But I found a shortcut that works, I just have to remember it now:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8997; &amp;#43; &amp;#8679; shift &amp;#43; 2&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-5443142120535298812?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/ou3UdCldeTw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/5443142120535298812/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2011/03/currency.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/5443142120535298812?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/5443142120535298812?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/ou3UdCldeTw/currency.html" title="Currency" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2011/03/currency.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YMSHg9fCp7ImA9WxFaGEw.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-9103190057037958945</id><published>2010-07-22T23:47:00.004+10:00</published><updated>2010-07-23T01:06:29.664+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-23T01:06:29.664+10:00</app:edited><title>Injecting enums with the Spring Framework</title><content type="html">&lt;p&gt;Today I needed to inject an &lt;a href="http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/api/java/lang/Enum.html"&gt;Enum&lt;/a&gt; into a bean's constructor using Spring.&lt;/p&gt;

&lt;p&gt;First I thought I'd need to write my own &lt;a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/beans/factory/FactoryBean.html"&gt;FactoryBean&lt;/a&gt; or 'better' a &lt;a href="http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/beans/PropertyEditor.html"&gt;PropertyEditor&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Well no need, it is already nicely handled by the framework. After a bit of googling, I found the documentation in &lt;a href="http://static.springsource.org/spring/docs/2.0.x/reference/xsd-config.html"&gt;Appendix A of Spring's reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And here is what actually works just fine. If I have the following enum:&lt;/p&gt;
&lt;pre&gt;
public enum Language {
 EN, FR
}
&lt;/pre&gt;
&lt;p&gt;And the following class that I need to instantiate with Spring:&lt;/p&gt;
&lt;pre&gt;
public class LocalisedLogger {
 private final Language lang;
 public LocalisedLogger(Language lang) {
   this.lang = lang;
 }
}
&lt;/pre&gt;
&lt;p&gt;Then I can just configure it like this:&lt;/p&gt;
&lt;pre&gt;
&amp;lt;beans&amp;gt;
 &amp;lt;bean id="logger" class="org.leberrigaud.example.LocalisedLogger"&amp;gt;
   &amp;lt;constructor-arg value="FR"&amp;gt;
 &amp;lt;/constructor-arg&amp;gt;
&amp;lt;/bean&amp;gt;
&amp;lt;/beans&amp;gt;&lt;/pre&gt;
&lt;p&gt;That'it! Spring does the rest…&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-9103190057037958945?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/VlmXF217FnE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/9103190057037958945/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2010/07/injecting-enums-with-spring-framework.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/9103190057037958945?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/9103190057037958945?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/VlmXF217FnE/injecting-enums-with-spring-framework.html" title="Injecting enums with the Spring Framework" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2010/07/injecting-enums-with-spring-framework.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMMQXg8cCp7ImA9WxFaF0w.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-4692653225237669069</id><published>2010-07-21T21:58:00.001+10:00</published><updated>2010-07-21T21:58:00.678+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-21T21:58:00.678+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="version" /><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="snow leopard" /><title>Java versions on Snow Leopard</title><content type="html">&lt;p&gt;It seems I have a few issues with java and versionning theses days. This time I got bitten by Java's version on Snow Leopard. Indeed whatever version you think you're using it is Java 1.6!&lt;/p&gt;

&lt;p&gt;What got me is the JDBC api and namely the new &lt;code&gt;java.sql.Wrapper&lt;/code&gt; interface added in 1.6. Thank god for build boxes (running Linux ;-))&lt;/p&gt;

&lt;p&gt;I now remember that I had to install manually Java 1.5 on my work machine, when I was in Sydney. I am now working on my laptop and forgot to do that. I couldn't remember the exact procedure but someone wrote it for me. Thanks to &lt;a href="http://tedwise.com/2009/09/25/using-java-1-5-and-java-1-4-on-snow-leopard/"&gt;Ted Wise&lt;/a&gt;!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-4692653225237669069?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/WdKXqSn1SCE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/4692653225237669069/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2010/07/java-versions-on-snow-leopard.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/4692653225237669069?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/4692653225237669069?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/WdKXqSn1SCE/java-versions-on-snow-leopard.html" title="Java versions on Snow Leopard" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2010/07/java-versions-on-snow-leopard.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ICRHk5eip7ImA9WxFaFk8.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-4610499523345978324</id><published>2010-07-20T21:29:00.004+10:00</published><updated>2010-07-20T21:32:45.722+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-20T21:32:45.722+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="major" /><category scheme="http://www.blogger.com/atom/ns#" term="version" /><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="minor" /><category scheme="http://www.blogger.com/atom/ns#" term="jdk" /><title>Java major.minor version</title><content type="html">&lt;p&gt;You're bound to see those errors at some point if you're a java developer, something that says &lt;code&gt;Unsupported major.minor version 49.0&lt;/code&gt;, or similar.&lt;/p&gt;

&lt;p&gt;I always forget which number corresponds to which version of Java, so there it is:&lt;/p&gt;
&lt;dl&gt;
 &lt;dt&gt;JDK 1.4&lt;/dt&gt;&lt;dd&gt;48.0&lt;/dd&gt;
 &lt;dt&gt;JDK 1.5&lt;/dt&gt;&lt;dd&gt;49.0&lt;/dd&gt;
 &lt;dt&gt;JDK 1.6&lt;/dt&gt;&lt;dd&gt;50.0&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-4610499523345978324?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/FoKiRjMnUmU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/4610499523345978324/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2010/07/java-majorminor-version.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/4610499523345978324?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/4610499523345978324?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/FoKiRjMnUmU/java-majorminor-version.html" title="Java major.minor version" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2010/07/java-majorminor-version.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcGQXg_fyp7ImA9WxFaEE0.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-863172886106438528</id><published>2010-07-12T17:52:00.003+10:00</published><updated>2010-07-13T16:37:00.647+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-13T16:37:00.647+10:00</app:edited><title>Initialising a git-svn repo from a given date</title><content type="html">&lt;p&gt;The issue is that &lt;code&gt;git-svn&lt;/code&gt; only lets you specify a revision number from which to &lt;code&gt;init&lt;/code&gt; a repository. So first you have to find out the revision number at which your repository was at a given date.&lt;/p&gt;
&lt;p&gt;You need to use SVN for that, and it's &lt;code&gt;log&lt;/code&gt; command:&lt;/p&gt;
&lt;pre&gt;
svn log -r {2009-12-31}:{2010-01-01} http://svn.example.com/repo/trunk
&lt;/pre&gt;
&lt;p&gt;This command will log all svn commits which happened between the 31st of December 2009 and the following day, 1st of January 2010.&lt;/p&gt;
&lt;p&gt;Then from the logs just pick the commit from which you want to init your &lt;code&gt;git-svn&lt;/code&gt; repository and there you go:&lt;/p&gt;
&lt;pre&gt;
git svn clone -s -r72569:HEAD http://svn.example.com/repo/
&lt;/pre&gt;
&lt;p&gt;Here the chosen revision is &lt;code&gt;r72569&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-863172886106438528?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/YkcNc2kMSJo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/863172886106438528/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2010/07/initialising-a-git-svn-repo-from-given.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/863172886106438528?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/863172886106438528?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/YkcNc2kMSJo/initialising-a-git-svn-repo-from-given.html" title="Initialising a git-svn repo from a given date" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2010/07/initialising-a-git-svn-repo-from-given.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IDRHo7fCp7ImA9WxFUF04.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-9111534929512035860</id><published>2010-06-28T23:46:00.006+10:00</published><updated>2010-06-29T00:32:55.404+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-29T00:32:55.404+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="svn" /><title>Using Git with SVN repositories</title><content type="html">&lt;p&gt;I've been using Git with SVN repositories for a while now. And for the most part it's good, really good.&lt;/p&gt;

&lt;p&gt;If you want an introduction on where to start I suggest you read &lt;a href="http://blog.emmanuelbernard.com/2010/05/git-how-my-life-has-improved-since-last-month-when-i-used-svn/"&gt;Emmanuel Bernard's entry&lt;/a&gt; on this exact topic. It's simple, to the point and will get you started in no time.&lt;/p&gt;

&lt;p&gt;Today though I got bitten by some rather strange 'bug' of Git SVN. My &lt;code&gt;master&lt;/code&gt; branch wasn't linked to &lt;code&gt;remotes/trunk&lt;/code&gt; as I always expect. Apparently the branch that was last commited to (in SVN) is the one that gets linked to &lt;code&gt;master&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Thankfully there is nothing that a quick Google search can't fix. And I found that one just has to issue the following command to fix that:&lt;/p&gt;
&lt;pre&gt;git reset --hard remotes/trunk&lt;/pre&gt;

&lt;p&gt;Thanks to &lt;a href="http://zerokspot.com/"&gt;Horst Gutmann&lt;/a&gt; for &lt;a href="http://zerokspot.com/weblog/2008/08/08/about-git-svn-trunk-master-and-everything/"&gt;posting this&lt;/a&gt; before me.&lt;/p&gt;

&lt;p&gt;Update:&lt;/p&gt;
&lt;p&gt;A simple way to know what &lt;code&gt;master&lt;/code&gt; is linked to is to issue the following command right after you cloned your SVN repository:&lt;/p&gt;
&lt;pre&gt;git svn dcommit&lt;/pre&gt;
&lt;p&gt;It will actually tell you where it is going to commit anything that should be.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-9111534929512035860?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/pTo3rnmgbyo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/9111534929512035860/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2010/06/using-git-with-svn-repositories.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/9111534929512035860?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/9111534929512035860?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/pTo3rnmgbyo/using-git-with-svn-repositories.html" title="Using Git with SVN repositories" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2010/06/using-git-with-svn-repositories.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8HQH8yeSp7ImA9WxBXFEs.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-6451787729319221652</id><published>2010-01-26T10:00:00.000+11:00</published><updated>2010-01-26T10:07:11.191+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-26T10:07:11.191+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dependency" /><category scheme="http://www.blogger.com/atom/ns#" term="tracker" /><category scheme="http://www.blogger.com/atom/ns#" term="maven" /><title>Maven dependency heaven?</title><content type="html">&lt;p&gt;If you &lt;a href="http://lmgtfy.com/?q=maven+dependency+hell"&gt;search Google for "maven dependency hell"&lt;/a&gt; you'll find many answers. It can be summarised to two types of root causes.&lt;/p&gt;

&lt;h2&gt;Transitive dependencies&lt;/h2&gt;

&lt;p&gt;The most usual one is a fact of transitive dependencies. Transitive dependencies are great but with them comes dependency resolution. Which in turns means that changing one declared dependency in your project can affect any part of your dependency tree. Most of the time this happens without the developers noticing at least until an issue comes up. This can be triggered by something as simple as changing a dependency's version.&lt;/p&gt;

&lt;h2&gt;Remote repositories&lt;/h2&gt;

&lt;p&gt;The other cause comes from a combination of inconsistent (remote) repositories and different build environments. If your different build environements, developement, continuous integration, release, &lt;em&gt;talk&lt;/em&gt; to different repositories then you might get a different dependency tree. As a simple example, &lt;a href="http://www.atlassian.com/"&gt;at work&lt;/a&gt; we have a repository where we deploy sources of libraries that don't provide them otherwise. This is great. However if someone deploys the source with a minimal POM depending on your build environment you might get the wrong POM. And this means a different dependency tree.&lt;/p&gt;

&lt;h2&gt;Continuous dependency management&lt;/h2&gt;

&lt;p&gt;I believe &lt;em&gt;Continuous dependency management&lt;/em&gt; is the solution to this problem. Each time you build you have to know precisely what dependencies (all of them) are being used. This is why I developed the &lt;a href="https://labs.atlassian.com/browse/MAP"&gt;dependency tracker&lt;/a&gt; plugin. The existing &lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/"&gt;dependency plugin&lt;/a&gt; offers a few goals &amp;ndash; tree, analyze &amp;ndash; to help with dependency management, but to me it fails short in two ways.&lt;/p&gt;

&lt;p&gt;First it is difficult to assess what has changed from one tree to another. It is let up to the developers to do a mental diff. The dependency tracker plugin creates to this effect a text report that can and should be commited along side your project's source code. As it is a text report it is very easy to see changes between revisions using your VCS of choice or you IDE.&lt;/p&gt;

&lt;p&gt;Second, it is a manual process. Developers have to actively use the plugin to understand and clean up their dependency tree. One idea of the dependency tracker is that it creates a text report that should commited alongside your source code. Then you can setup your project so that every build checks that its dependencies are the same as expected and fail if there is the slightest difference.&lt;/p&gt;

&lt;h2&gt;Using the plugin&lt;/h2&gt;

&lt;p&gt;The dependency tracker has three goals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;report&lt;/li&gt;
&lt;li&gt;validate&lt;/li&gt;
&lt;li&gt;checksum&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The two first goals work together. I'll come back to the 'checksum' goal later. First you want to create a report. One report will be created for each module of your project in a &lt;code&gt;dependencies.txt&lt;/code&gt; file. Its format is the following:&lt;/p&gt;
&lt;pre class="prettyprint"&gt;
dependency|dependency trail|artifact checksum|pom checksum
&lt;/pre&gt;

&lt;p&gt;Where &lt;code&gt;dependency&lt;/code&gt; denotes the dependency we are talking about, the &lt;code&gt;dependency trail&lt;/code&gt; is the information about how the dependency is reachable in the dependency tree and the checksums speak for themselves.&lt;/p&gt;

&lt;p&gt;Then you just have to configure the plugin in your &lt;code&gt;pom.xml&lt;/code&gt; to validate the report on each build. But don't forget to commit the report first.&lt;/p&gt;

&lt;pre class="prettyprint"&gt;
&amp;lt;plugin&amp;gt;
  &amp;lt;groupId&amp;gt;com.atlassian.maven.plugins&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;maven-dependency-tracker-plugin&amp;lt;/artifactId&amp;gt;
  &amp;lt;executions&amp;gt;
    &amp;lt;execution&amp;gt;
      &amp;lt;goals&amp;gt;&amp;lt;goal&amp;gt;validate&amp;lt;/goal&amp;gt;&amp;lt;/goals&amp;gt;
    &amp;lt;/execution&amp;gt;
  &amp;lt;/executions&amp;gt;
&amp;lt;/plugin&amp;gt;
&lt;/pre&gt;

&lt;p&gt;You're done. If any of your module's dependency changes unexpectidely, your build will fail.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;checksum&lt;/code&gt; is there to help calculate checksum of arbitrary files as done by the plugin in reports. Simply use that command:&lt;/p&gt;

&lt;pre class="prettyprint"&gt;
mvn dependency-tracker:checksum -Dfile=/path/to/the/file
&lt;/pre&gt;

&lt;p&gt;The plugin is available in &lt;a href="http://confluence.atlassian.com/display/DEVNET/Atlassian+Maven+Repositories"&gt;Atlassian's public maven repository&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-6451787729319221652?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/agbv5QVP7Ow" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/6451787729319221652/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2010/01/maven-dependency-heaven.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/6451787729319221652?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/6451787729319221652?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/agbv5QVP7Ow/maven-dependency-heaven.html" title="Maven dependency heaven?" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2010/01/maven-dependency-heaven.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8HR38_eyp7ImA9WxBXEk4.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-641796053151055547</id><published>2009-12-27T08:00:00.002+11:00</published><updated>2010-01-23T18:47:16.143+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-23T18:47:16.143+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="clean" /><category scheme="http://www.blogger.com/atom/ns#" term="repository" /><category scheme="http://www.blogger.com/atom/ns#" term="maven" /><title>Cleaning one's maven 2 local repository</title><content type="html">&lt;p&gt;Maven 2's local repository has a tendency to grow, and never shrink. This morning mine was 2.2Go big.&lt;/p&gt;

&lt;p&gt;There are not many things you can do to remve unused items from that local repository. You'd first have to know what's unused?&lt;br&gt;
I tend to simply delete my local repository altogether from time to time. Only when I am ready to wait a little while during the next build though. I usually to that &lt;a href="http://www.atlassian.com"&gt;at work&lt;/a&gt; as there we have a &lt;a href="http://maven.apache.org/repository-management.html"&gt;local proxy&lt;/a&gt; that makes things pretty seemless.&lt;/p&gt;

&lt;p&gt;There is also the growing number of SNAPSHOTs that are produced and dowloaded by maven builds. They are easier and safer to get rid of. Here is a simple unix command to clean up your local repository of SNAPSHOTs:&lt;/p&gt;
&lt;pre&gt;find ~/.m2 -name *SNAPSHOT -type d | xargs rm -rf&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-641796053151055547?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/2gDyZZXtxMU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/641796053151055547/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2009/12/cleaning-ones-maven-2-local-repository.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/641796053151055547?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/641796053151055547?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/2gDyZZXtxMU/cleaning-ones-maven-2-local-repository.html" title="Cleaning one's maven 2 local repository" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2009/12/cleaning-ones-maven-2-local-repository.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEABRnY5eCp7ImA9WxBXEk4.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-1150246295762766053</id><published>2009-12-26T09:20:00.005+11:00</published><updated>2010-01-23T18:45:57.820+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-23T18:45:57.820+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xmas" /><category scheme="http://www.blogger.com/atom/ns#" term="unsubscribe" /><category scheme="http://www.blogger.com/atom/ns#" term="holiday" /><title>Holiday season</title><content type="html">&lt;p&gt;Happy X-mas, holidays, whatever you believe in!&lt;/p&gt;

&lt;p&gt;The holiday season is awesome on the web. This is the one time of the year when I hear about all the services I signed-up for and never got back to. Man there are quite a few of them. At least with all their 'holiday' mails, I can easily unsubscribe, delete my account, one at the time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-1150246295762766053?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/GnTRBlzySpg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/1150246295762766053/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2009/12/holiday-season.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/1150246295762766053?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/1150246295762766053?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/GnTRBlzySpg/holiday-season.html" title="Holiday season" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2009/12/holiday-season.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYBQ3w_fSp7ImA9WxJSGUk.&quot;"><id>tag:blogger.com,1999:blog-6368962890567550530.post-8542817367472740945</id><published>2009-05-10T17:06:00.016+10:00</published><updated>2009-05-10T18:12:32.245+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-10T18:12:32.245+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dependency" /><category scheme="http://www.blogger.com/atom/ns#" term="maven" /><title>The maven dependency plugin</title><content type="html">&lt;p&gt;The &lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/"&gt;maven dependency plugin&lt;/a&gt; is amongst the most useful maven plugin. Every developer using maven2 should know the basics of this plugins.&lt;/p&gt;

&lt;p&gt;What most developers like about this plugin is its very helpful goals to understand project dependencies. I am obviously talking about the &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/resolve-mojo.html"&gt;dependency:resolve&lt;/a&gt;&lt;/code&gt;, &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html"&gt;dependency:tree&lt;/a&gt;&lt;/code&gt; and the various &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html"&gt;dependency:analyze&lt;/a&gt;&lt;/code&gt; goals. But this is not what I want to talk about in this post. I want to talk about the &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html"&gt;dependency:copy&lt;/a&gt;&lt;/code&gt;, the &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html"&gt;dependency:unpack&lt;/a&gt;&lt;/code&gt; goals and their counterpart the &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html"&gt;dependency:copy-dependencies&lt;/a&gt;&lt;/code&gt; and &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html"&gt;dependency:unpack-dependencies&lt;/a&gt;&lt;/code&gt; goals.&lt;/p&gt;

&lt;p&gt;I often get asked at work what the difference is between those goals apart from the configuration syntax of course.&lt;/p&gt;

&lt;p&gt;The major difference is that with one set of goals you specify which dependencies of the current module the plugin will act on while with the other set of goals you specify a collection of arbitrary artifacts. I know that doesn't sound like much of a difference until you understand about what maven calls the &lt;em&gt;reactor&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To put it simply the reactor is the list of modules that maven is currently building. Maven for example uses the reactor to resolve in which order those modules should be built according to the dependencies they have on each other.&lt;/p&gt;

&lt;p&gt;By now you probably understand better how those goals differ from each other. If  you use the &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html"&gt;dependency:copy&lt;/a&gt;&lt;/code&gt; goal maven will not look in the reactor for the artifacts you want to copy. Therefore if you want to copy a module that is in the reactor you won't get the most up to date version (the one you are building right now) but a possibly completely out dated version coming from a repository somewhere.
Another drawback is that the build will fail until the artifact exists in a repository somewhere (including the local repository). That is especially annoying if this artifact is the output of a module in the reactor of your current build and you're trying to build it for the first time.&lt;/p&gt;

&lt;p&gt;On the contrary if you use the &lt;code&gt;&lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html"&gt;dependency:copy-dependencies&lt;/a&gt;&lt;/code&gt; goal you have to declare the artifact you want copied as a dependency. It means that you will get the artifact as you just built it - if it is part of the current maven reactor.&lt;/p&gt;

&lt;p&gt;There is a definite advantage using the &lt;em&gt;-dependencies&lt;/em&gt; version of those goals as then you make the most of maven strength in managing builds with inter-dependent modules. My rule is: whenever you can you should depend explicitly on a library using maven's dependency mechanism. This makes your build stronger and easier to understand.&lt;br&gt;&lt;em&gt;Implicit&lt;/em&gt; dependencies on libraries through plugins makes things less obvious and harder to debug when a problem arises.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6368962890567550530-8542817367472740945?l=sam.leberrigaud.org' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/HXRD/~4/OYXeYOoXguk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://sam.leberrigaud.org/feeds/8542817367472740945/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://sam.leberrigaud.org/2009/05/maven-dependency-plugin.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/8542817367472740945?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6368962890567550530/posts/default/8542817367472740945?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/HXRD/~3/OYXeYOoXguk/maven-dependency-plugin.html" title="The maven dependency plugin" /><author><name>SaM</name><uri>http://www.blogger.com/profile/00117584940321513912</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_1c9l8cOqBXc/TB0NPRFgjNI/AAAAAAAAAL8/PELIrXfqJMo/S220/moi+(square).jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://sam.leberrigaud.org/2009/05/maven-dependency-plugin.html</feedburner:origLink></entry></feed>

