Polymerization
Now, if I had created 3 maven projects,
User-core.2.user-log,3.user-service
At this time, if we are going to pack these items, it will be troublesome to get one by one. So do we have a better way to pack the others by just packing one? ma
At this point, we can take advantage of Maven's aggregation features. Create a new, empty Maven project. For example:
Once created, open Pom.xml to write the following configuration:
This time, we only need to execute this empty MAVEN project to complete the package of all the projects.
Inherited
Now, if I had created 3 maven projects,
User-core.2.user-log,3.user-service
We will find that they each have their own pom.xml, each with a lot of repetitive configuration, such as: encoding configuration, each need to configure the version and so on. So we have no better way to write only one, so that others can reuse this part of the method.
MAVEN provides an inheritance feature that can be implemented.
After creation, we will user-core,user-log,user-service inside such as: encoding configuration, common jar configuration information can be put into user-parent inside.
Such as:
Then join in User-core,user-log,user-service's pom.xml:
Maven Learning note Four (aggregation and inheritance)