purpose

Jenkins independently builds one of the modules in the multi-module project

steps

Switch to the root directory of the project

Build module project-service separately, and build other modules on which module project-service depends, using the following command:

mvn package -pl project/project-service -am
Copy the code

Build module project-common separately, and build other modules that depend on module project-common

mvn package -pl project-common -am -amd
Copy the code

The command description is as follows:

-pl, --projects
        Build specified reactor projects instead of all projects
-am, --also-make
        If project list is specified, also build projects required by the list
-amd, --also-make-dependents
        If project list is specified, also build projects that depend on projects on the list
Copy the code