This topic describes how to run a local BAT command before you deploy an application in IntelliJ IDEA.
Prerequisites
Cloud Toolkit is installed and configured. For more information, see Install and configure Cloud Toolkit in IntelliJ IDEA.
Procedure
Open your project in IntelliJ IDEA.
In the top menu bar of IntelliJ IDEA, choose .
NoteYou can deploy the application to various destinations, such as an ECS instance, SAE, DEAS, an image repository, or Mini Program Cloud. This topic uses Deploy to Host as an example.
On the Deploy to Host page, click + to the right of the Before launch area, and then select Run External Tool.
In the External Tools dialog box, click + in the upper-left corner.
In the Create Tool dialog box, configure the parameters and click OK.
The deployment parameters are as follows.
Parameter
Description
Name
A custom name for the tool.
Group
The group to which the tool belongs.
Description
A custom description for the tool.
Tool Settings
Program: Specifies the executable file.
Arguments: The arguments to pass to the executable file.
Working directory: The path of the working directory for the tool.
Advanced Options
Advanced options that you can select as needed.
NoteUse spaces to separate parameters. Use double quotation marks for parameters and paths that contain spaces. Use a backslash to escape double quotation marks that are part of a parameter or path. For example:
-Dmy.prop=\"quoted_value\" "second arg" third" "argIf your project uses Maven Build, move the configured step to run before the Maven Build step.
Click Run to run your project.