When you deploy a Maven project in IntelliJ IDEA, the packaging file may not be detected. This topic describes how to resolve this issue using a custom method or the maven-assembly-plugin.
Prerequisites
- Cloud Toolkit is installed and configured. For more information, see Install and configure Cloud Toolkit in IntelliJ IDEA.
- For more information about deploying multi-module applications, see Deploy a submodule of a multi-module project in IntelliJ IDEA.
Detect the packaging file using the custom method
- Open your project in IntelliJ IDEA.
- In the top menu bar of IntelliJ IDEA, choose .Note You can deploy the application to ECS, SAE, DEAS, an image repository, or Mini Program Cloud. This topic uses Deploy to Host as an example.
- In the Deploy to Host dialog box, select Upload File. Click Browse to select the deployment file.
Note If a JAR package has not been generated because this is the first time you are packaging the project, you must manually enter the absolute path of the file in the File text box. - In the Before launch area, click + and select Run Maven Goal.
- In the Select Maven Goal dialog box, enter
clean installin the Command line text box.
- Click OK.
Detect the packaging file using the maven-assembly-plugin
- Open your project in IntelliJ IDEA.
- In the configuration file, add
<appendAssemblyId>false</appendAssemblyId>to remove the suffix from the packaging file name. - In the Project pane, right-click the project name and choose from the shortcut menu.Note You can deploy the application to ECS, SAE, DEAS, an image repository, or Mini Program Cloud. This topic uses Deploy to Host as an example.
- In the Deploy to Host dialog box, select Maven Build as the deployment method. Click Apply and then click Run.

该文章对您有帮助吗?