Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The concept of Maven inheritance and aggregation

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "the concept of Maven inheritance and aggregation". In daily operation, I believe many people have doubts about the concept of Maven inheritance and aggregation. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "the concept of Maven inheritance and aggregation". Next, please follow the editor to study!

Inherit

What is inheritance, we can define the parent project of the project, which is used to inherit the dependencies, plug-ins, properties, and other information of the parent project.

Com.alibaba

Dubbo-parent

2.8.4

For example, the parent project of dubbo is the dependencies dependency, properties and other configurations defined in the dubbo-parent,dubbo-parent project can be passed to the dubbo project, while the dubbo child project does not need important definition dependencies.

Note that if I put the dependencies in dubbo-parent on the outside

...

This form of dependency management, the dubbo project is not inherited by default, this is an optional dependency, you need to add your own dependencies that need to be inherited, do not need to take the version number, inherit the parent project by default.

Polymerization

Inheritance is done by defining the parent form, and aggregation is the module form.

Let's also look at the aggregation relationship through dubbox. Dubbox is the general project, and the following are all sub-modules. Note that the total project must be in the form of pom package in order to be an aggregation relationship.

Let's see how the module is defined.

Packaging, compiling and other operations on the dubbox will directly operate the sub-modules, without the need for us to package one by one on other projects.

At this point, the study of "the concept of Maven inheritance and aggregation" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report