While this is generally true, the problem/confusion is caused by the fact that the groupId for ehcach in version 1.1 is "ehcache", whereas for 1.2 it is "net.sf.ehcache", cause Maven to treat them as different artifacts, and therefore both will be included unless ehcache 1.1 is explicitly excluded.
A similar problem occurs when trying to use the full spring jar, and having to exclude individual spring jars that are transitive dependencies. - Stephen On 7/26/06, Edwin Punzalan <[EMAIL PROTECTED]> wrote:
Hi. Direct dependencies take precedence over transitive dependencies. Therefore, if you declare ehcache 1.2 in your pom.xml, then any transitive dependency of the same artifact but different version will not go into your project's classpath. No need to exclude if the problem is only the version. You need only to put the artifact with the version you want in your pom.xml. Hope that helps. ^_^ Satish wrote: > I have the following dependecies in my POM > - ecahce - 1.2 > - hibernate 3.1rc1 > > I have one of the package which depends on ecahce 1.2, but as part of > hibernate dependency, it downloads ecache1.1. There are some method > signatures change between ecache 1.1 and 1.2 and this results in the compile > error as the end, i assume > ecache 1.1 is taking the precedence in the classpath. > > any tips to resolve this. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Stephen Duncan Jr www.stephenduncanjr.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
