Deploy a submodule of a multi-module project in IntelliJ IDEA
Cloud Toolkit lets you deploy a submodule from a multi-module project. This topic describes how to deploy the Consumer submodule of a Meetup multi-module project to Serverless App Engine (SAE) in IntelliJ IDEA.
Background information
If you have a Meetup multi-module project, it has the following structure:
Consumer
Provider
Provider-api
The Consumer and Provider modules are submodules of the Meetup project. Both modules depend on the Provider-api module.
Deploy a submodule of a multi-module project
In the Project view of IntelliJ IDEA, right-click the Meetup project. From the shortcut menu, select .
In the Deploy to SAE dialog box, set the deployment parameters.
NoteIf you have not created an application in SAE, click Create Serverless Application on SAE Console in the upper-right corner of the dialog box to open the SAE console and create an application.
The following table describes the deployment parameters.
Parameters
Parameter
Description
Application
Region
The region where the application is located.
Namespace
The namespace where the application is located.
Application
The name of the application.
Deploy File
Maven Build
If you select this option, the system adds a Maven task by default to build the deployment package. To deploy a submodule of a multi-module project, see Deploy a submodule of a multi-module project.
Upload File
If you select this option, upload your WAR or JAR package to deploy the application.
Image
If you choose the Image method to build an application, you must enter a registry address before you can deploy it.
Gradle Build
If you select this option, you can build and deploy the application directly.
NoteIf you deployed the application from a JAR or WAR package, you can only use the Maven Build or Upload File deployment methods in Cloud Toolkit. If you deployed the application from an image, you can only use the Image deployment method.
Run the
mvn clean installcommand on the Meetup parent project. This is the default action.Run the
mvn clean packagecommand on the Consumer subproject.In the Deploy to EDAS dialog box, in the Before launch area, you can click +.
From the Add New Configuration menu, select Run Maven Goal.
In the Select Maven Goal dialog box, click the folder icon to select the Consumer submodule, in the Command line field, enter clean package, and then click OK.
Click Apply, and then click Run.
Result verification
After the deployment starts, deployment logs appear in the Console section of IntelliJ IDEA. You can check the logs to verify the deployment result.
You can also log on to the SAE console to view the deployment result on the application's basic information page.