此内容没有您所选择的语言版本。

Chapter 3. Java project migration


Projects that you developed in Java code in Red Hat JBoss BRMS 6.4 (for example, in Eclipse) also require modification for Red Hat Decision Manager 7.1. You must update the dependencies in the pom.xml file for each project and rebuild the project. To migrate your Java client applications, you also must update the dependencies in the pom.xml file for each project. If your application uses an embedded Red Hat JBoss BRMS 6.4 engine (Drools), this change also updates the engines. If the application calls the Decision Server, the API client library is updated.

3.1. Update Java project dependencies

You must update several dependencies in your Java projects to prepare them for migration to Red Hat Decision Manager 7.1.

Prerequisite

The Maven repository for Red Hat Decision Manager 7.1 has been downloaded from the Red Hat Customer Portal and made available to the local Maven installation (as a local or remote repository).

Procedure

  1. Open the pom.xml file of the project and remove the <version> tag from any dependencies under the following groups:

    • org.kie
    • org.drools
    • org.jbpm
    • org.optaplanner
  2. Add the Red Hat Business Automation bill of materials (BOM) dependency under the <dependencies> tag within the <dependencyManagement> section:

    <dependency>
      <groupId>com.redhat.ba</groupId>
      <artifactId>ba-platform-bom</artifactId>
      <version>7.1.0.GA-redhat-00002</version>
      <scope>import</scope>
      <type>pom</type>
    </dependency>
    Copy to Clipboard

    The Red Hat Business Automation BOM applies to both Red Hat Decision Manager and Red Hat Process Automation Manager. When you add the BOM files, the correct versions of transitive dependencies from the provided Maven repositories are included in the project. The BOM <version> is the version of the com.redhat.ba:ba-platform-bom Red Hat Business Automation artifact in the Maven repository. You can view the version of the artifact by entering the repository and navigating to the maven-repository/com/redhat/bom/ba/ba-platform-bom directory.

  3. If your code uses any Drools CDI annotations (@KReleaseId , @KContainer, @KBase, @KSession), also add the following dependency:

    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-cdi</artifactId>
    </dependency>
    Copy to Clipboard

    This dependency is necessary because the CDI extension for processing the annotations is now defined using a separate module. Without this dependency, the annotations do not work.

  4. Replace the legacy org.guvnor dependency (if applicable) with the new org.uberfire dependency.

    Legacy org.guvnor dependency:

    <dependency>
      <groupId>org.guvnor</groupId>
      <artifactId>guvnor-rest-client</artifactId>
    </dependency>
    Copy to Clipboard

    New org.uberfire dependency:

    <dependency>
      <groupId>org.uberfire</groupId>
      <artifactId>uberfire-rest-client</artifactId>
    </dependency>
    Copy to Clipboard
  5. Update the version of the project artifact and save the pom.xml file.

3.2. Verify the Java project migration

After you have migrated all Java project data, rebuild the Java project to verify a successful migration.

Prerequisites

  • Java project dependencies have been updated.
  • Maven 3.x or later is installed.
  • Java 8 or later is installed.

Procedure

  1. Rebuild each Java project using a regular Maven build.

    $ mvn clean install
    Copy to Clipboard
  2. Review all project data in each build to confirm successful migration.

    If you encounter build errors, verify that the project dependencies have been updated correctly. To review other product changes that may have impacted your Java project, see Chapter 4, Other migration considerations.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat