Detect packaging files during project deployment in IntelliJ IDEA

更新时间:
复制 MD 格式

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

Detect the packaging file using the custom method

  1. Open your project in IntelliJ IDEA.
  2. In the top menu bar of IntelliJ IDEA, choose Tools > Alibaba Cloud > Deploy to Host....
    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.
  3. 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.
  4. In the Before launch area, click + and select Run Maven Goal.
  5. In the Select Maven Goal dialog box, enter clean install in the Command line text box.
    select maven goal
  6. Click OK.

Detect the packaging file using the maven-assembly-plugin

  1. Open your project in IntelliJ IDEA.
  2. In the configuration file, add <appendAssemblyId>false</appendAssemblyId> to remove the suffix from the packaging file name.
  3. In the Project pane, right-click the project name and choose Alibaba Cloud > Deploy to Host... 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.
  4. In the Deploy to Host dialog box, select Maven Build as the deployment method. Click Apply and then click Run.
    maven build方式部署