Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO ISSUE] Reorganize plain java examples #2034

Merged
merged 5 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pipeline {
getMavenCommand()
.withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
.withOptions(env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ? [ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ] : [])
.withOptions("-pl .,kogito-quarkus-examples,kogito-springboot-examples,serverless-workflow-examples")
.withOptions("-pl .,kogito-java-examples,kogito-quarkus-examples,kogito-springboot-examples,serverless-workflow-examples")
.skipTests(true)
.withSettingsXmlFile(MAVEN_SETTINGS_FILE)
.run("deploy -DdeployAtEnd -Dapache.repository.username=${REPOSITORY_USER} -Dapache.repository.password=${REPOSITORY_TOKEN} -DretryFailedDeploymentCount=5")
Expand Down
9 changes: 9 additions & 0 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) {
parallel: true,
buildchain: true,
jobs : [
[
id: 'kogito-java-examples',
primary: true,
env : [
// Sonarcloud analysis is disabled for examples
KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-java-examples/',
BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${getExamplesBuildMvnOptions(jobFolder).join(' ')}",
]
],
[
id: 'kogito-quarkus-examples',
primary: true,
Expand Down
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: incubator-kie-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>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also adjust <name> below?

<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
Loading