In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Xiaobian to share with you how to use the exclusions tag in maven's pom.xml. I hope everyone has gained something after reading this article. Let's discuss it together!
Examples of maven pom.xml's exclusions tag in action projects org.springframework.boot spring-boot-starter org.springframework.boot spring-boot-starter-logging Explaining exclusion labels
This label is used to exclude the introduction of associative dependencies, because one of maven's pom dependencies is to introduce all associative dependencies.
What this tag does here is if the associated dependency might conflict with other introduced dependencies,
The associated dependencies must be excluded, so this label is used.
And this +s, you should know, can contain more than one!!!
Use exclusions to exclude dependencies
exclusions
But dependency regulation doesn't solve everything; we need exclusions to eliminate dependencies.
For example, if A is introduced into a project, A depends on B, but B is an older version.
At this point, you can use exclusions to exclude the transitive dependency and display the B dependency that declares an up-to-date version.
like this com.lowagie itext 4.2.1 bcmail-jdk14 bouncycastle bcprov-jdk14 bouncycastle bctsp-jdk14 bouncycastle
For example, if zookeeper is used, log4j conflicts are found.
We can also use this method to eliminate org.apache.zookeeper zookeeper 3.5.4-beta slf4j-log4j12 org.slf4j After reading this article, I believe you have a certain understanding of "how to use the exclusions tag in maven's pom.xml". If you want to know more about it, welcome to pay attention to the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.