# スタンドアロンステップでTalend CommandLineをインストール(オプション)

既存のプロジェクトやPOM生成ステップを必要としないスタンドアロンステップでTalend CommandLineをインストールできます。このオプションによってTalend CommandLineをインストール、ライセンスをアップデート、Talend Studioマンスリーアップデートを適用することで、CIの環境を準備できるようになります。

なお、Talend CommandLineを個別にインストールできるオプションは、Talend CI Builderの8.0.4 (R2022-04で公開)以降のバージョンで利用可能です。

以下は、Talend CommandLineのインストールとアップデートを行うコマンドの例です。このコマンドは、大半のCIステップ(プロジェクトアーティファクトのPOMファイルを生成するなど)の前に実行できます。Talend CommandLineが既にインストールされている場合は、このコマンドによってクリーンインストールが行われ、CIワークスペースディレクトリーの下にある.metadataフォルダーを削除してからを再インストールします。

```
# To install Talend CommandLine, its license and a monthly update
mvn org.talend.ci:builder-maven-plugin:8.0.4:install 
<!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower 
-Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base -->
-Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2022-04 
-Dlicense.path=/home/talend/talend_studio/license
```

Talend CI Builderバージョン8.0.8 (R2022-08より利用可能)以降、暗号化キーをローテションする必要がある場合は、-Dstudio.encryption.keys.fileパラメーターを追加し、Talend CommandLineをインストールする時に暗号化キー設定ファイルへのパスを指定します。詳細は、[その他のTalend関連のMavenパラメーター](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/other-talend-maven-build-options)をご覧ください。

以下は、Talend CommandLineのインストール時に暗号化キーファイルを指定するコマンドの例です。

```
# To specify the encryption key file when installing Talend CommandLine, its license and a monthly update
mvn org.talend.ci:builder-maven-plugin:8.0.8:install 
<!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower 
-Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base -->
-Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2022-08 
-Dlicense.path=/home/talend/talend_studio/license
-Dstudio.encryption.keys.file=/home/talend/key/studio.keys
```

Talend CommandLineのインストール中に、エラーが返されるまで接続が開くのを待つタイムアウト時間(ミリ秒)を設定できます。これは、CIサーバーがすぐに応答を受け取れない場合にブロックされるのを防ぐのに役立ちます。

以下は、デフォルトである12000ミリ秒のタイムアウトでTalend CommandLineのインストールとアップデートを行うコマンドの例です。

```
# To install Talend CommandLine, its license and a monthly update with the default 12000 milliseconds timeout
mvn org.talend.ci:builder-maven-plugin:8.0.4:install 
<!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower 
-Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base -->
-Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2022-04 
-Dlicense.path=/home/talend/talend_studio/license 
-Dinstall.org.eclipse.ecf.provider.filetransfer.httpclient4.retrieve.connectTimeout=12000 
-Dinstall.org.eclipse.ecf.provider.filetransfer.httpclient4.retrieve.readTimeout=12000 
-Dinstall.org.eclipse.ecf.provider.filetransfer.httpclient4.browse.connectTimeout=12000
```

スタンドアロンインストールコマンドが完了すると、Talend CommandLineはCIワークスペースディレクトリーにインストールされます。CIワークスペースに、次のフォルダーが作成されます。

* .commandline\_8
* .p2Installer\_8

情報メモ注: Talend Studioのインストールディレクトリーには、上記のMaven CIのインストールとは無関係な、プラットフォーム固有のスクリプトが個別に含まれています。

* Windows: commandline\_upgrade.bat
* Linux: commandline-linux\_upgrade.sh

これらのスクリプトはTalend Studioのインストールに含まれており、Talend Studioベースのコマンドラインツールをインストールするために使用されます。対応するスクリプトを実行すると、Talend Studioのインストールディレクトリーにcommandline-workspaceフォルダーと起動用スクリプトcommandline.batが作成されます。

ツールコマンドの使用方法については、[Talend CommandLineAPI](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/cmdl-api "Talend CommandLineアプリケーションに-helpコマンドを入力場合に取得する、すべてのコマンド用の完全なヘルプ。")を参照してください。