diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 17f5aa52b2..1f64eac57b 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -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") diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index ff19cc8924..78895e6f71 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -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, diff --git a/.github/workflows/pr-kogito-examples.yml b/.github/workflows/pr-kogito-examples.yml index b186957f84..4089fd8b6e 100644 --- a/.github/workflows/pr-kogito-examples.yml +++ b/.github/workflows/pr-kogito-examples.yml @@ -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/ diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/.gitignore b/kogito-java-examples/dmn-embedded-mode-example/.gitignore similarity index 100% rename from kogito-quarkus-examples/decisions-embedded-mode-example/.gitignore rename to kogito-java-examples/dmn-embedded-mode-example/.gitignore diff --git a/kogito-java-examples/dmn-embedded-mode-example/README.md b/kogito-java-examples/dmn-embedded-mode-example/README.md new file mode 100644 index 0000000000..cda00cda4f --- /dev/null +++ b/kogito-java-examples/dmn-embedded-mode-example/README.md @@ -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. \ No newline at end of file diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/pom.xml b/kogito-java-examples/dmn-embedded-mode-example/pom.xml similarity index 89% rename from kogito-quarkus-examples/decisions-embedded-mode-example/pom.xml rename to kogito-java-examples/dmn-embedded-mode-example/pom.xml index 75a6778bb0..7c54fe637e 100644 --- a/kogito-quarkus-examples/decisions-embedded-mode-example/pom.xml +++ b/kogito-java-examples/dmn-embedded-mode-example/pom.xml @@ -22,10 +22,11 @@ 4.0.0 org.kie.kogito.decisions.embedded - decisions-embedded-mode-example - Kogito Example :: Decision Embedded Mode + dmn-embedded-mode-example + Kogito Example :: DMN Embedded Mode 999-SNAPSHOT kjar + UTF-8 17 @@ -38,19 +39,11 @@ 999-SNAPSHOT 999-SNAPSHOT - 3.8.6 2.0.13 - - io.quarkus - quarkus-bom - ${version.quarkus.platform} - pom - import - org.drools drools-bom diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/Applicant.java b/kogito-java-examples/dmn-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/Applicant.java similarity index 100% rename from kogito-quarkus-examples/decisions-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/Applicant.java rename to kogito-java-examples/dmn-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/Applicant.java diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/DecisionsEmbeddedModeExample.java b/kogito-java-examples/dmn-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/DecisionsEmbeddedModeExample.java similarity index 100% rename from kogito-quarkus-examples/decisions-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/DecisionsEmbeddedModeExample.java rename to kogito-java-examples/dmn-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/DecisionsEmbeddedModeExample.java diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/LoanApplication.java b/kogito-java-examples/dmn-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/LoanApplication.java similarity index 100% rename from kogito-quarkus-examples/decisions-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/LoanApplication.java rename to kogito-java-examples/dmn-embedded-mode-example/src/main/java/org/kie/kogito/decisions/embedded/LoanApplication.java diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF b/kogito-java-examples/dmn-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF similarity index 100% rename from kogito-quarkus-examples/decisions-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF rename to kogito-java-examples/dmn-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/src/main/resources/META-INF/kmodule.xml b/kogito-java-examples/dmn-embedded-mode-example/src/main/resources/META-INF/kmodule.xml similarity index 100% rename from kogito-quarkus-examples/decisions-embedded-mode-example/src/main/resources/META-INF/kmodule.xml rename to kogito-java-examples/dmn-embedded-mode-example/src/main/resources/META-INF/kmodule.xml diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/src/main/resources/org/kie/kogito/decisions/embedded/loan-application-age-limit.dmn b/kogito-java-examples/dmn-embedded-mode-example/src/main/resources/org/kie/kogito/decisions/embedded/loan-application-age-limit.dmn similarity index 100% rename from kogito-quarkus-examples/decisions-embedded-mode-example/src/main/resources/org/kie/kogito/decisions/embedded/loan-application-age-limit.dmn rename to kogito-java-examples/dmn-embedded-mode-example/src/main/resources/org/kie/kogito/decisions/embedded/loan-application-age-limit.dmn diff --git a/kogito-java-examples/pom.xml b/kogito-java-examples/pom.xml new file mode 100644 index 0000000000..c21967f2c3 --- /dev/null +++ b/kogito-java-examples/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + org.kie.kogito.examples + kogito-examples + 999-SNAPSHOT + + + kogito-java-examples + pom + Kogito Example :: Java + + + + default + + true + + + dmn-embedded-mode-example + rules-embedded-mode-example + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/.gitignore b/kogito-java-examples/rules-embedded-mode-example/.gitignore similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/.gitignore rename to kogito-java-examples/rules-embedded-mode-example/.gitignore diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/README.md b/kogito-java-examples/rules-embedded-mode-example/README.md similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/README.md rename to kogito-java-examples/rules-embedded-mode-example/README.md diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/pom.xml b/kogito-java-examples/rules-embedded-mode-example/pom.xml similarity index 91% rename from kogito-quarkus-examples/rules-embedded-mode-example/pom.xml rename to kogito-java-examples/rules-embedded-mode-example/pom.xml index ca6a7d6879..2a5eb76930 100644 --- a/kogito-quarkus-examples/rules-embedded-mode-example/pom.xml +++ b/kogito-java-examples/rules-embedded-mode-example/pom.xml @@ -38,19 +38,11 @@ 999-SNAPSHOT 999-SNAPSHOT - 3.8.6 2.0.13 - - io.quarkus - quarkus-bom - ${version.quarkus.platform} - pom - import - org.drools drools-bom diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/Applicant.java b/kogito-java-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/Applicant.java similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/Applicant.java rename to kogito-java-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/Applicant.java diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/LoanApplication.java b/kogito-java-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/LoanApplication.java similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/LoanApplication.java rename to kogito-java-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/LoanApplication.java diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/RulesEmbeddedModeExample.java b/kogito-java-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/RulesEmbeddedModeExample.java similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/RulesEmbeddedModeExample.java rename to kogito-java-examples/rules-embedded-mode-example/src/main/java/org/kie/kogito/rules/embedded/RulesEmbeddedModeExample.java diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF b/kogito-java-examples/rules-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF rename to kogito-java-examples/rules-embedded-mode-example/src/main/resources/META-INF/MANIFEST.MF diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/src/main/resources/META-INF/kmodule.xml b/kogito-java-examples/rules-embedded-mode-example/src/main/resources/META-INF/kmodule.xml similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/src/main/resources/META-INF/kmodule.xml rename to kogito-java-examples/rules-embedded-mode-example/src/main/resources/META-INF/kmodule.xml diff --git a/kogito-quarkus-examples/rules-embedded-mode-example/src/main/resources/org/kie/kogito/rules/embedded/loan-application-age-limit.drl b/kogito-java-examples/rules-embedded-mode-example/src/main/resources/org/kie/kogito/rules/embedded/loan-application-age-limit.drl similarity index 100% rename from kogito-quarkus-examples/rules-embedded-mode-example/src/main/resources/org/kie/kogito/rules/embedded/loan-application-age-limit.drl rename to kogito-java-examples/rules-embedded-mode-example/src/main/resources/org/kie/kogito/rules/embedded/loan-application-age-limit.drl diff --git a/kogito-quarkus-examples/decisions-embedded-mode-example/README.md b/kogito-quarkus-examples/decisions-embedded-mode-example/README.md deleted file mode 100644 index 1a6f797d0c..0000000000 --- a/kogito-quarkus-examples/decisions-embedded-mode-example/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# decisions-embedded-mode-example - -Is an example of runing 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. \ No newline at end of file diff --git a/kogito-quarkus-examples/pom.xml b/kogito-quarkus-examples/pom.xml index bfc912b7cc..1b555b56d0 100644 --- a/kogito-quarkus-examples/pom.xml +++ b/kogito-quarkus-examples/pom.xml @@ -50,7 +50,6 @@ decisiontable-quarkus-example - decisions-embedded-mode-example dmn-15-quarkus-example dmn-drools-quarkus-metrics dmn-event-driven-quarkus @@ -100,7 +99,6 @@ process-usertasks-timer-quarkus-with-console process-usertasks-with-security-oidc-quarkus process-usertasks-with-security-quarkus - rules-embedded-mode-example rules-incubation-api-quarkus rules-legacy-quarkus-example rules-legacy-scesim-quarkus-example diff --git a/pom.xml b/pom.xml index 4f796475d7..1626279866 100755 --- a/pom.xml +++ b/pom.xml @@ -137,6 +137,7 @@ true + kogito-java-examples kogito-quarkus-examples kogito-springboot-examples serverless-workflow-examples