简体   繁体   中英

Maven : Does all Dependencies in DependenciesManagenent and Plugins in PluginManagement also inherit by the child?

I know the child inherits the dependecies of the parent dependency management. My question is why do I still need to explicity indicate the inherited dependecies in the child?

In plugin management. does plugin inside the plugin management also inherits by the child?

Dependency management in the parent pom is designed for uniformity. Plugin management also has the same purpose.

Let's use the scenario of a parent pom (P) with 2 modules (A and B). Both A and B require spring-boot library. A requires mongodb library, but not B.

So A explicitly inherit spring-boot and mongodb; B explicitly inherit just spring-boot. While inheriting, it's common to not include the and implicitly inherit that from the parent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM