Skip to content

Commit

Permalink
[NO ISSUE] Reorganize plain java examples (apache#2034)
Browse files Browse the repository at this point in the history
* [NO ISSUE] Reorganizing java examples

* [NO ISSUE] Reorganizing java examples

* [NO ISSUE] Fixing ci

* [NO ISSUE] Fix as per PR suggestion

---------

Co-authored-by: Gabriele-Cardosi <[email protected]>
# Conflicts:
#	.ci/jenkins/Jenkinsfile.deploy
  • Loading branch information
rgdoliveira committed Nov 7, 2024
1 parent 9521223 commit 3ceeab8
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 27 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/pr-kogito-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
timeout-minutes: 180
strategy:
matrix:
job_name: [ kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ]
job_name: [ kogito-java-examples, kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ]
os: [ubuntu-latest]
java-version: [17]
maven-version: ['3.9.6']
include:
- job_name: kogito-java-examples
repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-java-examples/
- job_name: kogito-quarkus-examples
repository: kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-quarkus-examples/
Expand Down
6 changes: 6 additions & 0 deletions kogito-java-examples/dmn-embedded-mode-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# decisions-embedded-mode-example

Is an example of running DMN decisions using plain java. This is an example decision for approving and declining the loan application. Please notice, the decision is only example that do not cover all cases from the banking domain.

## Execute
Simply run the main class `org.kie.kogito.decisions.embedded.DecisionsEmbeddedModeExample` either from the IDE or your command line.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kie.kogito.decisions.embedded</groupId>
<artifactId>decisions-embedded-mode-example</artifactId>
<name>Kogito Example :: Decision Embedded Mode</name>
<artifactId>dmn-embedded-mode-example</artifactId>
<name>Kogito Example :: DMN Embedded Mode</name>
<version>999-SNAPSHOT</version>
<packaging>kjar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -38,19 +39,11 @@
<version.kogito.bom>999-SNAPSHOT</version.kogito.bom>
<version.org.kie>999-SNAPSHOT</version.org.kie>

<version.quarkus.platform>3.8.6</version.quarkus.platform>
<version.org.slf4j>2.0.13</version.org.slf4j>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${version.quarkus.platform}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-bom</artifactId>
Expand Down
29 changes: 29 additions & 0 deletions kogito-java-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie.kogito.examples</groupId>
<artifactId>kogito-examples</artifactId>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>kogito-java-examples</artifactId>
<packaging>pom</packaging>
<name>Kogito Example :: Java</name>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>dmn-embedded-mode-example</module>
<module>rules-embedded-mode-example</module>
</modules>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,11 @@
<version.kogito.bom>999-SNAPSHOT</version.kogito.bom>
<version.org.kie>999-SNAPSHOT</version.org.kie>

<version.quarkus.platform>3.8.6</version.quarkus.platform>
<version.org.slf4j>2.0.13</version.org.slf4j>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${version.quarkus.platform}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-bom</artifactId>
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions kogito-quarkus-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
</activation>
<modules>
<module>decisiontable-quarkus-example</module>
<module>decisions-embedded-mode-example</module>
<module>dmn-15-quarkus-example</module>
<module>dmn-drools-quarkus-metrics</module>
<module>dmn-event-driven-quarkus</module>
Expand Down Expand Up @@ -100,7 +99,6 @@
<module>process-usertasks-timer-quarkus-with-console</module>
<module>process-usertasks-with-security-oidc-quarkus</module>
<module>process-usertasks-with-security-quarkus</module>
<module>rules-embedded-mode-example</module>
<module>rules-incubation-api-quarkus</module>
<module>rules-legacy-quarkus-example</module>
<module>rules-legacy-scesim-quarkus-example</module>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>kogito-java-examples</module>
<module>kogito-quarkus-examples</module>
<module>kogito-springboot-examples</module>
<module>serverless-workflow-examples</module>
Expand Down

0 comments on commit 3ceeab8

Please sign in to comment.