In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
For clearer design and higher reusability, software designer Wangwang will divide the software into modules in various ways. Inheritance and aggregation are used in maven to simplify the configuration and operation of modules. The similarities and differences between them are as follows:
1. The aggregation module is used to simplify the compilation and packaging of the project, and all modules can be operated through direct operation of the aggregation module; inheritance is mainly to simplify configuration and save the unity of each module, the announced part can be extracted and put into the parent project, such as dependent version, plug-in settings and other extended attribute settings.
two。 The inheritance and aggregation modules that need to be established separately are used to support aggregation and inheritance functions, and the packaging of this module is pom. Generally speaking, inheritance and aggregation are placed in the same module to provide both aggregation and inheritance functions.
3. In order to operate all sub-modules through the aggregation module, the aggregation module needs to rely on each sub-module, and the relative path of the sub-module needs to be specified through modules in the pom of the aggregation module; in order to achieve the configuration of using the parent project in the sub-project, the sub-project needs to rely on the parent project, and the parent project coordinates and their paths need to be specified forcefully in the sub-project, which is specified through the parent tag. In addition, if a project does not specify a parent project, it specifies super pom by default (the top-level project in maven, which is equivalent to Object in java).
4. It is best to have a unified groupId and a unified version for each module in the project. This can be easily achieved by specifying groupId and version in the parent project.
5. To reduce package conflicts and plug-in conflicts, it is best to specify the version of the package and the settings of the plug-in in the parent project. DependencyManagement and pluginManagement.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.