排除依赖

前端之家收集整理的这篇文章主要介绍了排除依赖前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
http://www.jb51.cc/article/p-agjmihmh-eu.html

项目A依赖于项目B,但是由于一些原因,不想引入传递性依赖C,而是自己显式地声明对于项目C1.1.0版本的依赖。代码中使用exclusions元素声明排除依赖,exclusions可以包含一个或者多个exclusion子元素,因此可以排除一个或者多个传递性依赖。需要注意的是,声明exclusion的时候只需要groupId和artifactId,而不需要version元素,这是因为只需要groupId和artifactId就能唯一定位依赖图中的某个依赖。

dioruu+76suCBqOTIUQQpimmX2f9WwnHc/zhsMhE6ZwNkmS6LpekesdaCoyFS/Ztu15nuM4ruuWuqPVaqXrOrerw5kFQdDv91WXAk1GpiLPcZxsgcPyknU+n2czkIEzGw6HrImN8pCpKLZcLh3HyS61St/4ZDIpY7PAg0zTtCxLdSnQWGQqDsm+4hKG4Ww2k7jZXq+ncLIx2sxxHMMwVJcCjUWm4mFBEKwXOJSywW63y1QRKEGmolRkKh5rvXTwdDp94nxdMhWqkKkoFZmK48RxnGVqtoDwaRshU6EKmYpSkak4xWq1Mk1TnLp0MJkKVchUlIpMxenSNDVN88Glg3enI5GpUIVMRanIVDxVlqlJkmSLMeWeDcPw4uIiiqLNB8lUqEKmolRkKqSZzWZJkliWtbnA4Wg00jSt2+1uDhGTqVCFTEWpyFRIli3Hb1mW53lhGGovjEaj9Wualqm3C+3q5k51Kc7udqFpi1vVpTgSmYpSkakoxXw+9zxvPB5rG9br19QzU28XG3/LRpbc3VyVFy23C01mXt8utAe3V/Sau5urgj+91L+8JGQqSkWmoixJklxcXGjbsmHh+mXq3c3VVs7cLtZhUm6wSMzU9WeCA9srfs1mIW4XG7Faw1AlU1EqMhVlmU6n2o7Ly8s4jmuXqQdGOe9urmox8HufiweLW/yagl/XB+PQ8O/19bW84ktDpqJUZCpKUdhJzfT7/bfeeqtWmXooOTafy3cqXz5XOHaa9fLuu4Z7XlcUaPkNZdt5+dShnuNjPgLkXpP/67eePn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>project-a</artifactId> <version>1.0.0</version> <dependencies> <dependency> <groupId>com.wangsy.mvn</groupId> <artifactId> project-b</artifactId> <version>1.0.0</version> <exclusions> <exclusion> <groupId>com.wangsy.mvn</groupId> <artifactId> project-c</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.wangsy.mvn</groupId> <artifactId> project-c</artifactId> <version>1.1.0</version> </dependency> <dependencies> </project>

猜你在找的设计模式相关文章