MNG-1797

a.k.a the maven bug of hell, basically boils down to this:


<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-hibernate3</artifactId>
<version>2.0-m1</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.1</version>
</dependency>

If you have this in your pom then hibernate 3.1 will not be passed on transitively anymore because you’ve excluded it on another dependency. This can lead to all sorts of seemingly random behaviour, so beware when you start excluding dependencies from other poms !

As a workaround, you should exclude the unnecessary dependencies in the child pom rather than on the dependency directly.

No comments: