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

Chapter 3. Creating a Maven project for a Red Hat build of Kogito microservice


Before you can begin developing Red Hat build of Kogito microservices, you need to create a Maven project where you can build your assets and any other related resources for your application.

Procedure

  1. In a command terminal, navigate to a local folder where you want to store the new project.
  2. Enter the following command to generate a project within a defined folder:

    On Red Hat build of Quarkus

    $ mvn archetype:generate \
        -DarchetypeGroupId=org.kie.kogito \
        -DarchetypeArtifactId=kogito-quarkus-dm-archetype \
        -DgroupId=org.acme -DartifactId=sample-kogito \
        -DarchetypeVersion=1.5.0.redhat-00002 \
        -Dversion=1.0-SNAPSHOT
    Copy to Clipboard Toggle word wrap

    On Spring Boot

    $ mvn archetype:generate \
        -DarchetypeGroupId=org.kie.kogito \
        -DarchetypeArtifactId=kogito-springboot-dm-archetype \
        -DgroupId=org.acme -DartifactId=sample-kogito \
        -DarchetypeVersion=1.5.0.redhat-00002 \
        -Dversion=1.0-SNAPSHOT
    Copy to Clipboard Toggle word wrap

    This command generates a sample-kogito Maven project and imports the extension for all required dependencies and configurations to prepare your application for business automation.

    If you want to enable PMML execution for your project, add the following dependency to the pom.xml file in the Maven project that contains your Red Hat build of Kogito microservices:

    Dependency to enable PMML execution

    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-pmml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jpmml</groupId>
      <artifactId>pmml-model</artifactId>
    </dependency>
    Copy to Clipboard Toggle word wrap

    On Red Hat build of Quarkus, if you plan to run your application on OpenShift, you must also import the smallrye-health extension for the liveness and readiness probes, as shown in the following example:

    SmallRye Health extension for Red Hat build of Quarkus applications on OpenShift

    $ mvn quarkus:add-extension -Dextensions="smallrye-health"
    Copy to Clipboard Toggle word wrap

    This command generates the following dependency in the pom.xml file of your Red Hat Decision Manager project on Red Hat build of Quarkus:

    SmallRye Health dependency for Red Hat build of Quarkus applications on OpenShift

    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-health</artifactId>
    </dependency>
    Copy to Clipboard Toggle word wrap

  3. Open or import the project in your VSCode IDE to view the contents.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat