特定 WebSphere ランタイム環境のクラスパスをエミュレートする依存関係 POM ファイルの構成

[8.5.5.2 以降] WebSphere ランタイム環境のクラスパスをエミュレートするターゲットのプロジェクト・オブジェクト・モデル (POM) ファイルを使用する予定の場合、Maven プロジェクト依存関係を構成し、それらの依存関係を使用するために必要なステップを実行することができます。サポートされるランタイムと関連付けられたターゲット POM ファイルを使用する予定の場合、 起動構成スクリプトを使用して、ランタイム・ライブラリーをローカル Maven リポジトリーにコピーすることができます。

このタスクについて

[8.5.5.2 以降] コンパイル目的でサーバー・ランタイム環境を表すターゲット POM ファイルが使用可能です。 ターゲット POM ファイルは以下のランタイムについて使用可能で、対応するフラグメントを依存関係として追加できます。

[8.5.5.2 以降]

[8.5.5.2 以降] WebSphere Application Server Liberty Profile バージョン 8.5.x のターゲット POM の依存関係には、追加の構成は不要です。 その他の POM ターゲットの場合はすべて、 ランタイム・ライブラリーをローカル Maven リポジトリーにコピーする起動構成スクリプトを使用する必要があります。

スクリプトは、製品のインストール済み環境の plugins ディレクトリー にある com.ibm.etools.maven.javaee.core プラグインに入っています。

手順

  1. ターゲット・ランタイム環境の起動構成スクリプトをインポートするため、 「ファイル」 > 「インポート」 > 「実行/デバッグ」 > 「起動 構成」をクリックします。
  2. 「参照」をクリックして、スクリプトが入っているディレクトリーを見つけ、 スクリプトを選択します。
    • WebSphere® Application Server の場合、スクリプトは <install_directory>¥plugins¥com.ibm.etools.maven.javaee.core_x¥resources¥RunConfigurations¥WAS855PluginsInstaller.launch に置かれています。
      注: このスクリプトは WebSphere Application Server V8.5.0.2 にも使用できます。
    • WebSphere Portal V8.0 の場合: <install_directory>¥plugins¥com.ibm.etools.maven.javaee.core_x¥resources¥RunConfigurations¥WAS8PluginsInstaller.launch
    注: com.ibm.etools.maven.javaee.core_x 中の x は、プラグインのバージョンです。
  3. 「終了」をクリックします。
  4. 起動構成を変更するため、「起動構成の実行」 > 「実行構成」をクリックします。「Maven ビルド」を展開してインポートされた構成を確認し、それから起動構成をクリックして開きます。
  5. ベース・ディレクトリー・フィールドに、pom.xml があるロケーションを指定します。
    • WebSphere Application Server V8.5.5 の場合: <install_directory>¥plugins¥com.ibm.etools.maven.javaee.core¥resources¥scripts¥WAS 8.5.5 Plugins Installer
    • WebSphere Application Server V8.5.0.2 の場合: <install_directory>¥plugins¥com.ibm.etools.maven.javaee.core¥resources¥scripts¥WAS 8.5.0 Plugins Installer
    • Liberty V8.5.5 の場合: <install_directory>¥plugins¥com.ibm.etools.maven.javaee.core¥resources¥scripts¥Liberty 8.5.5 Plugins Installer
    • Liberty 8.5.0.2 の場合: <install_directory>\plugins\com.ibm.etools.maven.javaee.core\resources\scripts\Liberty 8.5.0 Plugins Installer
    • WebSphere Portal V8.0 の場合: <install_directory>¥plugins¥com.ibm.etools.maven.javaee.core¥resources¥scripts¥WAS 8 Plugins Installer
  6. serverInstallationFolder パラメーターの値を指定します。
    1. パラメーターを選択して「編集」をクリックします。
    2. 「値」フィールドに、サーバーがインストールされているディレクトリーを指定してから、「OK」をクリックします。
      • WebSphere Application Server の場合: <server_installation_directory>¥AppServer
      • Liberty の場合: <server_installation_directory>¥wlp
  7. 「起動構成の実行」をクリックして、起動構成を実行します。

次のタスク

注: あるいは、Maven コマンド・ラインから次のコマンドを指定してスクリプトを実行することもできます: mvn install -f <install_directory>¥plugins¥com.ibm.etools.maven.javaee.core¥resources¥scripts¥<plugin_installer_folder>¥pom.xml" -DserverInstallationFolder="<server_installation_directory>"

[8.5.5.2 以降] 例: mvn install -f "<install_directory>\plugins\com.ibm.etools.maven.javaee.core\resources\scripts\WAS 8.5.5 Plugins Installer\pom.xml" -DserverInstallationFolder="C:\Program Files\IBM\WebSphere\Appserver"

例: mvn install -f "<install_directory>¥plugins¥com.ibm.etools.maven.javaee.core¥resources¥scripts¥Liberty 8.5.5 Plugins Installer¥pom.xml" -DserverInstallationFolder="C:¥Program Files¥IBM¥WebSphere¥Liberty¥wlp"

トピックのタイプを示すアイコン タスクのトピック
インフォメーション・センターのご利用条件 | フィードバック

タイム・スタンプ・アイコン 最終更新: May 29, 2014 10:20

ファイル名: localrepo.html