目標

Spring Boot 外掛有以下目標

目標 描述

spring-boot:build-image

使用 buildpack 將應用程式打包成 OCI 映象,透過分叉生命週期確保 package 已執行。此目標適用於命令列呼叫。如果您需要在構建中配置目標 execution,請改用 build-image-no-fork

spring-boot:build-image-no-fork

使用 buildpack 將應用程式打包成 OCI 映象,但不分叉生命週期。此目標應在構建中配置目標 execution 時使用。要在命令列上呼叫此目標,請改用 build-image

spring-boot:build-info

根據當前 MavenProject 的內容生成 build-info.properties 檔案。

spring-boot:help

顯示 spring-boot-maven-plugin 的幫助資訊。呼叫 mvn spring-boot:help -Ddetail=true -Dgoal=<目標名稱> 可顯示引數詳細資訊。

spring-boot:process-aot

在應用程式上呼叫 AOT 引擎。

spring-boot:process-test-aot

在測試上呼叫 AOT 引擎。

spring-boot:repackage

重新打包現有 JAR 和 WAR 歸檔檔案,使其可以透過 java -jar 從命令列執行。當 layout=NONE 時,也可以簡單地用於打包一個包含巢狀依賴項(且沒有主類,因此不可執行)的 JAR。

spring-boot:run

就地執行應用程式。

spring-boot:start

啟動一個 Spring 應用程式。與 run 目標相反,此目標不會阻塞,允許其他目標對應用程式進行操作。此目標通常用於整合測試場景,即在測試套件之前啟動應用程式並在之後停止。

spring-boot:stop

停止由“start”目標啟動的應用程式。通常在測試套件完成後呼叫。

spring-boot:test-run

使用測試執行時類路徑就地執行應用程式。用於啟動應用程式的主類確定如下:如果已配置主類,則使用該主類。然後,如果測試類目錄中存在主類,則使用該主類。然後,如果類目錄中存在主類,則使用該主類。

© . This site is unofficial and not affiliated with VMware.