39.3. Red Hat Decision Manager の Maven 依存関係の追加


ご自分の Red Hat Decision Manager プロジェクトで適切な Maven 依存関係を使用するには、プロジェクトの pom.xml ファイルに Red Hat Business Automation の BOM (bill of materials) ファイルを追加します。Red Hat Business Automation BOM は、Red Hat Decision Manager と Red Hat Process Automation Manager の両方に適用されます。BOM ファイルを追加すると、提供される Maven リポジトリーから、推移的依存関係の適切なバージョンがプロジェクトに含められます。

Red Hat Business Automation BOM に関する詳細情報は、What is the mapping between Red Hat Process Automation Manager and the Maven library version? を参照してください。

手順

  1. Red Hat Business Automation BOM を pom.xml ファイルで宣言します。

    <dependencyManagement>
     <dependencies>
      <dependency>
       <groupId>com.redhat.ba</groupId>
       <artifactId>ba-platform-bom</artifactId>
       <version>7.13.3.redhat-00002</version>
       <type>pom</type>
       <scope>import</scope>
      </dependency>
     </dependencies>
    </dependencyManagement>
    <dependencies>
    <!-- Your dependencies -->
    </dependencies>
  2. <dependencies> タグでお使いのプロジェクトに必要な依存関係を宣言します。製品の BOM をプロジェクトにインポートしたら、ユーザー向け製品依存関係のバージョンが定義されるため、<dependency> 要素のサブ要素 <version> を指定する必要はありません。ただし、<dependency> 要素を使用して、プロジェクトで使用する依存関係を宣言する必要があります。
  3. Business Central に作成されない標準のプロジェクトでは、お使いのプロジェクトに必要な依存関係をすべて指定します。Business Central に作成するプロジェクトでは、基本的なデシジョンエンジンの依存関係が Business Central に自動的に提供されます。

    • 標準的な Red Hat Decision Manager プロジェクトでは、使用する機能に応じて、以下の依存関係を宣言します。
    • 標準的な Red Hat Decision Manager プロジェクトでは、以下の依存関係を宣言します。

      埋め込みデシジョンエンジン依存関係

      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-compiler</artifactId>
      </dependency>
      
      <!-- Dependency for persistence support. -->
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-persistence-jpa</artifactId>
      </dependency>
      
      <!-- Dependencies for decision tables, templates, and scorecards.
      For other assets, declare org.drools:business-central-models-* dependencies. -->
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-decisiontables</artifactId>
      </dependency>
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-templates</artifactId>
      </dependency>
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-scorecards</artifactId>
      </dependency>
      
      <!-- Dependency for loading KJARs from a Maven repository using KieScanner. -->
      <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-ci</artifactId>
      </dependency>

    • KIE Server を使用するには、以下の依存関係を宣言します。

      クライアントアプリケーション KIE Server の依存関係

      <dependency>
        <groupId>org.kie.server</groupId>
        <artifactId>kie-server-client</artifactId>
      </dependency>

    • Red Hat Decision Manager にリモートクライアントを作成するには、以下の依存関係を宣言します。

      クライアントの依存関係

      <dependency>
        <groupId>org.uberfire</groupId>
        <artifactId>uberfire-rest-client</artifactId>
      </dependency>

    • ルール、プロセス定義など、アセットを含む JAR ファイルを作成する場合は、お使いの Maven プロジェクトのパッケージングの種類を kjar と指定し、org.kie:kie-maven-plugin を使用して、<project> 要素に置かれた kjar パッケージングタイプを処理します。以下の例の ${kie.version} は、What is the mapping between Red Hat Decision Manager and the Maven library version? に記載されている Maven ライブラリーのバージョンです。

      <packaging>kjar</packaging>
      <build>
       <plugins>
        <plugin>
         <groupId>org.kie</groupId>
         <artifactId>kie-maven-plugin</artifactId>
         <version>${kie.version}</version>
         <extensions>true</extensions>
        </plugin>
       </plugins>
      </build>
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.