Multi-module projects are frequent occurrences when you create and deploy projects. toolkit-maven-plugin supports the following two methods of deploying a multi-module project:
- Method 1: Run the packaging and deployment commands in your parent project.
To use this method, you must use toolkit-maven-plugin V1.0.3 or later.
When you run the
toolkit:deploycommand in your parent project, add the
-Ddeploy_artifactsparameter to specify the artifact ID of the submodule that you want to deploy. If you want to deploy multiple submodules, separate them with commas (,).
The following example shows the submodules of the CarShop project:
carshop itemcenter-api itemcenter detail
To deploy the itemcenter and detail submodules, run the following command in the carshop directory:
mvn clean package toolkit:deploy -Ddeploy_artifacts=itemcenter,detail
By default, the plug-in separately deploys the corresponding applications based on the
.edas_config.yamlfiles of the itemcenter and detail submodules. You can also add the
-Dedas_configparameter to specify the configuration file.
- Method 2: Run the packaging and deployment commands in your submodule. All the toolkit-maven-plugin
versions support this method.
installcommand in your parent project to install the dependencies of the submodule to your Maven local repository. Then, go to the directory of the submodule that you want to deploy and run the