3.3. Thorntail アプリケーションのスタンドアロンの Red Hat Enterprise Linux へのデプロイ
Thorntail アプリケーションをスタンドアロンの Red Hat Enterprise Linux にデプロイするには、アプリケーションで pom.xml
ファイルを設定し、Maven を使用してパッケージ化し、java -jar
コマンドを使用してデプロイします。
前提条件
- RHEL 7 または RHEL 8 がインストールされている。
3.3.1. スタンドアロン Red Hat Enterprise Linux デプロイメントに向けた Thorntail アプリケーションの準備
Thorntail アプリケーションをスタンドアロンの Red Hat Enterprise Linux にデプロイするには、最初に Maven を使用してアプリケーションをパッケージ化する必要があります。
前提条件
- Maven がインストールされている。
手順
以下の内容をアプリケーションの root ディレクトリーの
pom.xml
ファイルに追加します。... <build> <plugins> <plugin> <groupId>io.thorntail</groupId> <artifactId>thorntail-maven-plugin</artifactId> <version>${version.thorntail}</version> <executions> <execution> <goals> <goal>package</goal> </goals> </execution> </executions> </plugin> </plugins> </build> ...
Maven を使用してアプリケーションをパッケージ化します。
$ mvn clean package
作成される JAR ファイルは
target
ディレクトリーに置かれます。