依赖关系:Project-A>Project-B>Project-C,但是Project-A不依赖Project-C,在Project-A中的POM.xml应该进行如下配置:
<dependency> <groupId>sample.ProjectB</groupId> <artifactId>Project-B</artifactId> <version>1.0</version> <scope>compile</scope> <exclusions> <exclusion> <!-- declare the exclusion here --> <groupId>sample.ProjectC</groupId> <artifactId>Project-C</artifactId> </exclusion> </exclusions> </dependency>