I have never really been able to figure this out and it's really driving me up the wall at the moment. Is there a time that Maven2 will automatically exclude transitive dependencies? Here is the scenario:
I have 2 projects, then both include the exact same dependency. When I build the first library, it builds perfectly fine. When I build the second library, it files during the unit tests with NoClassDefFoundErrors. If I look at the dependencies being included, Maven2 isn't including the same transitive dependencies from that common dependency between the two projects. Basically I have to include those transitive dependencies explicitly, which I don't want to do. What are the causes where Maven won't include compile dependencies that a first level dependency is dependant on? It seems very nondeterministic, so I'm guessing there are some nonobvious reason behind the scenes for how it calculates this. Thanks! Ryan