The aggregation and inheritance of MAVEN management in Eclipse and simple management of Versioning (III)

Source: Internet
Author: User
Tags inheritance

the meaning of existence:

Aggregation: Makes the compilation of multiple modules more concise.

Inheritance: Reduce the writing of duplicate code, and can resolve the problem of package conflict.

One: Use of aggregations:

Create a new Maven project, where only the pom file, then Cleaninstall, runs only one file, as shown in figure:

Two: The use of inheritance:

Create a new Maven project, where only the pom file, then Cleaninstall, runs only one file, as shown in figure:

1. Create the parent's pom and add unified resource information


2. Submodule inherits the parent's Pom


3.parent Pom introduces the dependency packages required by the project, using dependencymanagement tags


4. The sub-module's POM selection requires a dependent package to be configured, and no more version is needed, so that it can unify the build number of the entire project's dependent package.


5. You can put the aggregated modules tag content directly in the parent's pom, and then configure the Pom to run the parent.


Version Management:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.