Wednesday, 10 March 2010

Maven Plugin Dependency Duplication

Maven is a great build tool, and it has saved me from taking care of all the libraries and dependency hell, but it is not perfect, at least not in the version that I used (2.0.6). I wanted to use a newer version of one of the hibernate libraries, so I specified the new version in my project pom xml. The problem was that in the final war file, I had both the new version and the old version of the library. One of the plugin dependency actually depends on an older hibernate library, hence Maven automatically included both libraries. It is actually a known bug in 2.0.6 (see MNG-2972) and it's fixed in 2.0.9, so upgrading my Maven to 2.0.9 did the trick.
blog comments powered by Disqus