From 6c2bc763e0c2ae33113aea99299c1c6067c8c3b9 Mon Sep 17 00:00:00 2001 From: Mario Fusco Date: Mon, 20 Sep 2021 16:02:47 +0200 Subject: [PATCH 1/8] [KOGITO-5906] Enabling Event Fact type (#1609) * [KOGITO-5906] enable cep * wip * wip * fix generation of ProjectRuntime for legacy kmodules * wip * small refactor --- .../kogito/factory/KogitoEventFactHandle.java | 63 +++++++++ .../factory/KogitoFactHandleFactory.java | 38 ++++- .../codegen/rules/IncrementalRuleCodegen.java | 53 +++---- .../codegen/rules/KogitoPackageSources.java | 15 +- .../rules/ProjectRuntimeGenerator.java | 2 + .../kogito/quarkus/drools/ProbeCounter.java | 37 +++++ .../kie/kogito/quarkus/drools/ProbeEvent.java | 55 ++++++++ .../kie/kogito/quarkus/drools/StockTick.java | 131 ++++++++++++++++++ .../src/main/resources/META-INF/kmodule.xml | 9 ++ .../src/main/resources/org/drools/cep/cep.drl | 9 ++ .../main/resources/org/drools/probe/probe.drl | 24 ++++ .../quarkus/drools/NativeRuntimeIT.java | 29 +--- .../kie/kogito/quarkus/drools/RuntimeIT.java | 71 ++++++++++ 13 files changed, 476 insertions(+), 60 deletions(-) create mode 100644 drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoEventFactHandle.java create mode 100644 quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeCounter.java create mode 100644 quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeEvent.java create mode 100644 quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/StockTick.java create mode 100644 quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/cep/cep.drl create mode 100644 quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/probe/probe.drl diff --git a/drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoEventFactHandle.java b/drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoEventFactHandle.java new file mode 100644 index 00000000000..87ee2ea6f9a --- /dev/null +++ b/drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoEventFactHandle.java @@ -0,0 +1,63 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.drools.core.kogito.factory; + +import org.drools.core.WorkingMemoryEntryPoint; +import org.drools.core.common.EventFactHandle; +import org.drools.core.factmodel.traits.TraitTypeEnum; +import org.drools.core.rule.EntryPointId; +import org.drools.core.ruleunit.InternalStoreCallback; +import org.kie.kogito.rules.DataHandle; + +public class KogitoEventFactHandle extends EventFactHandle implements KogitoInternalFactHandle { + public KogitoEventFactHandle() { + } + + public KogitoEventFactHandle(long id, Object object, long recency, long timestamp, long duration, WorkingMemoryEntryPoint wmEntryPoint) { + super(id, object, recency, timestamp, duration, wmEntryPoint); + } + + public KogitoEventFactHandle(long id, Object object, long recency, long timestamp, long duration, WorkingMemoryEntryPoint wmEntryPoint, boolean isTraitOrTraitable) { + super(id, object, recency, timestamp, duration, wmEntryPoint, isTraitOrTraitable); + } + + public KogitoEventFactHandle(long id, int identityHashCode, Object object, long recency, long timestamp, long duration, EntryPointId entryPointId, TraitTypeEnum traitType) { + super(id, identityHashCode, object, recency, timestamp, duration, entryPointId, traitType); + } + + private DataHandle dataHandle; + private InternalStoreCallback dataStore; + + @Override + public DataHandle getDataHandle() { + return dataHandle; + } + + @Override + public void setDataHandle(DataHandle dataHandle) { + this.dataHandle = dataHandle; + } + + @Override + public InternalStoreCallback getDataStore() { + return dataStore; + } + + @Override + public void setDataStore(InternalStoreCallback dataStore) { + this.dataStore = dataStore; + } +} diff --git a/drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoFactHandleFactory.java b/drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoFactHandleFactory.java index 86af57477ed..366c3397c2f 100644 --- a/drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoFactHandleFactory.java +++ b/drools/drools-core/src/main/java/org/drools/core/kogito/factory/KogitoFactHandleFactory.java @@ -20,17 +20,51 @@ import org.drools.core.common.InternalWorkingMemory; import org.drools.core.reteoo.ObjectTypeConf; import org.drools.core.reteoo.ReteooFactHandleFactory; +import org.drools.core.rule.TypeDeclaration; import org.drools.core.spi.FactHandleFactory; public class KogitoFactHandleFactory extends ReteooFactHandleFactory { + public KogitoFactHandleFactory() { + super(); + } + + public KogitoFactHandleFactory(long id, long counter) { + super(id, counter); + } + @Override - public InternalFactHandle newFactHandle(long id, Object object, long recency, ObjectTypeConf conf, InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint) { - return new KogitoDefaultFactHandle(id, object, recency, wmEntryPoint != null ? wmEntryPoint : workingMemory); + public InternalFactHandle newFactHandle(long id, Object object, long recency, ObjectTypeConf conf, + InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint) { + if (conf != null && conf.isEvent()) { + TypeDeclaration type = conf.getTypeDeclaration(); + long timestamp; + if (type != null && type.getTimestampExtractor() != null) { + timestamp = type.getTimestampExtractor().getLongValue(workingMemory, + object); + } else { + timestamp = workingMemory.getTimerService().getCurrentTime(); + } + long duration = 0; + if (type != null && type.getDurationExtractor() != null) { + duration = type.getDurationExtractor().getLongValue(workingMemory, + object); + } + return new KogitoEventFactHandle(id, object, recency, timestamp, duration, + wmEntryPoint != null ? wmEntryPoint : workingMemory); + } + + return new KogitoDefaultFactHandle(id, object, recency, + wmEntryPoint != null ? wmEntryPoint : workingMemory); } @Override public FactHandleFactory newInstance() { return new KogitoFactHandleFactory(); } + + @Override + public FactHandleFactory newInstance(long id, long counter) { + return new KogitoFactHandleFactory(id, counter); + } } \ No newline at end of file diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/IncrementalRuleCodegen.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/IncrementalRuleCodegen.java index 79d83b7b082..188c3f609a5 100644 --- a/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/IncrementalRuleCodegen.java +++ b/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/IncrementalRuleCodegen.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.OptionalInt; import java.util.stream.Stream; @@ -171,18 +172,15 @@ protected Collection internalGenerate() { throw new RuleCodegenError(modelBuilder.getErrors().getErrors()); } - Map modelsByUnit = new HashMap<>(); - - List generatedFiles = new ArrayList<>(generateModels(modelBuilder, modelsByUnit)); - - boolean hasRuleUnits = !ruleUnitGenerators.isEmpty(); + List generatedFiles = new ArrayList<>(generateModels(modelBuilder)); List errors = new ArrayList<>(); + boolean hasRuleUnits = !ruleUnitGenerators.isEmpty(); if (hasRuleUnits) { generateRuleUnits(errors, generatedFiles); } else if (context().hasClassAvailable("org.kie.kogito.legacy.rules.KieRuntimeBuilder")) { - generateProject(dummyReleaseId, modelsByUnit, generatedFiles); + generateProject(dummyReleaseId, modelBuilder, generatedFiles); } else if (hasRuleFiles()) { // this additional check is necessary because also properties or java files can be loaded throw new IllegalStateException("Found DRL files using legacy API, add org.kie.kogito:kogito-legacy-api dependency to enable it"); } @@ -232,13 +230,11 @@ private Resource findPropertiesResource(Resource resource) { return resources.stream().filter(r -> r.getSourcePath().equals(resource.getSourcePath() + ".properties")).findFirst().orElse(null); } - private List generateModels(ModelBuilderImpl modelBuilder, Map modelsByUnit) { + private List generateModels(ModelBuilderImpl modelBuilder) { List modelFiles = new ArrayList<>(); List legacyModelFiles = new ArrayList<>(); for (KogitoPackageSources pkgSources : modelBuilder.getPackageSources()) { - pkgSources.getModelsByUnit().forEach((unit, model) -> modelsByUnit.put(ruleUnit2KieBaseName(unit), model)); - pkgSources.collectGeneratedFiles(legacyModelFiles); org.drools.modelcompiler.builder.GeneratedFile reflectConfigSource = pkgSources.getReflectConfigSource(); @@ -272,25 +268,32 @@ private Collection convertGeneratedRuleFile(Collection modelsByUnit, List generatedFiles) { - Map> modelsByKBase = new HashMap<>(); - for (Map.Entry entry : modelsByUnit.entrySet()) { - modelsByKBase.put(entry.getKey(), Collections.singletonList(entry.getValue())); - } - - ModelSourceClass modelSourceClass = new ModelSourceClass(dummyReleaseId, kieModuleModel.getKieBaseModels(), modelsByKBase); - - generatedFiles.add(new GeneratedFile( - RULE_TYPE, - modelSourceClass.getName(), - modelSourceClass.generate())); + private void generateProject(ReleaseIdImpl dummyReleaseId, ModelBuilderImpl modelBuilder, List generatedFiles) { + ModelSourceClass modelSourceClass = new ModelSourceClass(dummyReleaseId, kieModuleModel.getKieBaseModels(), getModelByKBase(modelBuilder)); + generatedFiles.add(new GeneratedFile(RULE_TYPE, modelSourceClass.getName(), modelSourceClass.generate())); ProjectRuntimeGenerator projectRuntimeGenerator = new ProjectRuntimeGenerator(modelSourceClass.getModelMethod(), context()); + generatedFiles.add(new GeneratedFile(RULE_TYPE, projectRuntimeGenerator.getName(), projectRuntimeGenerator.generate())); + } + + private Map> getModelByKBase(ModelBuilderImpl modelBuilder) { + Map modelsByPackage = getModelsByPackage(modelBuilder); + Map> modelsByKBase = new HashMap<>(); + for (Map.Entry entry : kieModuleModel.getKieBaseModels().entrySet()) { + List kieBasePackages = entry.getValue().getPackages(); + boolean isAllPackages = kieBasePackages.isEmpty() || (kieBasePackages.size() == 1 && kieBasePackages.get(0).equals("*")); + modelsByKBase.put(entry.getKey(), + isAllPackages ? new ArrayList<>(modelsByPackage.values()) : kieBasePackages.stream().map(modelsByPackage::get).filter(Objects::nonNull).collect(toList())); + } + return modelsByKBase; + } - generatedFiles.add(new GeneratedFile( - RULE_TYPE, - projectRuntimeGenerator.getName(), - projectRuntimeGenerator.generate())); + private Map getModelsByPackage(ModelBuilderImpl modelBuilder) { + Map modelsByPackage = new HashMap<>(); + for (KogitoPackageSources pkgSources : modelBuilder.getPackageSources()) { + modelsByPackage.put(pkgSources.getPackageName(), pkgSources.getPackageName() + "." + pkgSources.getRulesFileName()); + } + return modelsByPackage; } private void generateRuleUnits(List errors, List generatedFiles) { diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/KogitoPackageSources.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/KogitoPackageSources.java index 998c4a28e96..f6da24fef49 100644 --- a/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/KogitoPackageSources.java +++ b/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/KogitoPackageSources.java @@ -28,7 +28,6 @@ import org.drools.modelcompiler.builder.PackageModelWriter; import org.drools.modelcompiler.builder.PackageSources; import org.drools.modelcompiler.builder.QueryModel; -import org.drools.modelcompiler.builder.RuleWriter; import org.kie.internal.ruleunit.RuleUnitDescription; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,18 +54,20 @@ public class KogitoPackageSources extends PackageSources { REFLECTION_PERMISSIONS + " }\n" + "]"; + private GeneratedFile reflectConfigSource; - private Map modelsByUnit = new HashMap<>(); private Collection ruleUnits; private String rulesFileName; private Map> queries; + private String pkgName; + public static KogitoPackageSources dumpSources(PackageModel pkgModel) { KogitoPackageSources sources = dumpPojos(pkgModel); PackageModelWriter packageModelWriter = new PackageModelWriter(pkgModel); - RuleWriter rules = PackageSources.writeRules(pkgModel, sources, packageModelWriter); + PackageSources.writeRules(pkgModel, sources, packageModelWriter); sources.rulesFileName = pkgModel.getRulesFileName(); sources.ruleUnits = pkgModel.getRuleUnits(); @@ -78,12 +79,12 @@ public static KogitoPackageSources dumpSources(PackageModel pkgModel) { } } - sources.modelsByUnit.putAll(rules.getModelsByUnit()); return sources; } - public static KogitoPackageSources dumpPojos(PackageModel pkgModel) { + private static KogitoPackageSources dumpPojos(PackageModel pkgModel) { KogitoPackageSources sources = new KogitoPackageSources(); + sources.pkgName = pkgModel.getName(); List pojoClasses = new ArrayList<>(); PackageModelWriter packageModelWriter = new PackageModelWriter(pkgModel); @@ -109,8 +110,8 @@ private static String reflectConfigSource(List pojoClasses) { return pojoClasses.stream().collect(Collectors.joining(JSON_DELIMITER, JSON_PREFIX, JSON_SUFFIX)); } - public Map getModelsByUnit() { - return modelsByUnit; + public String getPackageName() { + return pkgName; } public Collection getRuleUnits() { diff --git a/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/ProjectRuntimeGenerator.java b/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/ProjectRuntimeGenerator.java index 40c98bb8e61..1db14da0bf3 100644 --- a/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/ProjectRuntimeGenerator.java +++ b/kogito-codegen-modules/kogito-codegen-rules/src/main/java/org/kie/kogito/codegen/rules/ProjectRuntimeGenerator.java @@ -29,6 +29,7 @@ import com.github.javaparser.ast.body.MethodDeclaration; import com.github.javaparser.ast.expr.StringLiteralExpr; import com.github.javaparser.ast.stmt.BlockStmt; +import com.github.javaparser.ast.stmt.BreakStmt; import com.github.javaparser.ast.stmt.IfStmt; import com.github.javaparser.ast.stmt.Statement; import com.github.javaparser.ast.stmt.SwitchEntry; @@ -147,6 +148,7 @@ private void writeGetConfForSessionMethod(ClassOrInterfaceDeclaration clazz) { for (Map.Entry entry : modelMethod.getkSessionConfs().entrySet()) { StringLiteralExpr sessionName = new StringLiteralExpr(entry.getKey()); SwitchEntry switchEntry = new SwitchEntry(new NodeList<>(sessionName), SwitchEntry.Type.STATEMENT_GROUP, new NodeList<>(entry.getValue())); + switchEntry.addStatement(new BreakStmt().setValue(null)); switchStmt.getEntries().add(switchEntry); } } diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeCounter.java b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeCounter.java new file mode 100644 index 00000000000..d18c2f7171c --- /dev/null +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeCounter.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.drools; + +public class ProbeCounter { + private int total = 0; + + public void setTotal(final int total) { + this.total = total; + } + + public int getTotal() { + return total; + } + + public void addValue() { + total += 1; + synchronized (this) { + if (total == 10) { + notify(); + } + } + } +} diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeEvent.java b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeEvent.java new file mode 100644 index 00000000000..c1faf91cf64 --- /dev/null +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/ProbeEvent.java @@ -0,0 +1,55 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.drools; + +public class ProbeEvent { + + private int value = 1; + + public int getValue() { + return value; + } + + public ProbeEvent(final int value) { + this.value = value; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + final ProbeEvent that = (ProbeEvent) o; + + return value == that.value; + } + + @Override + public int hashCode() { + return value; + } + + @Override + public String toString() { + return "ProbeEvent{" + + "value=" + value + + '}'; + } +} diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/StockTick.java b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/StockTick.java new file mode 100644 index 00000000000..ba3a2050d62 --- /dev/null +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/java/org/kie/kogito/quarkus/drools/StockTick.java @@ -0,0 +1,131 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.drools; + +import java.util.Date; + +import org.kie.api.definition.type.Duration; +import org.kie.api.definition.type.Role; + +@Role(Role.Type.EVENT) +@Duration("duration") +public class StockTick { + + private String company; + private double price; + private long time; + private long duration; + + public StockTick(String company) { + this(company, 0.0); + } + + public StockTick(final String company, + final double price) { + this(company, price, System.currentTimeMillis()); + } + + public StockTick(final String company, + final double price, + final long time) { + super(); + this.company = company; + this.price = price; + this.time = time; + } + + public StockTick(final String company, + final double price, + final long time, + final long duration) { + super(); + this.company = company; + this.price = price; + this.time = time; + this.duration = duration; + } + + public String getCompany() { + return company; + } + + public void setCompany(final String company) { + this.company = company; + } + + public double getPrice() { + return price; + } + + public void setPrice(final double price) { + this.price = price; + } + + public long getTime() { + return time; + } + + public void setTime(final long time) { + this.time = time; + } + + public long getDuration() { + return duration; + } + + public void setDuration(final long duration) { + this.duration = duration; + } + + public Date getDateTimestamp() { + return new Date(this.time); + } + + public String toString() { + return "StockTick( " + this.company + " : " + this.price + " )"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((company == null) ? 0 : company.hashCode()); + result = prime * result + (int) (time ^ (time >>> 32)); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final StockTick other = (StockTick) obj; + if (company == null) { + if (other.company != null) { + return false; + } + } else if (!company.equals(other.company)) { + return false; + } + return time == other.time; + } +} diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/META-INF/kmodule.xml b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/META-INF/kmodule.xml index ed99748912e..ae1b4cb7cd1 100644 --- a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/META-INF/kmodule.xml +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/META-INF/kmodule.xml @@ -3,4 +3,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/cep/cep.drl b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/cep/cep.drl new file mode 100644 index 00000000000..e7db9a4ce1e --- /dev/null +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/cep/cep.drl @@ -0,0 +1,9 @@ +package org.drools.cep + +import org.kie.kogito.quarkus.drools.StockTick + +rule R when + $a : StockTick( company == "DROO" ) + $b : StockTick( company == "ACME", this after[5s,8s] $a ) +then +end \ No newline at end of file diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/probe/probe.drl b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/probe/probe.drl new file mode 100644 index 00000000000..7ab8069b255 --- /dev/null +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/main/resources/org/drools/probe/probe.drl @@ -0,0 +1,24 @@ +package org.drools.probe + +import org.kie.kogito.quarkus.drools.ProbeEvent; +import org.kie.kogito.quarkus.drools.ProbeCounter; + +declare ProbeCounter + @role (event) +end +declare ProbeEvent + @role (event) +end + +rule "Probe rule" when + $pc : ProbeCounter() + $pe : ProbeEvent( this not before $pc ) +then + $pc.addValue(); +end + +rule "Halt rule" when + ProbeCounter (total == 10) +then + drools.halt(); +end \ No newline at end of file diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/NativeRuntimeIT.java b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/NativeRuntimeIT.java index b0142c0e120..53ecd73ce26 100644 --- a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/NativeRuntimeIT.java +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/NativeRuntimeIT.java @@ -15,31 +15,8 @@ */ package org.kie.kogito.quarkus.drools; -import javax.inject.Inject; +import io.quarkus.test.junit.NativeImageTest; -import org.junit.jupiter.api.Test; -import org.kie.api.runtime.KieSession; -import org.kie.kogito.legacy.rules.KieRuntimeBuilder; - -import io.quarkus.test.junit.QuarkusTest; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -@QuarkusTest -public class NativeRuntimeIT { - - @Inject - KieRuntimeBuilder runtimeBuilder; - - @Test - public void testRuleEvaluation() { - KieSession ksession = runtimeBuilder.newKieSession(); - - Result result = new Result(); - ksession.insert(result); - ksession.insert(new Person("Mark", 17)); - ksession.fireAllRules(); - - assertEquals("Mark can NOT drink", result.toString()); - } +@NativeImageTest +public class NativeRuntimeIT extends RuntimeIT { } diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/RuntimeIT.java b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/RuntimeIT.java index 784db74e413..6a3eebbfa09 100644 --- a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/RuntimeIT.java +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/src/test/java/org/kie/kogito/quarkus/drools/RuntimeIT.java @@ -15,15 +15,24 @@ */ package org.kie.kogito.quarkus.drools; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + import javax.inject.Inject; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; +import org.kie.api.KieBase; +import org.kie.api.definition.KiePackage; import org.kie.api.runtime.KieSession; +import org.kie.api.time.SessionPseudoClock; import org.kie.kogito.legacy.rules.KieRuntimeBuilder; import io.quarkus.test.junit.QuarkusTest; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; @QuarkusTest public class RuntimeIT { @@ -33,8 +42,14 @@ public class RuntimeIT { @Test public void testRuleEvaluation() { + // canDrinkKS is the default session KieSession ksession = runtimeBuilder.newKieSession(); + List pkgNames = ksession.getKieBase().getKiePackages().stream().map(KiePackage::getName).collect(Collectors.toList()); + assertEquals(2, pkgNames.size()); + assertTrue(pkgNames.contains("org.kie.kogito.quarkus.drools")); + assertTrue(pkgNames.contains("org.drools.simple.candrink")); + Result result = new Result(); ksession.insert(result); ksession.insert(new Person("Mark", 17)); @@ -42,4 +57,60 @@ public void testRuleEvaluation() { assertEquals("Mark can NOT drink", result.toString()); } + + @Test + public void testCepEvaluation() { + KieSession ksession = runtimeBuilder.newKieSession("cepKS"); + + SessionPseudoClock clock = ksession.getSessionClock(); + + ksession.insert(new StockTick("DROO")); + clock.advanceTime(6, TimeUnit.SECONDS); + ksession.insert(new StockTick("ACME")); + + assertEquals(1, ksession.fireAllRules()); + + clock.advanceTime(4, TimeUnit.SECONDS); + ksession.insert(new StockTick("ACME")); + + assertEquals(0, ksession.fireAllRules()); + } + + @Test + @Timeout(value = 10, unit = TimeUnit.SECONDS) + public void testFireUntiHalt() { + KieSession ksession = runtimeBuilder.newKieSession("probeKS"); + + new Thread(ksession::fireUntilHalt).start(); + final ProbeCounter pc = new ProbeCounter(); + + ksession.insert(pc); + for (int i = 0; i < 10; i++) { + ksession.insert(new ProbeEvent(i)); + } + + synchronized (pc) { + if (pc.getTotal() < 10) { + try { + pc.wait(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + } + + assertEquals(10, pc.getTotal()); + } + + @Test + public void testAllPkgsKBase() { + KieBase kBase = runtimeBuilder.getKieBase("allKB"); + + List pkgNames = kBase.getKiePackages().stream().map(KiePackage::getName).collect(Collectors.toList()); + assertEquals(4, pkgNames.size()); + assertTrue(pkgNames.contains("org.kie.kogito.quarkus.drools")); + assertTrue(pkgNames.contains("org.drools.simple.candrink")); + assertTrue(pkgNames.contains("org.drools.cep")); + assertTrue(pkgNames.contains("org.drools.probe")); + } } From 1ecd034cd1292a1b8d7ce95ec88db29b845ff5d3 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Date: Mon, 20 Sep 2021 11:17:31 -0300 Subject: [PATCH 2/8] [KOGITO-5719] Transform Kogito Add-Ons to Quarkus Extensions (#1554) --- addons/README.md | 5 - addons/deprecated/README.md | 186 ++++------- .../DeprecatedQuarkusEventsSmallrye.java | 2 +- addons/deprecated/pom.xml | 6 +- .../integration-tests-kogito-plugin/pom.xml | 5 + kogito-bom/pom.xml | 316 +++++++++++++++++- quarkus/addons/README.md | 6 +- quarkus/addons/common/deployment/pom.xml | 28 ++ .../AnyEngineKogitoAddOnProcessor.java | 57 ++++ .../common/deployment/KogitoCapability.java | 56 ++++ ...RequireCapabilityKogitoAddOnProcessor.java | 90 +++++ .../AnyEngineAddonProcessorImpl.java | 20 ++ .../deployment/KogitoAddOnProcessorTest.java | 64 ++++ .../RequireEngineAddonProcessor.java | 27 ++ quarkus/addons/common/pom.xml | 21 ++ .../events/decisions/deployment/pom.xml | 47 +++ .../KogitoAddOnEventDecisionProcessor.java | 37 ++ quarkus/addons/events/decisions/pom.xml | 19 +- .../addons/events/decisions/runtime/pom.xml | 66 ++++ .../QuarkusEventDrivenDecisionController.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 11 + .../addons/events/mongodb/deployment/pom.xml | 42 +++ .../KogitoAddOnEventMongoDBProcessor.java | 37 ++ quarkus/addons/events/mongodb/pom.xml | 72 +--- quarkus/addons/events/mongodb/runtime/pom.xml | 100 ++++++ .../mongodb/QuarkusMongoDBEventPublisher.java | 0 .../resources/META-INF/quarkus-extension.yaml | 12 + .../events/mongodb/MockMongoClient.java | 0 .../mongodb/MockTransactionManager.java | 0 .../QuarkusMongoDBEventPublisherTest.java | 0 .../src/test/resources/application.properties | 0 quarkus/addons/events/pom.xml | 2 +- .../events/{smallrye => process}/.gitignore | 0 .../addons/events/process/deployment/pom.xml | 42 +++ .../KogitoAddOnEventProcessProcessor.java | 37 ++ quarkus/addons/events/process/pom.xml | 21 ++ .../{smallrye => process/runtime}/pom.xml | 41 ++- .../ReactiveMessagingEventPublisher.java | 2 +- .../src/main/resources/META-INF/beans.xml | 0 .../resources/META-INF/quarkus-extension.yaml | 12 + .../addons/explainability/deployment/pom.xml | 46 +++ .../KogitoAddOnExplainabilityProcessor.java | 37 ++ quarkus/addons/explainability/pom.xml | 102 +----- quarkus/addons/explainability/runtime/pom.xml | 126 +++++++ .../QuarkusExplainableResource.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../explainability/ApplicationMock.java | 0 .../kie/kogito/explainability/Constants.java | 0 .../QuarkusExplainableResourceIT.java | 0 .../src/test/resources/Traffic Violation.dmn | 0 quarkus/addons/jobs/deployment/pom.xml | 42 +++ .../KogitoAddOnJobsManagementProcessor.java | 37 ++ quarkus/addons/jobs/pom.xml | 73 +--- quarkus/addons/jobs/runtime/pom.xml | 110 ++++++ .../quarkus/CallbackJobsServiceResource.java | 0 .../management/quarkus/VertxJobsService.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 12 + .../quarkus/VertxJobsServiceTest.java | 0 .../knative/eventing/deployment/pom.xml | 47 +++ .../KogitoAddOnKnativeEventingProcessor.java | 32 ++ quarkus/addons/knative/eventing/pom.xml | 36 +- .../addons/knative/eventing/runtime/pom.xml | 66 ++++ .../eventing/KnativeEventingConfigSource.java | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 18 + ...lipse.microprofile.config.spi.ConfigSource | 0 quarkus/addons/knative/pom.xml | 4 +- quarkus/addons/mail/deployment/pom.xml | 48 +++ .../deployment/KogitoAddOnMailProcessor.java | 37 ++ quarkus/addons/mail/pom.xml | 62 +--- quarkus/addons/mail/runtime/pom.xml | 95 ++++++ .../mail/DeadlineEventDeserializer.java | 0 .../kie/kogito/mail/QuarkusMailSender.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 14 + .../kogito/mail/QuarkusMailSenderTest.java | 0 quarkus/addons/messaging/common/pom.xml | 35 +- quarkus/addons/messaging/deployment/pom.xml | 42 +++ .../KogitoAddOnMessagingProcessor.java | 37 ++ .../messaging/integration-tests/pom.xml | 14 +- quarkus/addons/messaging/pom.xml | 6 +- .../{implementation => runtime}/pom.xml | 33 +- .../messaging/QuarkusCloudEventEmitter.java | 0 .../messaging/QuarkusCloudEventReceiver.java | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 13 + quarkus/addons/monitoring/core/pom.xml | 2 +- .../monitoring/elastic/deployment/pom.xml | 46 +++ ...KogitoAddOnMonitoringElasticProcessor.java | 32 ++ quarkus/addons/monitoring/elastic/pom.xml | 37 +- .../addons/monitoring/elastic/runtime/pom.xml | 66 ++++ .../QuarkusElasticRegistryProvider.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 10 + quarkus/addons/monitoring/pom.xml | 2 +- .../monitoring/prometheus/deployment/pom.xml | 42 +++ ...itoAddOnMonitoringPrometheusProcessor.java | 32 ++ quarkus/addons/monitoring/prometheus/pom.xml | 46 +-- .../monitoring/prometheus/runtime/pom.xml | 78 +++++ .../quarkus/rest/QuarkusMetricsResource.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 10 + .../rest/QuarkusMetricsResourceTest.java | 0 .../persistence/filesystem/deployment/pom.xml | 42 +++ ...toAddOnPersistenceFileSystemProcessor.java | 37 ++ quarkus/addons/persistence/filesystem/pom.xml | 19 ++ .../persistence/filesystem/runtime/pom.xml | 80 +++++ .../resources/META-INF/quarkus-extension.yaml | 11 + .../persistence/infinispan/deployment/pom.xml | 42 +++ ...toAddOnPersistenceInfinispanProcessor.java | 37 ++ .../health}/pom.xml | 7 +- .../health/InfinispanHealthCheck.java | 0 .../health/InfinispanHealthCheckIT.java | 0 quarkus/addons/persistence/infinispan/pom.xml | 20 ++ .../persistence/infinispan/runtime/pom.xml | 80 +++++ .../resources/META-INF/quarkus-extension.yaml | 11 + .../persistence/jdbc/deployment/pom.xml | 42 +++ .../KogitoAddOnPersistenceJDBCProcessor.java | 37 ++ quarkus/addons/persistence/jdbc/pom.xml | 19 ++ .../addons/persistence/jdbc/runtime/pom.xml | 80 +++++ .../resources/META-INF/quarkus-extension.yaml | 11 + .../persistence/kafka/deployment/pom.xml | 47 +++ .../KogitoAddOnPersistenceKafkaProcessor.java | 37 ++ quarkus/addons/persistence/kafka/pom.xml | 130 +------ .../addons/persistence/kafka/runtime/pom.xml | 156 +++++++++ .../KogitoProcessInstancesFactory.java | 0 .../kafka/KafkaPersistenceUtils.java | 0 .../kafka/KafkaProcessInstances.java | 0 .../kafka/KafkaStreamsStateListener.java | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 11 + .../KogitoProcessInstancesFactoryTest.java | 0 .../kafka/KafkaPersistenceUtilsTest.java | 0 .../kafka/KafkaProcessInstancesIT.java | 0 .../kafka/KafkaProcessInstancesTest.java | 0 .../kafka/KafkaStreamsStateListenerTest.java | 0 .../resources/BPMN2-UserTask-Script.bpmn2 | 0 .../src/test/resources/BPMN2-UserTask.bpmn2 | 0 .../persistence/mongodb/deployment/pom.xml | 46 +++ ...ogitoAddOnPersistenceMongoDBProcessor.java | 37 ++ quarkus/addons/persistence/mongodb/pom.xml | 19 ++ .../persistence/mongodb/runtime/pom.xml | 84 +++++ .../resources/META-INF/quarkus-extension.yaml | 11 + quarkus/addons/persistence/pom.xml | 12 +- .../persistence/postgresql/deployment/pom.xml | 42 +++ ...toAddOnPersistencePostgreSQLProcessor.java | 37 ++ quarkus/addons/persistence/postgresql/pom.xml | 19 ++ .../persistence/postgresql/runtime/pom.xml | 80 +++++ .../resources/META-INF/quarkus-extension.yaml | 11 + quarkus/addons/pom.xml | 54 ++- .../process-management/deployment/pom.xml | 42 +++ ...KogitoAddOnProcessManagementProcessor.java | 37 ++ quarkus/addons/process-management/pom.xml | 76 +---- .../addons/process-management/runtime/pom.xml | 104 ++++++ .../ProcessInstanceManagementResource.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 10 + ...ProcessInstanceManagementResourceTest.java | 0 .../src/test/resources/logback-test.xml | 0 quarkus/addons/process-svg/deployment/pom.xml | 46 +++ .../KogitoAddOnProcessSVGProcessor.java | 37 ++ quarkus/addons/process-svg/pom.xml | 58 +--- quarkus/addons/process-svg/runtime/pom.xml | 92 +++++ .../svg/dataindex/QuarkusDataIndexClient.java | 0 .../kogito/svg/rest/ProcessSvgResource.java | 0 .../svg/service/QuarkusProcessSvgService.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 10 + .../dataindex/QuarkusDataIndexClientTest.java | 0 .../svg/rest/ProcessSvgResourceTest.java | 0 .../service/QuarkusProcessSvgServiceTest.java | 0 .../resources/META-INF/processSVG/travels.svg | 0 .../src/test/resources/travels-expected.svg | 0 .../addons/task-management/deployment/pom.xml | 42 +++ .../KogitoAddOnTaskManagementProcessor.java | 37 ++ quarkus/addons/task-management/pom.xml | 96 +----- .../addons/task-management/runtime/pom.xml | 119 +++++++ .../management/TaskManagementResource.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 10 + .../task-notification/deployment/pom.xml | 42 +++ .../KogitoAddOnTaskNotificationProcessor.java | 37 ++ quarkus/addons/task-notification/pom.xml | 64 +--- .../addons/task-notification/runtime/pom.xml | 97 ++++++ .../quarkus/NotificationEventPublisher.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../resources/META-INF/quarkus-extension.yaml | 12 + .../tracing-decision/deployment/pom.xml | 55 +++ .../KogitoAddOnTracingDecisionProcessor.java | 37 ++ quarkus/addons/tracing-decision/pom.xml | 103 +----- .../addons/tracing-decision/runtime/pom.xml | 131 ++++++++ .../QuarkusDecisionTracingCollector.java | 0 .../QuarkusDecisionTracingListener.java | 0 .../decision/QuarkusModelEventEmitter.java | 0 .../QuarkusStartupModelPublisher.java | 0 .../decision/QuarkusTraceEventEmitter.java | 0 .../src/main/resources/META-INF/beans.xml | 0 .../src/main/resources/META-INF/kogito.addon | 0 .../META-INF/microprofile-config.properties | 0 .../resources/META-INF/quarkus-extension.yaml | 11 + .../DecisionModelResourcesProviderMock.java | 0 .../decision/QuarkusDecisionTracingTest.java | 0 .../QuarkusModelEventEmitterTest.java | 0 .../src/test/resources/Traffic Violation.dmn | 0 .../pom.xml | 5 + springboot/addons/README.md | 5 + .../META-INF/archetype-post-generate.groovy | 4 +- ...dDependencyToPomWithTextReplaceTest.groovy | 2 +- .../AddDependencyToPomWithXmlTest.groovy | 4 +- 221 files changed, 4937 insertions(+), 1012 deletions(-) rename addons/deprecated/kogito-addons-quarkus-events-smallrye/src/main/java/org/kie/kogito/events/{rm => process}/deprecated/DeprecatedQuarkusEventsSmallrye.java (96%) create mode 100644 quarkus/addons/common/deployment/pom.xml create mode 100644 quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineKogitoAddOnProcessor.java create mode 100644 quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoCapability.java create mode 100644 quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/RequireCapabilityKogitoAddOnProcessor.java create mode 100644 quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineAddonProcessorImpl.java create mode 100644 quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoAddOnProcessorTest.java create mode 100644 quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/RequireEngineAddonProcessor.java create mode 100644 quarkus/addons/common/pom.xml create mode 100644 quarkus/addons/events/decisions/deployment/pom.xml create mode 100644 quarkus/addons/events/decisions/deployment/src/main/java/org/kie/kogito/eventdriven/decision/KogitoAddOnEventDecisionProcessor.java create mode 100644 quarkus/addons/events/decisions/runtime/pom.xml rename quarkus/addons/events/decisions/{ => runtime}/src/main/java/org/kie/kogito/eventdriven/decision/QuarkusEventDrivenDecisionController.java (100%) rename quarkus/addons/events/decisions/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/events/decisions/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/events/mongodb/deployment/pom.xml create mode 100644 quarkus/addons/events/mongodb/deployment/src/main/java/org/kie/kogito/events/mongodb/deployment/KogitoAddOnEventMongoDBProcessor.java create mode 100644 quarkus/addons/events/mongodb/runtime/pom.xml rename quarkus/addons/events/mongodb/{ => runtime}/src/main/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisher.java (100%) create mode 100644 quarkus/addons/events/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/events/mongodb/{ => runtime}/src/test/java/org/kie/kogito/events/mongodb/MockMongoClient.java (100%) rename quarkus/addons/events/mongodb/{ => runtime}/src/test/java/org/kie/kogito/events/mongodb/MockTransactionManager.java (100%) rename quarkus/addons/events/mongodb/{ => runtime}/src/test/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisherTest.java (100%) rename quarkus/addons/events/mongodb/{ => runtime}/src/test/resources/application.properties (100%) rename quarkus/addons/events/{smallrye => process}/.gitignore (100%) create mode 100644 quarkus/addons/events/process/deployment/pom.xml create mode 100644 quarkus/addons/events/process/deployment/src/main/java/org/kie/kogito/events/process/deployment/KogitoAddOnEventProcessProcessor.java create mode 100644 quarkus/addons/events/process/pom.xml rename quarkus/addons/events/{smallrye => process/runtime}/pom.xml (55%) rename quarkus/addons/events/{smallrye/src/main/java/org/kie/kogito/events/rm => process/runtime/src/main/java/org/kie/kogito/events/process}/ReactiveMessagingEventPublisher.java (99%) rename quarkus/addons/events/{smallrye => process/runtime}/src/main/resources/META-INF/beans.xml (100%) create mode 100644 quarkus/addons/events/process/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/explainability/deployment/pom.xml create mode 100644 quarkus/addons/explainability/deployment/src/main/java/org/kie/kogito/explainability/deployment/KogitoAddOnExplainabilityProcessor.java create mode 100644 quarkus/addons/explainability/runtime/pom.xml rename quarkus/addons/explainability/{ => runtime}/src/main/java/org/kie/kogito/explainability/QuarkusExplainableResource.java (100%) rename quarkus/addons/explainability/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/explainability/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) rename quarkus/addons/explainability/{ => runtime}/src/test/java/org/kie/kogito/explainability/ApplicationMock.java (100%) rename quarkus/addons/explainability/{ => runtime}/src/test/java/org/kie/kogito/explainability/Constants.java (100%) rename quarkus/addons/explainability/{ => runtime}/src/test/java/org/kie/kogito/explainability/QuarkusExplainableResourceIT.java (100%) rename quarkus/addons/explainability/{ => runtime}/src/test/resources/Traffic Violation.dmn (100%) create mode 100644 quarkus/addons/jobs/deployment/pom.xml create mode 100644 quarkus/addons/jobs/deployment/src/main/java/org/kie/kogito/jobs/management/quarkus/deployment/KogitoAddOnJobsManagementProcessor.java create mode 100644 quarkus/addons/jobs/runtime/pom.xml rename quarkus/addons/jobs/{ => runtime}/src/main/java/org/kie/kogito/jobs/management/quarkus/CallbackJobsServiceResource.java (100%) rename quarkus/addons/jobs/{ => runtime}/src/main/java/org/kie/kogito/jobs/management/quarkus/VertxJobsService.java (100%) rename quarkus/addons/jobs/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/jobs/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/jobs/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/jobs/{ => runtime}/src/test/java/org/kie/kogito/jobs/management/quarkus/VertxJobsServiceTest.java (100%) create mode 100644 quarkus/addons/knative/eventing/deployment/pom.xml create mode 100644 quarkus/addons/knative/eventing/deployment/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/deployment/KogitoAddOnKnativeEventingProcessor.java create mode 100644 quarkus/addons/knative/eventing/runtime/pom.xml rename quarkus/addons/knative/eventing/{ => runtime}/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/KnativeEventingConfigSource.java (100%) rename quarkus/addons/knative/eventing/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/knative/eventing/{ => runtime}/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigSource (100%) create mode 100644 quarkus/addons/mail/deployment/pom.xml create mode 100644 quarkus/addons/mail/deployment/src/main/java/org/kie/kogito/mail/deployment/KogitoAddOnMailProcessor.java create mode 100644 quarkus/addons/mail/runtime/pom.xml rename quarkus/addons/mail/{ => runtime}/src/main/java/org/kie/kogito/mail/DeadlineEventDeserializer.java (100%) rename quarkus/addons/mail/{ => runtime}/src/main/java/org/kie/kogito/mail/QuarkusMailSender.java (100%) rename quarkus/addons/mail/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/mail/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/mail/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/mail/{ => runtime}/src/test/java/org/kie/kogito/mail/QuarkusMailSenderTest.java (100%) create mode 100644 quarkus/addons/messaging/deployment/pom.xml create mode 100644 quarkus/addons/messaging/deployment/src/main/java/org/kie/kogito/addon/cloudevents/quarkus/deployment/KogitoAddOnMessagingProcessor.java rename quarkus/addons/messaging/{implementation => runtime}/pom.xml (53%) rename quarkus/addons/messaging/{implementation => runtime}/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventEmitter.java (100%) rename quarkus/addons/messaging/{implementation => runtime}/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventReceiver.java (100%) rename quarkus/addons/messaging/{implementation => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/monitoring/elastic/deployment/pom.xml create mode 100644 quarkus/addons/monitoring/elastic/deployment/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/deployment/KogitoAddOnMonitoringElasticProcessor.java create mode 100644 quarkus/addons/monitoring/elastic/runtime/pom.xml rename quarkus/addons/monitoring/elastic/{ => runtime}/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/QuarkusElasticRegistryProvider.java (100%) rename quarkus/addons/monitoring/elastic/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/monitoring/elastic/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/monitoring/prometheus/deployment/pom.xml create mode 100644 quarkus/addons/monitoring/prometheus/deployment/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/deployment/KogitoAddOnMonitoringPrometheusProcessor.java create mode 100644 quarkus/addons/monitoring/prometheus/runtime/pom.xml rename quarkus/addons/monitoring/prometheus/{ => runtime}/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResource.java (100%) rename quarkus/addons/monitoring/prometheus/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/monitoring/prometheus/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/monitoring/prometheus/{ => runtime}/src/test/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResourceTest.java (100%) create mode 100644 quarkus/addons/persistence/filesystem/deployment/pom.xml create mode 100644 quarkus/addons/persistence/filesystem/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/filesystem/deployment/KogitoAddOnPersistenceFileSystemProcessor.java create mode 100644 quarkus/addons/persistence/filesystem/pom.xml create mode 100644 quarkus/addons/persistence/filesystem/runtime/pom.xml create mode 100644 quarkus/addons/persistence/filesystem/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/persistence/infinispan/deployment/pom.xml create mode 100644 quarkus/addons/persistence/infinispan/deployment/src/main/java/org/kie/kogito/infinispan/quarkus/deployment/KogitoAddOnPersistenceInfinispanProcessor.java rename quarkus/addons/persistence/{infinispan-health => infinispan/health}/pom.xml (89%) rename quarkus/addons/persistence/{infinispan-health => infinispan/health}/src/main/java/org/kie/kogito/infinispan/health/InfinispanHealthCheck.java (100%) rename quarkus/addons/persistence/{infinispan-health => infinispan/health}/src/test/java/org/kie/kogito/infinispan/health/InfinispanHealthCheckIT.java (100%) create mode 100644 quarkus/addons/persistence/infinispan/pom.xml create mode 100644 quarkus/addons/persistence/infinispan/runtime/pom.xml create mode 100644 quarkus/addons/persistence/infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/persistence/jdbc/deployment/pom.xml create mode 100644 quarkus/addons/persistence/jdbc/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/jdbc/deployment/KogitoAddOnPersistenceJDBCProcessor.java create mode 100644 quarkus/addons/persistence/jdbc/pom.xml create mode 100644 quarkus/addons/persistence/jdbc/runtime/pom.xml create mode 100644 quarkus/addons/persistence/jdbc/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/persistence/kafka/deployment/pom.xml create mode 100644 quarkus/addons/persistence/kafka/deployment/src/main/java/org/kie/kogito/persistence/kafka/quarkus/deployment/KogitoAddOnPersistenceKafkaProcessor.java create mode 100644 quarkus/addons/persistence/kafka/runtime/pom.xml rename quarkus/addons/persistence/kafka/{ => runtime}/src/main/java/org/kie/kogito/persistence/KogitoProcessInstancesFactory.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/main/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtils.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/main/java/org/kie/kogito/persistence/kafka/KafkaProcessInstances.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/main/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListener.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/persistence/kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/persistence/kafka/{ => runtime}/src/test/java/org/kie/kogito/persistence/KogitoProcessInstancesFactoryTest.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/test/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtilsTest.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesTest.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/test/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListenerTest.java (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/test/resources/BPMN2-UserTask-Script.bpmn2 (100%) rename quarkus/addons/persistence/kafka/{ => runtime}/src/test/resources/BPMN2-UserTask.bpmn2 (100%) create mode 100644 quarkus/addons/persistence/mongodb/deployment/pom.xml create mode 100644 quarkus/addons/persistence/mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/mongodb/deployment/KogitoAddOnPersistenceMongoDBProcessor.java create mode 100644 quarkus/addons/persistence/mongodb/pom.xml create mode 100644 quarkus/addons/persistence/mongodb/runtime/pom.xml create mode 100644 quarkus/addons/persistence/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/persistence/postgresql/deployment/pom.xml create mode 100644 quarkus/addons/persistence/postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/postgresql/deployment/KogitoAddOnPersistencePostgreSQLProcessor.java create mode 100644 quarkus/addons/persistence/postgresql/pom.xml create mode 100644 quarkus/addons/persistence/postgresql/runtime/pom.xml create mode 100644 quarkus/addons/persistence/postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/process-management/deployment/pom.xml create mode 100644 quarkus/addons/process-management/deployment/src/main/java/org/kie/kogito/process/management/deployment/KogitoAddOnProcessManagementProcessor.java create mode 100644 quarkus/addons/process-management/runtime/pom.xml rename quarkus/addons/process-management/{ => runtime}/src/main/java/org/kie/kogito/process/management/ProcessInstanceManagementResource.java (100%) rename quarkus/addons/process-management/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/process-management/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/process-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/process-management/{ => runtime}/src/test/java/org/kie/kogito/process/management/ProcessInstanceManagementResourceTest.java (100%) rename quarkus/addons/process-management/{ => runtime}/src/test/resources/logback-test.xml (100%) create mode 100644 quarkus/addons/process-svg/deployment/pom.xml create mode 100644 quarkus/addons/process-svg/deployment/src/main/java/org/kie/kogito/svg/deployment/KogitoAddOnProcessSVGProcessor.java create mode 100644 quarkus/addons/process-svg/runtime/pom.xml rename quarkus/addons/process-svg/{ => runtime}/src/main/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClient.java (100%) rename quarkus/addons/process-svg/{ => runtime}/src/main/java/org/kie/kogito/svg/rest/ProcessSvgResource.java (100%) rename quarkus/addons/process-svg/{ => runtime}/src/main/java/org/kie/kogito/svg/service/QuarkusProcessSvgService.java (100%) rename quarkus/addons/process-svg/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/process-svg/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/process-svg/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/process-svg/{ => runtime}/src/test/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClientTest.java (100%) rename quarkus/addons/process-svg/{ => runtime}/src/test/java/org/kie/kogito/svg/rest/ProcessSvgResourceTest.java (100%) rename quarkus/addons/process-svg/{ => runtime}/src/test/java/org/kie/kogito/svg/service/QuarkusProcessSvgServiceTest.java (100%) rename quarkus/addons/process-svg/{ => runtime}/src/test/resources/META-INF/processSVG/travels.svg (100%) rename quarkus/addons/process-svg/{ => runtime}/src/test/resources/travels-expected.svg (100%) create mode 100644 quarkus/addons/task-management/deployment/pom.xml create mode 100644 quarkus/addons/task-management/deployment/src/main/java/org/kie/kogito/task/management/deployment/KogitoAddOnTaskManagementProcessor.java create mode 100644 quarkus/addons/task-management/runtime/pom.xml rename quarkus/addons/task-management/{ => runtime}/src/main/java/org/kie/kogito/task/management/TaskManagementResource.java (100%) rename quarkus/addons/task-management/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/task-management/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/task-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/task-notification/deployment/pom.xml create mode 100644 quarkus/addons/task-notification/deployment/src/main/java/org/kie/kogito/task/notification/quarkus/deployment/KogitoAddOnTaskNotificationProcessor.java create mode 100644 quarkus/addons/task-notification/runtime/pom.xml rename quarkus/addons/task-notification/{ => runtime}/src/main/java/org/kie/kogito/task/notification/quarkus/NotificationEventPublisher.java (100%) rename quarkus/addons/task-notification/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/task-notification/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) create mode 100644 quarkus/addons/task-notification/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 quarkus/addons/tracing-decision/deployment/pom.xml create mode 100644 quarkus/addons/tracing-decision/deployment/src/main/java/org/kie/kogito/tracing/decision/quarkus/deployment/KogitoAddOnTracingDecisionProcessor.java create mode 100644 quarkus/addons/tracing-decision/runtime/pom.xml rename quarkus/addons/tracing-decision/{ => runtime}/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingCollector.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingListener.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/main/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitter.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/main/java/org/kie/kogito/tracing/decision/QuarkusStartupModelPublisher.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/main/java/org/kie/kogito/tracing/decision/QuarkusTraceEventEmitter.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/main/resources/META-INF/beans.xml (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/main/resources/META-INF/kogito.addon (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/main/resources/META-INF/microprofile-config.properties (100%) create mode 100644 quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/quarkus-extension.yaml rename quarkus/addons/tracing-decision/{ => runtime}/src/test/java/org/kie/kogito/tracing/decision/DecisionModelResourcesProviderMock.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/test/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingTest.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/test/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitterTest.java (100%) rename quarkus/addons/tracing-decision/{ => runtime}/src/test/resources/Traffic Violation.dmn (100%) diff --git a/addons/README.md b/addons/README.md index f8e5b5ae7ee..08e1793f5f8 100644 --- a/addons/README.md +++ b/addons/README.md @@ -9,11 +9,6 @@ The following table lists all the add-ons, independent of runtime implementation | Add-On Description | Artifact ID | Since | |------------------------|--------------------------------------|---------------------| -| Persistence FileSystem | kogito-addons-persistence-filesystem | 0.10.0 | -| Persistence Infinispan | kogito-addons-persistence-infinispan | 0.3.0 | -| Persistence JDBC | kogito-addons-persistence-jdbc | 1.8.0 | -| Persistence MongoDB | kogito-addons-persistence-mongodb | 0.15.0 | -| Persistence Postgresql | kogito-addons-persistence-postgresql | 1.6.0 | | Human Task Predictions | kogito-addons-human-task-prediction-api | 0.7.0 | ### Quarkus Implementation diff --git a/addons/deprecated/README.md b/addons/deprecated/README.md index 61cea530d7c..f41b4b7517f 100644 --- a/addons/deprecated/README.md +++ b/addons/deprecated/README.md @@ -5,129 +5,83 @@ them in your project. ## List of Deprecated Add-ons -### Version 1.6.x - -The add-on `knative-eventing-addon` has been deprecated, please remove it from your dependencies and use these instead: - -```xml - - - - org.kie.kogito - kogito-addons-quarkus-cloudevents - - - io.quarkus - quarkus-reactive-messaging-http - - -``` - -Please refer to -the [official documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-knative-eventing_kogito-developing-process-services) -for a detailed example of how to configure your project. - -### Version 1.8.x - -The artifact IDs for the Kogito Add-ons have changed since version 1.8.x. Please refer to the table below to the new -add-on names to update your project `pom.xml` dependencies section. - -Classes and namespaces remains the same, you won't need to make any change in your code base. - #### Quarkus Add-ons -| Add-On Description | Old Artifact ID | New Artifact ID | -|---------------------|-----------------|-----------------| -| Cloud Events | kogito-cloudevents-quarkus-addon | kogito-addons-quarkus-cloudevents | -| Cloud Events Common | kogito-cloudevents-quarkus-common-addon | kogito-addons-quarkus-cloudevents-common | -| Cloud Events Multi | kogito-cloudevents-quarkus-multi-addon | kogito-addons-quarkus-cloudevents-multi | -| Events Decisions | kogito-event-driven-decisions-quarkus-addon | kogito-addons-quarkus-events-decisions | -| Events Smallrye | kogito-events-reactive-messaging-addon | kogito-addons-quarkus-events-smallrye | -| Explainability | explainability-quarkus-addon | kogito-addons-quarkus-explainability | -| Jobs Management | jobs-management-quarkus-addon | kogito-addons-quarkus-jobs-management | -| Mail | mail-quarkus-addon | kogito-addons-quarkus-mail | -| Monitoring Core | monitoring-core-quarkus-addon | kogito-addons-quarkus-monitoring-core | -| Monitoring Elastic | monitoring-elastic-quarkus-addon | kogito-addons-quarkus-monitoring-elastic | -| Monitoring Prometheus | monitoring-prometheus-quarkus-addon | kogito-addons-quarkus-monitoring-prometheus | -| Persistence ISPN Health | infinispan-quarkus-health-addon | kogito-addons-quarkus-persistence-infinispan-health | -| Persistence Kafka | kafka-persistence-addon | kogito-addons-quarkus-persistence-kafka | -| Process Management | process-management-addon | kogito-addons-quarkus-process-management | -| Process SVG | process-svg-quarkus-addon | kogito-addons-quarkus-process-svg | -| REST Exception Handler | kogito-rest-exception-handler-quarkus | kogito-addons-quarkus-rest-exception-handler | -| Task Management | task-management-quarkus-addon | kogito-addons-quarkus-task-management | -| Task Notification | task-notification-quarkus-addon | kogito-addons-quarkus-task-notification | -| Tracing Decision | tracing-decision-quarkus-addon | kogito-addons-quarkus-tracing-decision | +| Add-On Description | Deprecated Artifact ID | New Artifact ID | Since | +|---------------------|------------------------|-----------------|-------| +| Cloud Events | kogito-cloudevents-quarkus-addon | kogito-addons-quarkus-messaging | 1.8.0 | +| Cloud Events Common | kogito-cloudevents-quarkus-common-addon | kogito-addons-quarkus-messaging-common | 1.8.0 | +| Cloud Events Multi | kogito-cloudevents-quarkus-multi-addon | kogito-addons-quarkus-messaging | 1.8.0 | +| Events Decisions | kogito-event-driven-decisions-quarkus-addon | kogito-addons-quarkus-events-decisions | 1.8.0 | +| Events Smallrye | kogito-events-reactive-messaging-addon | kogito-addons-quarkus-events-process | 1.8.0 | +| Explainability | explainability-quarkus-addon | kogito-addons-quarkus-explainability | 1.8.0 | +| Jobs Management | jobs-management-quarkus-addon | kogito-addons-quarkus-jobs-management | 1.8.0 | +| Knative Eventing | knative-eventing-addon | kogito-addons-quarkus-knative-eventing | 1.6.0 | +| Mail | mail-quarkus-addon | kogito-addons-quarkus-mail | 1.8.0 | +| Monitoring Core | monitoring-core-quarkus-addon | kogito-addons-quarkus-monitoring-core | 1.8.0 | +| Monitoring Elastic | monitoring-elastic-quarkus-addon | kogito-addons-quarkus-monitoring-elastic | 1.8.0 | +| Monitoring Prometheus | monitoring-prometheus-quarkus-addon | kogito-addons-quarkus-monitoring-prometheus | 1.8.0 | +| Persistence ISPN Health | infinispan-quarkus-health-addon | kogito-addons-quarkus-persistence-infinispan-health | 1.8.0 | +| Persistence Infinispan | kogito-addons-persistence-infinispan | kogito-addons-quarkus-persistence-infinispan | 1.12.0 | +| Persistence Kafka | kafka-persistence-addon | kogito-addons-quarkus-persistence-kafka | 1.8.0 | +| Persistence FileSystem | kogito-addons-persistence-filesystem | kogito-addons-quarkus-persistence-filesystem | 1.12.0 | +| Persistence JDBC | kogito-addons-persistence-jdbc | kogito-addons-quarkus-persistence-jdbc | 1.12.0 | +| Persistence MongoDB | kogito-addons-persistence-mongodb | kogito-addons-quarkus-persistence-mongodb | 1.12.0 | +| Persistence Postgresql | kogito-addons-persistence-postgresql | kogito-addons-quarkus-persistence-postgresql | 1.12.0 | +| Process Management | process-management-addon | kogito-addons-quarkus-process-management | 1.8.0 | +| Process SVG | process-svg-quarkus-addon | kogito-addons-quarkus-process-svg | 1.8.0 | +| REST Exception Handler | kogito-rest-exception-handler-quarkus | kogito-addons-quarkus-rest-exception-handler | 1.8.0 | +| Task Management | task-management-quarkus-addon | kogito-addons-quarkus-task-management | 1.8.0 | +| Task Notification | task-notification-quarkus-addon | kogito-addons-quarkus-task-notification | 1.8.0 | +| Tracing Decision | tracing-decision-quarkus-addon | kogito-addons-quarkus-tracing-decision | 1.8.0 | #### Spring Boot Add-ons -| Add-On Description | Old Artifact ID | New Artifact ID | -|---------------------|-----------------|-----------------| -| Cloud Events | kogito-cloudevents-spring-boot-addon | kogito-addons-springboot-cloudevents | -| Events Decisions | kogito-event-driven-decisions-springboot-addon | kogito-addons-springboot-events-decisions | -| Events Kafka | kogito-events-spring-boot-addon | kogito-addons-springboot-events-kafka | -| Explainability | explainability-springboot-addon | kogito-addons-springboot-explainability | -| Jobs Management | jobs-management-springboot-addon | kogito-addons-springboot-jobs-management | -| Mail | mail-springboot-addon | kogito-addons-springboot-mail | -| Monitoring Core | monitoring-core-springboot-addon | kogito-addons-springboot-monitoring-core | -| Monitoring Elastic | monitoring-elastic-springboot-addon | kogito-addons-springboot-monitoring-elastic | -| Monitoring Prometheus | monitoring-prometheus-springboot-addon | kogito-addons-springboot-monitoring-prometheus | -| Process Management | process-management-springboot-addon | kogito-addons-springboot-process-management | -| Process SVG | process-svg-springboot-addon | kogito-addons-springboot-process-svg | -| REST Exception Handler | kogito-rest-exception-handler-springboot | kogito-addons-springboot-rest-exception-handler | -| Task Management | task-management-springboot-addon | kogito-addons-springboot-task-management | -| Task Notification | task-notification-springboot-addon | kogito-addons-springboot-task-notification | -| Tracing Decision | tracing-decision-springboot-addon | kogito-addons-springboot-tracing-decision | +| Add-On Description | Deprecated Artifact ID | New Artifact ID | Since | +|---------------------|------------------------|-----------------|-------| +| Cloud Events | kogito-cloudevents-spring-boot-addon | kogito-addons-springboot-messaging | 1.8.0 | +| Events Decisions | kogito-event-driven-decisions-springboot-addon | kogito-addons-springboot-events-decisions | 1.8.0 | +| Events Kafka | kogito-events-spring-boot-addon | kogito-addons-springboot-events-process-kafka | 1.8.0 | +| Explainability | explainability-springboot-addon | kogito-addons-springboot-explainability | 1.8.0 | +| Jobs Management | jobs-management-springboot-addon | kogito-addons-springboot-jobs-management | 1.8.0 | +| Mail | mail-springboot-addon | kogito-addons-springboot-mail | 1.8.0 | +| Monitoring Core | monitoring-core-springboot-addon | kogito-addons-springboot-monitoring-core | 1.8.0 | +| Monitoring Elastic | monitoring-elastic-springboot-addon | kogito-addons-springboot-monitoring-elastic | 1.8.0 | +| Monitoring Prometheus | monitoring-prometheus-springboot-addon | kogito-addons-springboot-monitoring-prometheus | 1.8.0 | +| Process Management | process-management-springboot-addon | kogito-addons-springboot-process-management | 1.8.0 | +| Process SVG | process-svg-springboot-addon | kogito-addons-springboot-process-svg | 1.8.0 | +| REST Exception Handler | kogito-rest-exception-handler-springboot | kogito-addons-springboot-rest-exception-handler | 1.8.0 | +| Task Management | task-management-springboot-addon | kogito-addons-springboot-task-management | 1.8.0 | +| Task Notification | task-notification-springboot-addon | kogito-addons-springboot-task-notification | 1.8.0 | +| Tracing Decision | tracing-decision-springboot-addon | kogito-addons-springboot-tracing-decision | 1.8.0 | #### Common Add-ons > [1] Commons Add-ons that are not supposed to be used by end user's projects. -| Add-On Description | Old Artifact ID | New Artifact ID | -|---------------------|-----------------|-----------------| -| Cloud Events Utils [1] | cloudevents-utils | kogito-addons-cloudevents-utils | -| Cloud Events [1] | kogito-cloudevents-common-addon | kogito-addons-cloudevents | -| Events Decisions [1] | kogito-event-driven-decisions-common | kogito-addons-events-decisions | -| Explainability [1] | explainability-addon-common | kogito-addons-explainability | -| Human Task Prediction API | kogito-task-prediction-api | kogito-addons-human-task-prediction-api | -| Human Task Prediction Smile | kogito-task-prediction-smile-addon | kogito-addons-human-task-prediction-smile | -| Jobs Api [1] | jobs-api | kogito-addons-jobs-api | -| Jobs Management [1] | jobs-management-common | kogito-addons-jobs-management-common | -| Mail [1] | mail-common-addon | kogito-addons-mail | -| Monitoring [1] | monitoring-core-common | kogito-addons-monitoring-core | -| Monitoring Elastic [1] | monitoring-elastic-common | kogito-addons-monitoring-elastic | -| Monitoring Prometheus [1] | monitoring-prometheus-common | kogito-addons-monitoring-core | -| Persistence Filesystem | filesystem-persistence-addon | kogito-addons-persistence-filesystem | -| Persistence Infinispan | infinispan-persistence-addon | kogito-addons-persistence-infinispan | -| Persistence JDBC | jdbc-persistence-addon | kogito-addons-persistence-jdbc | -| Persistence MongoDB | mongodb-persistence-addon | kogito-addons-persistence-mongodb | -| Persistence PostgreSQL | postgresql-persistence-addon | kogito-addons-persistence-postgresql | -| Process Management [1] | process-management-common | kogito-addons-process-management | -| Process SVG [1] | process-svg-common | kogito-addons-process-svg | -| REST Exception Handler [1] | kogito-rest-exception-handler-common | kogito-addons-rest-exception-handler | -| Task Management [1] | task-management-common | kogito-addons-task-management | -| Tracing Decision API [1] | tracing-decision-api | kogito-addons-tracing-decision-api | -| Tracing Decision Common [1] | tracing-decision-common | kogito-addons-tracing-decision-common | -| Tracing TypedValue API [1] | typedvalue-api | kogito-addons-tracing-typedvalue-api | - -### Version 1.11.x - -The artifact IDs for these Kogito Add-ons have changed since version 1.10.x. Please refer to the table below for the new -add-on names to update your project `pom.xml` dependencies section. - -Classes and namespaces remains the same, you won't need to make any change in your code base. - -#### Quarkus Add-ons - -| Add-On Description | Old Artifact ID | New Artifact ID | -|---------------------|-----------------|-----------------| -| Cloud Events | kogito-addons-quarkus-cloudevents | kogito-addons-quarkus-messaging -| Cloud Events Multi | kogito-addons-quarkus-cloudevents-multi | kogito-addons-quarkus-messaging -| Events Smallrye | kogito-addons-quarkus-events-smallrye | kogito-addons-quarkus-events-process - -#### Spring Boot Add-ons - -| Add-On Description | Old Artifact ID | New Artifact ID | -|---------------------|-----------------|-----------------| -| Cloud Events | kogito-addons-springboot-cloudevents | kogito-addons-springboot-messaging -| Events Kafka | kogito-addons-springboot-events-kafka | kogito-addons-springboot-events-process-kafka - +| Add-On Description | Deprecated Artifact ID | New Artifact ID | Since | +|---------------------|------------------------|-----------------|-------| +| Cloud Events Utils [1] | cloudevents-utils | kogito-addons-cloudevents-utils | 1.8.0 | +| Cloud Events [1] | kogito-cloudevents-common-addon | kogito-addons-cloudevents | 1.8.0 | +| Events Decisions [1] | kogito-event-driven-decisions-common | kogito-addons-events-decisions | 1.8.0 | +| Explainability [1] | explainability-addon-common | kogito-addons-explainability | 1.8.0 | +| Human Task Prediction API | kogito-task-prediction-api | kogito-addons-human-task-prediction-api | 1.8.0 | +| Human Task Prediction Smile | kogito-task-prediction-smile-addon | kogito-addons-human-task-prediction-smile | 1.8.0 | +| Jobs Api [1] | jobs-api | kogito-addons-jobs-api | 1.8.0 | +| Jobs Management [1] | jobs-management-common | kogito-addons-jobs-management-common | 1.8.0 | +| Mail [1] | mail-common-addon | kogito-addons-mail | 1.8.0 | +| Monitoring [1] | monitoring-core-common | kogito-addons-monitoring-core | 1.8.0 | +| Monitoring Elastic [1] | monitoring-elastic-common | kogito-addons-monitoring-elastic | 1.8.0 | +| Monitoring Prometheus [1] | monitoring-prometheus-common | kogito-addons-monitoring-core | 1.8.0 | +| Persistence Filesystem | filesystem-persistence-addon | kogito-addons-persistence-filesystem | 1.8.0 | +| Persistence Infinispan | infinispan-persistence-addon | kogito-addons-persistence-infinispan | 1.8.0 | +| Persistence JDBC | jdbc-persistence-addon | kogito-addons-persistence-jdbc | 1.8.0 | +| Persistence MongoDB | mongodb-persistence-addon | kogito-addons-persistence-mongodb | 1.8.0 | +| Persistence PostgreSQL | postgresql-persistence-addon | kogito-addons-persistence-postgresql | 1.8.0 | +| Process Management [1] | process-management-common | kogito-addons-process-management | 1.8.0 | +| Process SVG [1] | process-svg-common | kogito-addons-process-svg | 1.8.0 | +| REST Exception Handler [1] | kogito-rest-exception-handler-common | kogito-addons-rest-exception-handler | 1.8.0 | +| Task Management [1] | task-management-common | kogito-addons-task-management | 1.8.0 | +| Tracing Decision API [1] | tracing-decision-api | kogito-addons-tracing-decision-api | 1.8.0 | +| Tracing Decision Common [1] | tracing-decision-common | kogito-addons-tracing-decision-common | 1.8.0 | +| Tracing TypedValue API [1] | typedvalue-api | kogito-addons-tracing-typedvalue-api | 1.8.0 | diff --git a/addons/deprecated/kogito-addons-quarkus-events-smallrye/src/main/java/org/kie/kogito/events/rm/deprecated/DeprecatedQuarkusEventsSmallrye.java b/addons/deprecated/kogito-addons-quarkus-events-smallrye/src/main/java/org/kie/kogito/events/process/deprecated/DeprecatedQuarkusEventsSmallrye.java similarity index 96% rename from addons/deprecated/kogito-addons-quarkus-events-smallrye/src/main/java/org/kie/kogito/events/rm/deprecated/DeprecatedQuarkusEventsSmallrye.java rename to addons/deprecated/kogito-addons-quarkus-events-smallrye/src/main/java/org/kie/kogito/events/process/deprecated/DeprecatedQuarkusEventsSmallrye.java index 707c1bf0c53..8ceb5120584 100644 --- a/addons/deprecated/kogito-addons-quarkus-events-smallrye/src/main/java/org/kie/kogito/events/rm/deprecated/DeprecatedQuarkusEventsSmallrye.java +++ b/addons/deprecated/kogito-addons-quarkus-events-smallrye/src/main/java/org/kie/kogito/events/process/deprecated/DeprecatedQuarkusEventsSmallrye.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.kie.kogito.events.rm.deprecated; +package org.kie.kogito.events.process.deprecated; import javax.enterprise.context.ApplicationScoped; diff --git a/addons/deprecated/pom.xml b/addons/deprecated/pom.xml index 03ceb1bba27..4d91bebc39c 100644 --- a/addons/deprecated/pom.xml +++ b/addons/deprecated/pom.xml @@ -12,9 +12,9 @@ kogito-addons-deprecated-parent pom Kogito :: Add-Ons :: Deprecated - + Home for deprecated addons that will be discontinued in future releases. Do not use these dependencies. - + kogito-event-driven-decisions-common kogito-event-driven-decisions-quarkus-addon @@ -49,5 +49,5 @@ - + \ No newline at end of file diff --git a/integration-tests/integration-tests-kogito-plugin/pom.xml b/integration-tests/integration-tests-kogito-plugin/pom.xml index 215ea4085a5..f1245d98c3a 100644 --- a/integration-tests/integration-tests-kogito-plugin/pom.xml +++ b/integration-tests/integration-tests-kogito-plugin/pom.xml @@ -31,6 +31,11 @@ kogito-quarkus-deployment ${project.version} + + org.kie.kogito + kogito-addons-quarkus-process-management-deployment + ${project.version} + org.kie.kogito kogito-bom diff --git a/kogito-bom/pom.xml b/kogito-bom/pom.xml index e068a4cb74b..3102ead01fe 100755 --- a/kogito-bom/pom.xml +++ b/kogito-bom/pom.xml @@ -316,6 +316,24 @@ javadoc + + org.kie.kogito + kogito-addons-quarkus-common-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + ${project.version} + javadoc + + org.kie.kogito kogito-addons-quarkus-knative-eventing @@ -333,6 +351,17 @@ ${project.version} javadoc + + org.kie.kogito + kogito-addons-quarkus-knative-eventing-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-knative-eventing-deployment + ${project.version} + sources + org.kie.kogito @@ -345,6 +374,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-messaging-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-messaging-deployment + ${project.version} + sources + @@ -561,6 +601,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-monitoring-prometheus-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-monitoring-prometheus-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-monitoring-prometheus @@ -635,6 +686,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-monitoring-elastic-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-monitoring-elastic-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-monitoring-elastic @@ -695,27 +757,36 @@ ${project.version} sources - org.kie.kogito - kogito-addons-persistence-postgresql + kogito-addons-quarkus-persistence-kafka-deployment ${project.version} org.kie.kogito - kogito-addons-persistence-postgresql + kogito-addons-quarkus-persistence-kafka-deployment ${project.version} sources - org.kie.kogito - kogito-addons-persistence-filesystem + kogito-addons-quarkus-persistence-infinispan ${project.version} org.kie.kogito - kogito-addons-persistence-filesystem + kogito-addons-quarkus-persistence-infinispan + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-infinispan-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-infinispan-deployment ${project.version} sources @@ -730,6 +801,118 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-persistence-jdbc + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-jdbc + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-jdbc-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-jdbc-deployment + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-mongodb + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-mongodb + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-mongodb-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-mongodb-deployment + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-postgresql + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-postgresql + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-postgresql-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-postgresql-deployment + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-filesystem + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-filesystem + ${project.version} + sources + + + org.kie.kogito + kogito-addons-quarkus-persistence-filesystem-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-persistence-filesystem-deployment + ${project.version} + sources + + + + org.kie.kogito + kogito-addons-persistence-postgresql + ${project.version} + + + org.kie.kogito + kogito-addons-persistence-postgresql + ${project.version} + sources + + + + org.kie.kogito + kogito-addons-persistence-filesystem + ${project.version} + + + org.kie.kogito + kogito-addons-persistence-filesystem + ${project.version} + sources + org.kie.kogito kogito-addons-persistence-mongodb @@ -763,6 +946,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-events-process-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-events-process-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-events-process-kafka @@ -796,6 +990,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-events-mongodb-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-events-mongodb-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-events-mongodb @@ -829,6 +1034,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-process-management-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-process-management-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-process-management @@ -862,6 +1078,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-task-management-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-task-management-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-task-management @@ -884,6 +1111,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-task-notification-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-task-notification-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-task-notification @@ -917,6 +1155,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-mail-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-mail-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-mail @@ -991,6 +1240,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-process-svg-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-process-svg-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-process-svg @@ -1026,6 +1286,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-jobs-management-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-jobs-management-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-jobs-management @@ -1844,6 +2115,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-tracing-decision-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-tracing-decision-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-tracing-decision @@ -1921,6 +2203,17 @@ ${project.version} javadoc + + org.kie.kogito + kogito-addons-quarkus-explainability-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-explainability-deployment + ${project.version} + sources + @@ -1945,6 +2238,17 @@ ${project.version} sources + + org.kie.kogito + kogito-addons-quarkus-events-decisions-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-events-decisions-deployment + ${project.version} + sources + org.kie.kogito kogito-addons-springboot-events-decisions diff --git a/quarkus/addons/README.md b/quarkus/addons/README.md index cd0cee8fb36..9035c3839c9 100644 --- a/quarkus/addons/README.md +++ b/quarkus/addons/README.md @@ -16,8 +16,12 @@ In this module you will find all the add-ons supported by the community for Quar | Mail | kogito-addons-quarkus-mail | 1.6.0 | | Monitoring Elastic | kogito-addons-quarkus-monitoring-elastic | 1.2.0 | | Monitoring Prometheus | kogito-addons-quarkus-monitoring-prometheus | 0.1.0 | -| Persistence ISPN Health | kogito-addons-quarkus-persistence-infinispan-health | 0.8.0 | +| Persistence FileSystem | kogito-addons-quarkus-persistence-filesystem | 1.12.0 | +| Persistence Infinispan | kogito-addons-quarkus-persistence-infinispan | 1.12.0 | +| Persistence JDBC | kogito-addons-quarkus-persistence-jdbc | 1.12.0 | | Persistence Kafka | kogito-addons-quarkus-persistence-kafka | 1.4.0 | +| Persistence MongoDB | kogito-addons-quarkus-persistence-mongodb | 1.12.0 | +| Persistence Postgresql | kogito-addons-quarkus-persistence-postgresql | 1.12.0 | | Process Management | kogito-addons-quarkus-process-management | 0.3.0 | | Process SVG | kogito-addons-quarkus-process-svg | 1.0.0 | | Task Management | kogito-addons-quarkus-task-management | 1.4.0 | diff --git a/quarkus/addons/common/deployment/pom.xml b/quarkus/addons/common/deployment/pom.xml new file mode 100644 index 00000000000..a2b61f45561 --- /dev/null +++ b/quarkus/addons/common/deployment/pom.xml @@ -0,0 +1,28 @@ + + + + kogito-addons-quarkus-common-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-common-deployment + Kogito Add-On Common - Deployment + Common libraries meant to be used with Kogito Quarkus Add-Ons deployment modules + + + + io.quarkus + quarkus-core-deployment + + + org.junit.jupiter + junit-jupiter-engine + test + + + + \ No newline at end of file diff --git a/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineKogitoAddOnProcessor.java b/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineKogitoAddOnProcessor.java new file mode 100644 index 00000000000..59787150c1c --- /dev/null +++ b/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineKogitoAddOnProcessor.java @@ -0,0 +1,57 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.addons.common.deployment; + +import io.quarkus.deployment.Capabilities; +import io.quarkus.deployment.annotations.BuildStep; + +/** + * You don't need to point to a particular engine if your add-on fits any set of it. + * Just by extending this class, it will make any of {@link KogitoCapability#ENGINES} to be presented. + *

+ * If you need a particular set of {@link KogitoCapability} to be presented, please use {@link RequireCapabilityKogitoAddOnProcessor} instead. + * + * @see Quarkus Extension Capabilities + */ +public abstract class AnyEngineKogitoAddOnProcessor { + + /** + * Verifies if one of the {@link KogitoCapability#ENGINES} are present in the classpath. + * + * @param capabilities + */ + @BuildStep + void verifyCapabilities(final Capabilities capabilities) { + if (KogitoCapability.ENGINES.stream().noneMatch(kc -> capabilities.isPresent(kc.getCapability()))) { + throw this.exceptionForEngineNotPresent(); + } + } + + private IllegalStateException exceptionForEngineNotPresent() { + final StringBuilder sb = new StringBuilder(); + sb.append("This Kogito Quarkus Add-on requires at least one of the following Kogito Extensions: \n"); + KogitoCapability.ENGINES.forEach(c -> { + sb.append("\t - ").append(c.getCapability()).append("\n"); + sb.append("\t\t offered by the artifact ") + .append(KogitoCapability.KOGITO_GROUP_ID) + .append(":") + .append(c.getOfferedBy()) + .append("\n"); + }); + sb.append("Add one of the above artifacts in your project's pom.xml file"); + return new IllegalStateException(sb.toString()); + } +} diff --git a/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoCapability.java b/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoCapability.java new file mode 100644 index 00000000000..d155fffeac2 --- /dev/null +++ b/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoCapability.java @@ -0,0 +1,56 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.addons.common.deployment; + +import java.util.List; + +import static java.util.Arrays.asList; + +/** + * Data Holder to use with {@link RequireCapabilityKogitoAddOnProcessor} to describe the Kogito Capability required by a given add-on. + */ +public final class KogitoCapability { + + public static final String KOGITO_GROUP_ID = "org.kie.kogito"; + public static final KogitoCapability DECISIONS = new KogitoCapability("org.kie.kogito.decisions", "kogito-quarkus-decisions"); + public static final KogitoCapability PROCESSES = new KogitoCapability("org.kie.kogito.processes", "kogito-quarkus-processes"); + public static final KogitoCapability PREDICTIONS = new KogitoCapability("org.kie.kogito.predictions", "kogito-quarkus-predictions"); + public static final KogitoCapability RULES = new KogitoCapability("org.kie.kogito.rules", "kogito-quarkus-rules"); + public static final KogitoCapability SERVERLESS_WORKFLOW = new KogitoCapability("org.kie.kogito.serverless.workflow", "kogito-quarkus-serverless-workflow"); + + public final static List ENGINES = + asList(KogitoCapability.DECISIONS, + KogitoCapability.PROCESSES, + KogitoCapability.PREDICTIONS, + KogitoCapability.RULES, + KogitoCapability.SERVERLESS_WORKFLOW); + + private final String capability; + private final String offeredBy; + + public KogitoCapability(final String capability, final String offeredBy) { + this.capability = capability; + this.offeredBy = offeredBy; + } + + public String getCapability() { + return capability; + } + + public String getOfferedBy() { + return offeredBy; + } +} diff --git a/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/RequireCapabilityKogitoAddOnProcessor.java b/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/RequireCapabilityKogitoAddOnProcessor.java new file mode 100644 index 00000000000..81323891360 --- /dev/null +++ b/quarkus/addons/common/deployment/src/main/java/org/kie/kogito/quarkus/addons/common/deployment/RequireCapabilityKogitoAddOnProcessor.java @@ -0,0 +1,90 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.addons.common.deployment; + +import java.util.List; +import java.util.stream.Collectors; + +import io.quarkus.deployment.Capabilities; +import io.quarkus.deployment.annotations.BuildStep; + +import static java.util.Arrays.asList; + +/** + * Abstract class for Add-Ons processors that requires a set of capabilities to be presented. + *

+ * When extending this base class, if your add-on requires a particular set of capabilities, + * inform them in the constructor. For example: + *

+ * + *

+ * public MyKogitoAddonProcessor() {
+ *     super(KogitoCapability.RULES);
+ * }
+ * 
+ * + * If your add-on doesn't require a particular set of {@link KogitoCapability}, use {@link AnyEngineKogitoAddOnProcessor} + * instead to verify if at least one engine is presented. + * + * @see Quarkus Extension Capabilities + */ +public abstract class RequireCapabilityKogitoAddOnProcessor { + + private final List requiredCapabilities; + + /** + * Required capabilities that this Add-On depends on. + * Add at least one capability to the list, otherwise an {@link IllegalArgumentException} will be raised. + * + * @see Declaring Capabilities + */ + public RequireCapabilityKogitoAddOnProcessor(final KogitoCapability... requiredCapabilities) { + if (requiredCapabilities == null || requiredCapabilities.length == 0) { + throw new IllegalArgumentException("Please set at least one capability"); + } + this.requiredCapabilities = asList(requiredCapabilities); + } + + /** + * {@link BuildStep} to verify if all {@link Capabilities} are presented in the current classpath. + * + */ + @BuildStep + void verifyCapabilities(final Capabilities capabilities) { + final List missing = requiredCapabilities.stream() + .filter(kc -> capabilities.isMissing(kc.getCapability())) + .collect(Collectors.toList()); + if (!missing.isEmpty()) { + throw this.exceptionForRequiredCapabilities(missing); + } + } + + private IllegalStateException exceptionForRequiredCapabilities(List missingCapabilities) { + final StringBuilder sb = new StringBuilder(); + sb.append("The following capabilities are missing: \n"); + missingCapabilities.forEach(c -> { + sb.append("\t - ").append(c.getCapability()).append("\n"); + sb.append("\t\t offered by the artifact ") + .append(KogitoCapability.KOGITO_GROUP_ID) + .append(":") + .append(c.getOfferedBy()) + .append("\n"); + }); + sb.append("Add the above artifacts in your project's pom.xml file"); + return new IllegalStateException(sb.toString()); + } + +} diff --git a/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineAddonProcessorImpl.java b/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineAddonProcessorImpl.java new file mode 100644 index 00000000000..a797535e98a --- /dev/null +++ b/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/AnyEngineAddonProcessorImpl.java @@ -0,0 +1,20 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.addons.common.deployment; + +public class AnyEngineAddonProcessorImpl extends AnyEngineKogitoAddOnProcessor { + +} diff --git a/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoAddOnProcessorTest.java b/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoAddOnProcessorTest.java new file mode 100644 index 00000000000..01bf2e6464a --- /dev/null +++ b/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/KogitoAddOnProcessorTest.java @@ -0,0 +1,64 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.addons.common.deployment; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import org.junit.jupiter.api.Test; + +import io.quarkus.deployment.Capabilities; + +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class KogitoAddOnProcessorTest { + + @Test + void verifyRequiredCapabilitiesWhenNotPresent() { + final RequireEngineAddonProcessor requireEngineAddonProcessor = new RequireEngineAddonProcessor(); + final IllegalStateException exception = + assertThrows(IllegalStateException.class, + () -> requireEngineAddonProcessor.verifyCapabilities(new Capabilities(Collections.emptySet()))); + assertTrue(exception.getMessage().contains(KogitoCapability.DECISIONS.getCapability())); + assertTrue(exception.getMessage().contains(KogitoCapability.PREDICTIONS.getCapability())); + } + + @Test + void verifyAnyEngineRequiredButNotPresent() { + final AnyEngineAddonProcessorImpl anyEngineAddonProcessorImpl = new AnyEngineAddonProcessorImpl(); + final IllegalStateException exception = + assertThrows(IllegalStateException.class, + () -> anyEngineAddonProcessorImpl.verifyCapabilities(new Capabilities(Collections.emptySet()))); + assertTrue(exception.getMessage().contains(KogitoCapability.DECISIONS.getCapability())); + assertTrue(exception.getMessage().contains(KogitoCapability.PREDICTIONS.getCapability())); + assertTrue(exception.getMessage().contains(KogitoCapability.PROCESSES.getCapability())); + assertTrue(exception.getMessage().contains(KogitoCapability.SERVERLESS_WORKFLOW.getCapability())); + assertTrue(exception.getMessage().contains(KogitoCapability.RULES.getCapability())); + } + + @Test + void verifyRequiredCapabilitiesWhenPresent() { + final RequireEngineAddonProcessor requireEngineAddonProcessor = new RequireEngineAddonProcessor(); + final Set capabilities = new HashSet<>(); + capabilities.add(KogitoCapability.DECISIONS.getCapability()); + capabilities.add(KogitoCapability.PREDICTIONS.getCapability()); + assertDoesNotThrow(() -> requireEngineAddonProcessor.verifyCapabilities(new Capabilities(capabilities))); + } + +} diff --git a/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/RequireEngineAddonProcessor.java b/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/RequireEngineAddonProcessor.java new file mode 100644 index 00000000000..2921f6b598f --- /dev/null +++ b/quarkus/addons/common/deployment/src/test/java/org/kie/kogito/quarkus/addons/common/deployment/RequireEngineAddonProcessor.java @@ -0,0 +1,27 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.quarkus.addons.common.deployment; + +/** + * A mock add-on that requires decisions and predictions + */ +public class RequireEngineAddonProcessor extends RequireCapabilityKogitoAddOnProcessor { + + public RequireEngineAddonProcessor() { + super(KogitoCapability.DECISIONS, KogitoCapability.PREDICTIONS); + } + +} diff --git a/quarkus/addons/common/pom.xml b/quarkus/addons/common/pom.xml new file mode 100644 index 00000000000..25b4be5898a --- /dev/null +++ b/quarkus/addons/common/pom.xml @@ -0,0 +1,21 @@ + + + + kogito-addons-quarkus-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-common-parent + Kogito Add-On Common - Parent + pom + Collection of common libraries used by Kogito Quarkus Add-ons. + + + deployment + + + \ No newline at end of file diff --git a/quarkus/addons/events/decisions/deployment/pom.xml b/quarkus/addons/events/decisions/deployment/pom.xml new file mode 100644 index 00000000000..3f3565f6cb0 --- /dev/null +++ b/quarkus/addons/events/decisions/deployment/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-events-decisions-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-events-decisions-deployment + Kogito Add-On Events Decisions - Deployment + + + io.quarkus + quarkus-arc-deployment + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + org.kie.kogito + kogito-addons-quarkus-messaging-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-events-decisions + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/events/decisions/deployment/src/main/java/org/kie/kogito/eventdriven/decision/KogitoAddOnEventDecisionProcessor.java b/quarkus/addons/events/decisions/deployment/src/main/java/org/kie/kogito/eventdriven/decision/KogitoAddOnEventDecisionProcessor.java new file mode 100644 index 00000000000..d71822f6ef4 --- /dev/null +++ b/quarkus/addons/events/decisions/deployment/src/main/java/org/kie/kogito/eventdriven/decision/KogitoAddOnEventDecisionProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.eventdriven.decision; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnEventDecisionProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-events-decisions-extension"; + + KogitoAddOnEventDecisionProcessor() { + super(KogitoCapability.DECISIONS); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/events/decisions/pom.xml b/quarkus/addons/events/decisions/pom.xml index 9675768364b..e3706cf9501 100644 --- a/quarkus/addons/events/decisions/pom.xml +++ b/quarkus/addons/events/decisions/pom.xml @@ -9,18 +9,13 @@ 2.0.0-SNAPSHOT - kogito-addons-quarkus-events-decisions - Kogito :: Add-Ons :: Events :: Event-Driven Decisions :: Quarkus + kogito-addons-quarkus-events-decisions-parent + Kogito Add-On Events Decisions - Parent + pom - - - org.kie.kogito - kogito-addons-events-decisions - - - org.kie.kogito - kogito-addons-quarkus-messaging - - + + runtime + deployment + diff --git a/quarkus/addons/events/decisions/runtime/pom.xml b/quarkus/addons/events/decisions/runtime/pom.xml new file mode 100644 index 00000000000..8eb1c309cde --- /dev/null +++ b/quarkus/addons/events/decisions/runtime/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-events-decisions-parent + 2.0.0-SNAPSHOT + + + kogito-addons-quarkus-events-decisions + Kogito Add-On Events Decisions + + + + org.kie.kogito + kogito-addons-events-decisions + + + org.kie.kogito + kogito-addons-quarkus-messaging + + + io.quarkus + quarkus-arc + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.events.decisions + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + + diff --git a/quarkus/addons/events/decisions/src/main/java/org/kie/kogito/eventdriven/decision/QuarkusEventDrivenDecisionController.java b/quarkus/addons/events/decisions/runtime/src/main/java/org/kie/kogito/eventdriven/decision/QuarkusEventDrivenDecisionController.java similarity index 100% rename from quarkus/addons/events/decisions/src/main/java/org/kie/kogito/eventdriven/decision/QuarkusEventDrivenDecisionController.java rename to quarkus/addons/events/decisions/runtime/src/main/java/org/kie/kogito/eventdriven/decision/QuarkusEventDrivenDecisionController.java diff --git a/quarkus/addons/events/decisions/src/main/resources/META-INF/beans.xml b/quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/events/decisions/src/main/resources/META-INF/beans.xml rename to quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/events/decisions/src/main/resources/META-INF/kogito.addon b/quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/events/decisions/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..a707c2be805 --- /dev/null +++ b/quarkus/addons/events/decisions/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Events Decisions +description: Kogito Add-On for processing events on Decisions (DMN) based projects +metadata: + keywords: + - kogito + - decisions + - DMN + - Kafka + guide: https://quarkus.io/guides/kogito-dmn + categories: + - "business-automation" diff --git a/quarkus/addons/events/mongodb/deployment/pom.xml b/quarkus/addons/events/mongodb/deployment/pom.xml new file mode 100644 index 00000000000..3b037536cf1 --- /dev/null +++ b/quarkus/addons/events/mongodb/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-events-mongodb-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-events-mongodb-deployment + Kogito Add-On Events MongoDB - Deployment + + + io.quarkus + quarkus-arc-deployment + + + org.kie.kogito + kogito-addons-quarkus-events-mongodb + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/events/mongodb/deployment/src/main/java/org/kie/kogito/events/mongodb/deployment/KogitoAddOnEventMongoDBProcessor.java b/quarkus/addons/events/mongodb/deployment/src/main/java/org/kie/kogito/events/mongodb/deployment/KogitoAddOnEventMongoDBProcessor.java new file mode 100644 index 00000000000..a352e980db4 --- /dev/null +++ b/quarkus/addons/events/mongodb/deployment/src/main/java/org/kie/kogito/events/mongodb/deployment/KogitoAddOnEventMongoDBProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.events.mongodb.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnEventMongoDBProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-events-mongodb-extension"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + KogitoAddOnEventMongoDBProcessor() { + super(KogitoCapability.PROCESSES); + } + +} diff --git a/quarkus/addons/events/mongodb/pom.xml b/quarkus/addons/events/mongodb/pom.xml index 8b576715cec..1631e8b1907 100644 --- a/quarkus/addons/events/mongodb/pom.xml +++ b/quarkus/addons/events/mongodb/pom.xml @@ -1,65 +1,21 @@ - - 4.0.0 - - org.kie.kogito - kogito-addons-quarkus-events-parent - 2.0.0-SNAPSHOT - - - kogito-addons-quarkus-events-mongodb - Kogito :: Add-Ons :: Events :: MongoDB :: Quarkus - Kogito Events based on MongoDB and Quarkus Add-On - - - - org.kie.kogito - kogito-addons-events-mongodb - - - javax.inject - javax.inject - - - org.eclipse.microprofile.config - microprofile-config-api - - - jakarta.annotation - jakarta.annotation-api - + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-events-parent + 2.0.0-SNAPSHOT + - - - org.junit.jupiter - junit-jupiter - test - - - io.quarkus - quarkus-junit5-mockito - test - - + kogito-addons-quarkus-events-mongodb-parent + Kogito Add-On Events MongoDB - Parent + pom - - - - org.jboss.jandex - jandex-maven-plugin - - - make-index - - jandex - - - - - - + + runtime + deployment + - \ No newline at end of file + diff --git a/quarkus/addons/events/mongodb/runtime/pom.xml b/quarkus/addons/events/mongodb/runtime/pom.xml new file mode 100644 index 00000000000..0130671137d --- /dev/null +++ b/quarkus/addons/events/mongodb/runtime/pom.xml @@ -0,0 +1,100 @@ + + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-events-mongodb-parent + 2.0.0-SNAPSHOT + + + kogito-addons-quarkus-events-mongodb + Kogito Add-On Events MongoDB + Kogito Events based on MongoDB and Quarkus Add-On + + + + org.kie.kogito + kogito-addons-events-mongodb + + + javax.inject + javax.inject + + + org.eclipse.microprofile.config + microprofile-config-api + + + jakarta.annotation + jakarta.annotation-api + + + io.quarkus + quarkus-arc + + + + + org.junit.jupiter + junit-jupiter + test + + + io.quarkus + quarkus-junit5-mockito + test + + + + + + + org.jboss.jandex + jandex-maven-plugin + + + make-index + + jandex + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.events.mongodb + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/events/mongodb/src/main/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisher.java b/quarkus/addons/events/mongodb/runtime/src/main/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisher.java similarity index 100% rename from quarkus/addons/events/mongodb/src/main/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisher.java rename to quarkus/addons/events/mongodb/runtime/src/main/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisher.java diff --git a/quarkus/addons/events/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/events/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..9c32f218dc7 --- /dev/null +++ b/quarkus/addons/events/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,12 @@ +name: Kogito Add-On Events MongoDB +description: Kogito Add-On for storing Kogito events log on MongoDB for later pushing via Debezium, allowing Outbox pattern implementation. +metadata: + keywords: + - kogito + - persistence + - mongodb + - events + - process + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/events/mongodb/src/test/java/org/kie/kogito/events/mongodb/MockMongoClient.java b/quarkus/addons/events/mongodb/runtime/src/test/java/org/kie/kogito/events/mongodb/MockMongoClient.java similarity index 100% rename from quarkus/addons/events/mongodb/src/test/java/org/kie/kogito/events/mongodb/MockMongoClient.java rename to quarkus/addons/events/mongodb/runtime/src/test/java/org/kie/kogito/events/mongodb/MockMongoClient.java diff --git a/quarkus/addons/events/mongodb/src/test/java/org/kie/kogito/events/mongodb/MockTransactionManager.java b/quarkus/addons/events/mongodb/runtime/src/test/java/org/kie/kogito/events/mongodb/MockTransactionManager.java similarity index 100% rename from quarkus/addons/events/mongodb/src/test/java/org/kie/kogito/events/mongodb/MockTransactionManager.java rename to quarkus/addons/events/mongodb/runtime/src/test/java/org/kie/kogito/events/mongodb/MockTransactionManager.java diff --git a/quarkus/addons/events/mongodb/src/test/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisherTest.java b/quarkus/addons/events/mongodb/runtime/src/test/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisherTest.java similarity index 100% rename from quarkus/addons/events/mongodb/src/test/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisherTest.java rename to quarkus/addons/events/mongodb/runtime/src/test/java/org/kie/kogito/events/mongodb/QuarkusMongoDBEventPublisherTest.java diff --git a/quarkus/addons/events/mongodb/src/test/resources/application.properties b/quarkus/addons/events/mongodb/runtime/src/test/resources/application.properties similarity index 100% rename from quarkus/addons/events/mongodb/src/test/resources/application.properties rename to quarkus/addons/events/mongodb/runtime/src/test/resources/application.properties diff --git a/quarkus/addons/events/pom.xml b/quarkus/addons/events/pom.xml index bc148cf1e1a..c764e558de4 100644 --- a/quarkus/addons/events/pom.xml +++ b/quarkus/addons/events/pom.xml @@ -16,7 +16,6 @@ decisions - smallrye @@ -28,6 +27,7 @@ + process mongodb diff --git a/quarkus/addons/events/smallrye/.gitignore b/quarkus/addons/events/process/.gitignore similarity index 100% rename from quarkus/addons/events/smallrye/.gitignore rename to quarkus/addons/events/process/.gitignore diff --git a/quarkus/addons/events/process/deployment/pom.xml b/quarkus/addons/events/process/deployment/pom.xml new file mode 100644 index 00000000000..c086c56791e --- /dev/null +++ b/quarkus/addons/events/process/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-events-process-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-events-process-deployment + Kogito Add-On Events Process - Deployment + + + io.quarkus + quarkus-arc-deployment + + + org.kie.kogito + kogito-addons-quarkus-events-process + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/events/process/deployment/src/main/java/org/kie/kogito/events/process/deployment/KogitoAddOnEventProcessProcessor.java b/quarkus/addons/events/process/deployment/src/main/java/org/kie/kogito/events/process/deployment/KogitoAddOnEventProcessProcessor.java new file mode 100644 index 00000000000..8cf045bf518 --- /dev/null +++ b/quarkus/addons/events/process/deployment/src/main/java/org/kie/kogito/events/process/deployment/KogitoAddOnEventProcessProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.events.process.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnEventProcessProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-events-process-extension"; + + KogitoAddOnEventProcessProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/events/process/pom.xml b/quarkus/addons/events/process/pom.xml new file mode 100644 index 00000000000..4a41eda5ceb --- /dev/null +++ b/quarkus/addons/events/process/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-events-parent + 2.0.0-SNAPSHOT + + + kogito-addons-quarkus-events-process-parent + Kogito Add-On Events Process - Parent + pom + + + runtime + deployment + + + diff --git a/quarkus/addons/events/smallrye/pom.xml b/quarkus/addons/events/process/runtime/pom.xml similarity index 55% rename from quarkus/addons/events/smallrye/pom.xml rename to quarkus/addons/events/process/runtime/pom.xml index a44b94a34ba..5b28d326ec8 100644 --- a/quarkus/addons/events/smallrye/pom.xml +++ b/quarkus/addons/events/process/runtime/pom.xml @@ -4,12 +4,12 @@ 4.0.0 org.kie.kogito - kogito-addons-quarkus-events-parent + kogito-addons-quarkus-events-process-parent 2.0.0-SNAPSHOT kogito-addons-quarkus-events-process - Kogito :: Add-Ons :: Events :: Process - Kogito AddOn for runtime process events + Kogito Add-On Events Process + Kogito Add-On for runtime process events @@ -37,6 +37,10 @@ org.eclipse.microprofile.config microprofile-config-api + + io.quarkus + quarkus-arc + org.slf4j @@ -58,6 +62,37 @@ + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.events.process + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + diff --git a/quarkus/addons/events/smallrye/src/main/java/org/kie/kogito/events/rm/ReactiveMessagingEventPublisher.java b/quarkus/addons/events/process/runtime/src/main/java/org/kie/kogito/events/process/ReactiveMessagingEventPublisher.java similarity index 99% rename from quarkus/addons/events/smallrye/src/main/java/org/kie/kogito/events/rm/ReactiveMessagingEventPublisher.java rename to quarkus/addons/events/process/runtime/src/main/java/org/kie/kogito/events/process/ReactiveMessagingEventPublisher.java index 59294f71344..00874a436d4 100644 --- a/quarkus/addons/events/smallrye/src/main/java/org/kie/kogito/events/rm/ReactiveMessagingEventPublisher.java +++ b/quarkus/addons/events/process/runtime/src/main/java/org/kie/kogito/events/process/ReactiveMessagingEventPublisher.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.kie.kogito.events.rm; +package org.kie.kogito.events.process; import java.util.Collection; import java.util.Optional; diff --git a/quarkus/addons/events/smallrye/src/main/resources/META-INF/beans.xml b/quarkus/addons/events/process/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/events/smallrye/src/main/resources/META-INF/beans.xml rename to quarkus/addons/events/process/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/events/process/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/events/process/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..3d53e9b6054 --- /dev/null +++ b/quarkus/addons/events/process/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,12 @@ +name: Kogito Add-On Events Process +description: Kogito Add-On for Processes Events +metadata: + keywords: + - kogito + - bpmn + - process + - events + # TODO: add process guide + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/explainability/deployment/pom.xml b/quarkus/addons/explainability/deployment/pom.xml new file mode 100644 index 00000000000..a77bef31247 --- /dev/null +++ b/quarkus/addons/explainability/deployment/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-explainability-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-explainability-deployment + Kogito Add-On Explainability - Deployment + + + io.quarkus + quarkus-resteasy-deployment + + + io.quarkus + quarkus-resteasy-jackson-deployment + + + org.kie.kogito + kogito-addons-quarkus-explainability + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/explainability/deployment/src/main/java/org/kie/kogito/explainability/deployment/KogitoAddOnExplainabilityProcessor.java b/quarkus/addons/explainability/deployment/src/main/java/org/kie/kogito/explainability/deployment/KogitoAddOnExplainabilityProcessor.java new file mode 100644 index 00000000000..e89a25cbd5a --- /dev/null +++ b/quarkus/addons/explainability/deployment/src/main/java/org/kie/kogito/explainability/deployment/KogitoAddOnExplainabilityProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.explainability.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnExplainabilityProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-explainability-extension"; + + KogitoAddOnExplainabilityProcessor() { + super(KogitoCapability.DECISIONS); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/explainability/pom.xml b/quarkus/addons/explainability/pom.xml index 115843d760c..9a282468331 100644 --- a/quarkus/addons/explainability/pom.xml +++ b/quarkus/addons/explainability/pom.xml @@ -2,94 +2,20 @@ - - kogito-addons-quarkus-parent - org.kie.kogito - 2.0.0-SNAPSHOT - - 4.0.0 + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-parent + 2.0.0-SNAPSHOT + - kogito-addons-quarkus-explainability - Kogito :: Add-Ons :: Explainability :: Quarkus Addon + kogito-addons-quarkus-explainability-parent + Kogito Add-On Explainability - Parent + pom - - - io.quarkus - quarkus-resteasy - - - io.quarkus - quarkus-resteasy-jackson - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - provided - - - org.kie.kogito - kogito-api - - - org.kie.kogito - kogito-addons-explainability - + + runtime + deployment + - - io.quarkus - quarkus-junit5 - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.mockito - mockito-core - test - - - io.rest-assured - rest-assured - test - - - io.quarkus - quarkus-junit5-mockito - test - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - **/Native*IT.java - - - org.jboss.logmanager.LogManager - - - - - default - - integration-test - - - - verify - - verify - - - - - - - - \ No newline at end of file + diff --git a/quarkus/addons/explainability/runtime/pom.xml b/quarkus/addons/explainability/runtime/pom.xml new file mode 100644 index 00000000000..f80937437b3 --- /dev/null +++ b/quarkus/addons/explainability/runtime/pom.xml @@ -0,0 +1,126 @@ + + + + kogito-addons-quarkus-explainability-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-explainability + Kogito Add-On Explainability + + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-resteasy-jackson + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + provided + + + org.kie.kogito + kogito-api + + + org.kie.kogito + kogito-addons-explainability + + + + io.quarkus + quarkus-junit5 + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.mockito + mockito-core + test + + + io.rest-assured + rest-assured + test + + + io.quarkus + quarkus-junit5-mockito + test + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.explainability + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/Native*IT.java + + + org.jboss.logmanager.LogManager + + + + + default + + integration-test + + + + verify + + verify + + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/explainability/src/main/java/org/kie/kogito/explainability/QuarkusExplainableResource.java b/quarkus/addons/explainability/runtime/src/main/java/org/kie/kogito/explainability/QuarkusExplainableResource.java similarity index 100% rename from quarkus/addons/explainability/src/main/java/org/kie/kogito/explainability/QuarkusExplainableResource.java rename to quarkus/addons/explainability/runtime/src/main/java/org/kie/kogito/explainability/QuarkusExplainableResource.java diff --git a/quarkus/addons/explainability/src/main/resources/META-INF/beans.xml b/quarkus/addons/explainability/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/explainability/src/main/resources/META-INF/beans.xml rename to quarkus/addons/explainability/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/explainability/src/main/resources/META-INF/kogito.addon b/quarkus/addons/explainability/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/explainability/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/explainability/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/explainability/src/test/java/org/kie/kogito/explainability/ApplicationMock.java b/quarkus/addons/explainability/runtime/src/test/java/org/kie/kogito/explainability/ApplicationMock.java similarity index 100% rename from quarkus/addons/explainability/src/test/java/org/kie/kogito/explainability/ApplicationMock.java rename to quarkus/addons/explainability/runtime/src/test/java/org/kie/kogito/explainability/ApplicationMock.java diff --git a/quarkus/addons/explainability/src/test/java/org/kie/kogito/explainability/Constants.java b/quarkus/addons/explainability/runtime/src/test/java/org/kie/kogito/explainability/Constants.java similarity index 100% rename from quarkus/addons/explainability/src/test/java/org/kie/kogito/explainability/Constants.java rename to quarkus/addons/explainability/runtime/src/test/java/org/kie/kogito/explainability/Constants.java diff --git a/quarkus/addons/explainability/src/test/java/org/kie/kogito/explainability/QuarkusExplainableResourceIT.java b/quarkus/addons/explainability/runtime/src/test/java/org/kie/kogito/explainability/QuarkusExplainableResourceIT.java similarity index 100% rename from quarkus/addons/explainability/src/test/java/org/kie/kogito/explainability/QuarkusExplainableResourceIT.java rename to quarkus/addons/explainability/runtime/src/test/java/org/kie/kogito/explainability/QuarkusExplainableResourceIT.java diff --git a/quarkus/addons/explainability/src/test/resources/Traffic Violation.dmn b/quarkus/addons/explainability/runtime/src/test/resources/Traffic Violation.dmn similarity index 100% rename from quarkus/addons/explainability/src/test/resources/Traffic Violation.dmn rename to quarkus/addons/explainability/runtime/src/test/resources/Traffic Violation.dmn diff --git a/quarkus/addons/jobs/deployment/pom.xml b/quarkus/addons/jobs/deployment/pom.xml new file mode 100644 index 00000000000..90726b78cd2 --- /dev/null +++ b/quarkus/addons/jobs/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-jobs-management-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-jobs-management-deployment + Kogito Add-On Jobs Management - Deployment + + + io.quarkus + quarkus-vertx-deployment + + + org.kie.kogito + kogito-addons-quarkus-jobs-management + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/jobs/deployment/src/main/java/org/kie/kogito/jobs/management/quarkus/deployment/KogitoAddOnJobsManagementProcessor.java b/quarkus/addons/jobs/deployment/src/main/java/org/kie/kogito/jobs/management/quarkus/deployment/KogitoAddOnJobsManagementProcessor.java new file mode 100644 index 00000000000..41d1914a89e --- /dev/null +++ b/quarkus/addons/jobs/deployment/src/main/java/org/kie/kogito/jobs/management/quarkus/deployment/KogitoAddOnJobsManagementProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.jobs.management.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnJobsManagementProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-jobs-management-extension"; + + KogitoAddOnJobsManagementProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/jobs/pom.xml b/quarkus/addons/jobs/pom.xml index 10e8d104934..8c5fad008e9 100644 --- a/quarkus/addons/jobs/pom.xml +++ b/quarkus/addons/jobs/pom.xml @@ -1,74 +1,21 @@ + + 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"> 4.0.0 org.kie.kogito kogito-addons-quarkus-parent 2.0.0-SNAPSHOT - kogito-addons-quarkus-jobs-management - Kogito :: Add-Ons :: Jobs :: Management Quarkus Addon - Jobs Management Quarkus Addon to interact with Jobs Service + kogito-addons-quarkus-jobs-management-parent + Kogito Add-On Jobs Management - Parent + pom - - - org.kie.kogito - kogito-api - - - org.kie.kogito - jbpm-flow - - - org.kie.kogito - kogito-addons-jobs-management-common - - - org.kie.kogito - kogito-addons-jobs-api - - - io.quarkus - quarkus-vertx - - - io.vertx - vertx-web-client - - - - org.slf4j - slf4j-api - - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - + + runtime + deployment + - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - provided - - - - - org.junit.jupiter - junit-jupiter - test - - - org.mockito - mockito-junit-jupiter - test - - - org.assertj - assertj-core - test - - diff --git a/quarkus/addons/jobs/runtime/pom.xml b/quarkus/addons/jobs/runtime/pom.xml new file mode 100644 index 00000000000..68bf7b50a7b --- /dev/null +++ b/quarkus/addons/jobs/runtime/pom.xml @@ -0,0 +1,110 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-jobs-management-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-jobs-management + Kogito Add-On Jobs Management + + Jobs Management Quarkus Add-On to interact with Jobs Service + + + + org.kie.kogito + kogito-api + + + org.kie.kogito + jbpm-flow + + + org.kie.kogito + kogito-addons-jobs-management-common + + + org.kie.kogito + kogito-addons-jobs-api + + + io.quarkus + quarkus-vertx + + + io.vertx + vertx-web-client + + + + org.slf4j + slf4j-api + + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + provided + + + + + org.junit.jupiter + junit-jupiter + test + + + org.mockito + mockito-junit-jupiter + test + + + org.assertj + assertj-core + test + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.jobs.management + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/jobs/src/main/java/org/kie/kogito/jobs/management/quarkus/CallbackJobsServiceResource.java b/quarkus/addons/jobs/runtime/src/main/java/org/kie/kogito/jobs/management/quarkus/CallbackJobsServiceResource.java similarity index 100% rename from quarkus/addons/jobs/src/main/java/org/kie/kogito/jobs/management/quarkus/CallbackJobsServiceResource.java rename to quarkus/addons/jobs/runtime/src/main/java/org/kie/kogito/jobs/management/quarkus/CallbackJobsServiceResource.java diff --git a/quarkus/addons/jobs/src/main/java/org/kie/kogito/jobs/management/quarkus/VertxJobsService.java b/quarkus/addons/jobs/runtime/src/main/java/org/kie/kogito/jobs/management/quarkus/VertxJobsService.java similarity index 100% rename from quarkus/addons/jobs/src/main/java/org/kie/kogito/jobs/management/quarkus/VertxJobsService.java rename to quarkus/addons/jobs/runtime/src/main/java/org/kie/kogito/jobs/management/quarkus/VertxJobsService.java diff --git a/quarkus/addons/jobs/src/main/resources/META-INF/beans.xml b/quarkus/addons/jobs/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/jobs/src/main/resources/META-INF/beans.xml rename to quarkus/addons/jobs/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/jobs/src/main/resources/META-INF/kogito.addon b/quarkus/addons/jobs/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/jobs/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/jobs/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/jobs/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/jobs/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..2549c1e5d49 --- /dev/null +++ b/quarkus/addons/jobs/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,12 @@ +name: Kogito Add-On Jobs Service +description: Kogito Add-On to interact with Kogito Jobs Service +metadata: + keywords: + - kogito + - process + - bpmn + - jobs + # TODO: add processes guide + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/jobs/src/test/java/org/kie/kogito/jobs/management/quarkus/VertxJobsServiceTest.java b/quarkus/addons/jobs/runtime/src/test/java/org/kie/kogito/jobs/management/quarkus/VertxJobsServiceTest.java similarity index 100% rename from quarkus/addons/jobs/src/test/java/org/kie/kogito/jobs/management/quarkus/VertxJobsServiceTest.java rename to quarkus/addons/jobs/runtime/src/test/java/org/kie/kogito/jobs/management/quarkus/VertxJobsServiceTest.java diff --git a/quarkus/addons/knative/eventing/deployment/pom.xml b/quarkus/addons/knative/eventing/deployment/pom.xml new file mode 100644 index 00000000000..03cb79ceed4 --- /dev/null +++ b/quarkus/addons/knative/eventing/deployment/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-knative-eventing-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-knative-eventing-deployment + Kogito Add-On Knative Eventing - Deployment + + + io.quarkus + quarkus-reactive-messaging-http-deployment + + + org.kie.kogito + kogito-addons-quarkus-messaging-deployment + ${project.version} + + + org.kie.kogito + kogito-addons-quarkus-knative-eventing + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/knative/eventing/deployment/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/deployment/KogitoAddOnKnativeEventingProcessor.java b/quarkus/addons/knative/eventing/deployment/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/deployment/KogitoAddOnKnativeEventingProcessor.java new file mode 100644 index 00000000000..3d25c03950c --- /dev/null +++ b/quarkus/addons/knative/eventing/deployment/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/deployment/KogitoAddOnKnativeEventingProcessor.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.addons.quarkus.knative.eventing.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.AnyEngineKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnKnativeEventingProcessor extends AnyEngineKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-knative-eventing-extension"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/knative/eventing/pom.xml b/quarkus/addons/knative/eventing/pom.xml index 413914aa466..4c8d470e576 100644 --- a/quarkus/addons/knative/eventing/pom.xml +++ b/quarkus/addons/knative/eventing/pom.xml @@ -1,29 +1,21 @@ - + 4.0.0 - kogito-addons-quarkus-knative-parent org.kie.kogito + kogito-addons-quarkus-knative-parent 2.0.0-SNAPSHOT - 4.0.0 - kogito-addons-quarkus-knative-eventing - Kogito :: Add-Ons :: Quarkus :: Knative :: Eventing - Knative Eventing Kogito Addon. Adds support for CloudEvents on top of HTTP and Knative env vars configuration. - - - org.kie.kogito - kogito-addons-quarkus-messaging - - - io.quarkus - quarkus-reactive-messaging-http - - - org.kie.kogito - kogito-addons-knative-eventing - - - \ No newline at end of file + kogito-addons-quarkus-knative-eventing-parent + Kogito Add-On Knative Eventing - Parent + pom + + + runtime + deployment + + + diff --git a/quarkus/addons/knative/eventing/runtime/pom.xml b/quarkus/addons/knative/eventing/runtime/pom.xml new file mode 100644 index 00000000000..96a5e9c30f3 --- /dev/null +++ b/quarkus/addons/knative/eventing/runtime/pom.xml @@ -0,0 +1,66 @@ + + + + kogito-addons-quarkus-knative-eventing-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-knative-eventing + Kogito Add-On Knative Eventing + Knative Eventing Kogito Add-On. Adds support for CloudEvents on top of HTTP and Knative env vars configuration. + + + + org.kie.kogito + kogito-addons-quarkus-messaging + + + org.kie.kogito + kogito-addons-knative-eventing + + + io.quarkus + quarkus-reactive-messaging-http + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.knative.eventing + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/knative/eventing/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/KnativeEventingConfigSource.java b/quarkus/addons/knative/eventing/runtime/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/KnativeEventingConfigSource.java similarity index 100% rename from quarkus/addons/knative/eventing/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/KnativeEventingConfigSource.java rename to quarkus/addons/knative/eventing/runtime/src/main/java/org/kie/kogito/addons/quarkus/knative/eventing/KnativeEventingConfigSource.java diff --git a/quarkus/addons/knative/eventing/src/main/resources/META-INF/kogito.addon b/quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/knative/eventing/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..ef91bfd215b --- /dev/null +++ b/quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,18 @@ +name: Kogito Add-On Knative Eventing +description: Adds support for CloudEvents on top of HTTP and Knative env vars configuration. +metadata: + keywords: + - kogito + - processes + - decisions + - rules + - bpmn + - drl + - dmn + - knative + - eventing + - cloudevents + # TODO: add processes guide + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/knative/eventing/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigSource b/quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigSource similarity index 100% rename from quarkus/addons/knative/eventing/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigSource rename to quarkus/addons/knative/eventing/runtime/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigSource diff --git a/quarkus/addons/knative/pom.xml b/quarkus/addons/knative/pom.xml index 66b68f4c4c8..747005f952b 100644 --- a/quarkus/addons/knative/pom.xml +++ b/quarkus/addons/knative/pom.xml @@ -11,8 +11,8 @@ kogito-addons-quarkus-knative-parent pom - Kogito :: Add-Ons :: Quarkus :: Knative - Parent module for Kogito Quarkus Knative Addon + Kogito Add-On Knative - Parent + Parent module for Kogito Quarkus Knative Add-Ons eventing diff --git a/quarkus/addons/mail/deployment/pom.xml b/quarkus/addons/mail/deployment/pom.xml new file mode 100644 index 00000000000..95ec85e4652 --- /dev/null +++ b/quarkus/addons/mail/deployment/pom.xml @@ -0,0 +1,48 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-mail-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-mail-deployment + Kogito Add-On Mail - Deployment + + + io.quarkus + quarkus-smallrye-reactive-messaging-kafka-deployment + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-mailer-deployment + + ${version.io.quarkus} + + + org.kie.kogito + kogito-addons-quarkus-mail + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/mail/deployment/src/main/java/org/kie/kogito/mail/deployment/KogitoAddOnMailProcessor.java b/quarkus/addons/mail/deployment/src/main/java/org/kie/kogito/mail/deployment/KogitoAddOnMailProcessor.java new file mode 100644 index 00000000000..b910f35bf20 --- /dev/null +++ b/quarkus/addons/mail/deployment/src/main/java/org/kie/kogito/mail/deployment/KogitoAddOnMailProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.mail.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnMailProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-mail-extension"; + + KogitoAddOnMailProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/mail/pom.xml b/quarkus/addons/mail/pom.xml index 7605c5297ca..77b36e61cc7 100644 --- a/quarkus/addons/mail/pom.xml +++ b/quarkus/addons/mail/pom.xml @@ -1,59 +1,21 @@ + 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"> 4.0.0 org.kie.kogito kogito-addons-quarkus-parent 2.0.0-SNAPSHOT - kogito-addons-quarkus-mail - Kogito :: Add-Ons :: E-Mail :: Quarkus Addon - E-Mail addon for for Quarkus - - - javax.inject - javax.inject - provided - - - io.quarkus - quarkus-smallrye-reactive-messaging-kafka - - - org.kie.kogito - kogito-addons-mail - - - io.quarkus - quarkus-mailer - - - io.quarkus - quarkus-junit5 - test - - - io.rest-assured - rest-assured - test - - - io.rest-assured - json-schema-validator - test - - - org.mockito - mockito-junit-jupiter - test - - - ch.qos.logback - logback-classic - test - - - \ No newline at end of file + kogito-addons-quarkus-mail-parent + Kogito Add-On Mail - Parent + pom + + + runtime + deployment + + + diff --git a/quarkus/addons/mail/runtime/pom.xml b/quarkus/addons/mail/runtime/pom.xml new file mode 100644 index 00000000000..9045f0245d7 --- /dev/null +++ b/quarkus/addons/mail/runtime/pom.xml @@ -0,0 +1,95 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-mail-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-mail + Kogito Add-On Mail + E-Mail addon for for Quarkus + + + + javax.inject + javax.inject + provided + + + org.kie.kogito + kogito-addons-mail + + + io.quarkus + quarkus-smallrye-reactive-messaging-kafka + + + io.quarkus + quarkus-mailer + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + io.rest-assured + json-schema-validator + test + + + org.mockito + mockito-junit-jupiter + test + + + ch.qos.logback + logback-classic + test + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.mail + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/mail/src/main/java/org/kie/kogito/mail/DeadlineEventDeserializer.java b/quarkus/addons/mail/runtime/src/main/java/org/kie/kogito/mail/DeadlineEventDeserializer.java similarity index 100% rename from quarkus/addons/mail/src/main/java/org/kie/kogito/mail/DeadlineEventDeserializer.java rename to quarkus/addons/mail/runtime/src/main/java/org/kie/kogito/mail/DeadlineEventDeserializer.java diff --git a/quarkus/addons/mail/src/main/java/org/kie/kogito/mail/QuarkusMailSender.java b/quarkus/addons/mail/runtime/src/main/java/org/kie/kogito/mail/QuarkusMailSender.java similarity index 100% rename from quarkus/addons/mail/src/main/java/org/kie/kogito/mail/QuarkusMailSender.java rename to quarkus/addons/mail/runtime/src/main/java/org/kie/kogito/mail/QuarkusMailSender.java diff --git a/quarkus/addons/mail/src/main/resources/META-INF/beans.xml b/quarkus/addons/mail/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/mail/src/main/resources/META-INF/beans.xml rename to quarkus/addons/mail/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/mail/src/main/resources/META-INF/kogito.addon b/quarkus/addons/mail/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/mail/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/mail/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/mail/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/mail/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..3a84bf38761 --- /dev/null +++ b/quarkus/addons/mail/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,14 @@ +name: Kogito Add-On User Tasks e-mail +description: Kogito Add-On for e-mail support on Human Tasks. +metadata: + keywords: + - kogito + - processes + - mail + - e-mail + - tasks + - notification + # TODO: add processes guide + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/mail/src/test/java/org/kie/kogito/mail/QuarkusMailSenderTest.java b/quarkus/addons/mail/runtime/src/test/java/org/kie/kogito/mail/QuarkusMailSenderTest.java similarity index 100% rename from quarkus/addons/mail/src/test/java/org/kie/kogito/mail/QuarkusMailSenderTest.java rename to quarkus/addons/mail/runtime/src/test/java/org/kie/kogito/mail/QuarkusMailSenderTest.java diff --git a/quarkus/addons/messaging/common/pom.xml b/quarkus/addons/messaging/common/pom.xml index e6449a66439..4b4c251fec1 100644 --- a/quarkus/addons/messaging/common/pom.xml +++ b/quarkus/addons/messaging/common/pom.xml @@ -8,7 +8,7 @@ 2.0.0-SNAPSHOT kogito-addons-quarkus-messaging-common - Kogito :: Add-Ons :: Messages :: Quarkus:: Common + Kogito Add-On Messaging - Common Common classes for Kogito messaging Add-On (Quarkus) @@ -20,11 +20,6 @@ org.kie.kogito kogito-addons-cloudevents-utils - - javax.inject - javax.inject - provided - com.fasterxml.jackson.core jackson-databind @@ -41,6 +36,19 @@ io.cloudevents cloudevents-json-jackson + + org.slf4j + slf4j-api + + + io.quarkus + quarkus-core + + + javax.inject + javax.inject + provided + @@ -48,24 +56,15 @@ quarkus-reactive-messaging-http true - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - true - io.quarkus quarkus-resteasy true - - - org.slf4j - slf4j-api - - io.quarkus - quarkus-core + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + true diff --git a/quarkus/addons/messaging/deployment/pom.xml b/quarkus/addons/messaging/deployment/pom.xml new file mode 100644 index 00000000000..6b6d32cca09 --- /dev/null +++ b/quarkus/addons/messaging/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-messaging-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-messaging-deployment + Kogito Add-On Messaging - Deployment + + + org.kie.kogito + kogito-addons-quarkus-messaging + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-core-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/messaging/deployment/src/main/java/org/kie/kogito/addon/cloudevents/quarkus/deployment/KogitoAddOnMessagingProcessor.java b/quarkus/addons/messaging/deployment/src/main/java/org/kie/kogito/addon/cloudevents/quarkus/deployment/KogitoAddOnMessagingProcessor.java new file mode 100644 index 00000000000..156e1745ea6 --- /dev/null +++ b/quarkus/addons/messaging/deployment/src/main/java/org/kie/kogito/addon/cloudevents/quarkus/deployment/KogitoAddOnMessagingProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.addon.cloudevents.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnMessagingProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-messaging-extension"; + + KogitoAddOnMessagingProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/messaging/integration-tests/pom.xml b/quarkus/addons/messaging/integration-tests/pom.xml index 860c0ceff7e..6c19e25f2ac 100644 --- a/quarkus/addons/messaging/integration-tests/pom.xml +++ b/quarkus/addons/messaging/integration-tests/pom.xml @@ -8,21 +8,9 @@ 2.0.0-SNAPSHOT kogito-addons-quarkus-messaging-it - Kogito :: Add-Ons :: Messaging :: Quarkus (ITs) + Kogito Add-On Messaging - Integration Tests Integration tests for for Messaging Add-On (Quarkus) - - - - org.kie.kogito - kogito-quarkus-bom - ${project.version} - pom - import - - - - org.kie.kogito diff --git a/quarkus/addons/messaging/pom.xml b/quarkus/addons/messaging/pom.xml index 1f5d7f4c152..c06cdd01e42 100644 --- a/quarkus/addons/messaging/pom.xml +++ b/quarkus/addons/messaging/pom.xml @@ -9,13 +9,13 @@ kogito-addons-quarkus-messaging-parent pom - Kogito :: Add-Ons :: Quarkus :: Messaging - + Kogito Add-On Messaging - Parent Kogito Quarkus Messaging Parent common - implementation + runtime + deployment diff --git a/quarkus/addons/messaging/implementation/pom.xml b/quarkus/addons/messaging/runtime/pom.xml similarity index 53% rename from quarkus/addons/messaging/implementation/pom.xml rename to quarkus/addons/messaging/runtime/pom.xml index eacb0e89103..21b4833576d 100644 --- a/quarkus/addons/messaging/implementation/pom.xml +++ b/quarkus/addons/messaging/runtime/pom.xml @@ -10,7 +10,7 @@ 4.0.0 kogito-addons-quarkus-messaging - Kogito :: Add-Ons :: Messaging :: Quarkus + Kogito Add-On Messaging Kogito Events handling for BPMN messages Add-On (Quarkus) @@ -38,6 +38,37 @@ + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.messaging + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + diff --git a/quarkus/addons/messaging/implementation/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventEmitter.java b/quarkus/addons/messaging/runtime/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventEmitter.java similarity index 100% rename from quarkus/addons/messaging/implementation/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventEmitter.java rename to quarkus/addons/messaging/runtime/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventEmitter.java diff --git a/quarkus/addons/messaging/implementation/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventReceiver.java b/quarkus/addons/messaging/runtime/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventReceiver.java similarity index 100% rename from quarkus/addons/messaging/implementation/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventReceiver.java rename to quarkus/addons/messaging/runtime/src/main/java/org/kie/kogito/addon/quarkus/messaging/QuarkusCloudEventReceiver.java diff --git a/quarkus/addons/messaging/implementation/src/main/resources/META-INF/kogito.addon b/quarkus/addons/messaging/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/messaging/implementation/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/messaging/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..4c92f9ea2fc --- /dev/null +++ b/quarkus/addons/messaging/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,13 @@ +name: Kogito Add-On Process Messaging +description: Kogito Events handling for BPMN messages Add-On +metadata: + keywords: + - kogito + - processes + - messaging + - cloudevents + - bpmn + # TODO: add processes guide + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/monitoring/core/pom.xml b/quarkus/addons/monitoring/core/pom.xml index e8bba0014b5..64502e78f87 100644 --- a/quarkus/addons/monitoring/core/pom.xml +++ b/quarkus/addons/monitoring/core/pom.xml @@ -9,7 +9,7 @@ 4.0.0 kogito-addons-quarkus-monitoring-core - Kogito :: Add-Ons :: Monitoring Core Quarkus + Kogito Add-On Monitoring Core diff --git a/quarkus/addons/monitoring/elastic/deployment/pom.xml b/quarkus/addons/monitoring/elastic/deployment/pom.xml new file mode 100644 index 00000000000..0ce27bc05bc --- /dev/null +++ b/quarkus/addons/monitoring/elastic/deployment/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-monitoring-elastic-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-monitoring-elastic-deployment + Kogito Add-On Monitoring Elastic - Deployment + + + org.kie.kogito + kogito-addons-quarkus-monitoring-elastic + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-core-deployment + + + io.quarkus + quarkus-resteasy-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/monitoring/elastic/deployment/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/deployment/KogitoAddOnMonitoringElasticProcessor.java b/quarkus/addons/monitoring/elastic/deployment/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/deployment/KogitoAddOnMonitoringElasticProcessor.java new file mode 100644 index 00000000000..7f8a48ecfa6 --- /dev/null +++ b/quarkus/addons/monitoring/elastic/deployment/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/deployment/KogitoAddOnMonitoringElasticProcessor.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.monitoring.elastic.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.AnyEngineKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnMonitoringElasticProcessor extends AnyEngineKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-monitoring-elastic-extension"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/monitoring/elastic/pom.xml b/quarkus/addons/monitoring/elastic/pom.xml index 22b678270c0..6165d2f1987 100644 --- a/quarkus/addons/monitoring/elastic/pom.xml +++ b/quarkus/addons/monitoring/elastic/pom.xml @@ -1,30 +1,19 @@ - - + 4.0.0 - kogito-addons-quarkus-monitoring-parent org.kie.kogito + kogito-addons-quarkus-monitoring-parent 2.0.0-SNAPSHOT - 4.0.0 - - kogito-addons-quarkus-monitoring-elastic - Kogito :: Add-Ons :: Monitoring Elastic Quarkus - Monitoring Elastic Quarkus + kogito-addons-quarkus-monitoring-elastic-parent + pom + Kogito Add-On Monitoring Elastic - Parent + Kogito Quarkus Monitoring Elastic Parent - - - io.quarkus - quarkus-core - - - org.kie.kogito - kogito-addons-monitoring-elastic - - - org.kie.kogito - kogito-addons-quarkus-monitoring-core - - - \ No newline at end of file + + runtime + deployment + + diff --git a/quarkus/addons/monitoring/elastic/runtime/pom.xml b/quarkus/addons/monitoring/elastic/runtime/pom.xml new file mode 100644 index 00000000000..4487866fb2e --- /dev/null +++ b/quarkus/addons/monitoring/elastic/runtime/pom.xml @@ -0,0 +1,66 @@ + + + + kogito-addons-quarkus-monitoring-elastic-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-monitoring-elastic + Kogito Add-On Monitoring Elastic + Monitoring Elastic Quarkus + + + + io.quarkus + quarkus-core + + + org.kie.kogito + kogito-addons-monitoring-elastic + + + org.kie.kogito + kogito-addons-quarkus-monitoring-core + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.monitoring.elasticsearch + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/monitoring/elastic/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/QuarkusElasticRegistryProvider.java b/quarkus/addons/monitoring/elastic/runtime/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/QuarkusElasticRegistryProvider.java similarity index 100% rename from quarkus/addons/monitoring/elastic/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/QuarkusElasticRegistryProvider.java rename to quarkus/addons/monitoring/elastic/runtime/src/main/java/org/kie/kogito/monitoring/elastic/quarkus/QuarkusElasticRegistryProvider.java diff --git a/quarkus/addons/monitoring/elastic/src/main/resources/META-INF/beans.xml b/quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/monitoring/elastic/src/main/resources/META-INF/beans.xml rename to quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/monitoring/elastic/src/main/resources/META-INF/kogito.addon b/quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/monitoring/elastic/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..e8eec39aa32 --- /dev/null +++ b/quarkus/addons/monitoring/elastic/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,10 @@ +name: Kogito Add-On Monitoring Elasticsearch +description: Kogito Add-On for Elasticsearch Monitoring +metadata: + keywords: + - kogito + - elasticsearch + - monitoring + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/monitoring/pom.xml b/quarkus/addons/monitoring/pom.xml index 93dbeac9ab7..25aa7dedabb 100644 --- a/quarkus/addons/monitoring/pom.xml +++ b/quarkus/addons/monitoring/pom.xml @@ -10,7 +10,7 @@ 4.0.0 kogito-addons-quarkus-monitoring-parent - Kogito :: Add-Ons :: Quarkus :: Monitoring :: Parent + Kogito Add-On Monitoring - Parent Kogito Monitoring Addons for Quarkus Runtime pom diff --git a/quarkus/addons/monitoring/prometheus/deployment/pom.xml b/quarkus/addons/monitoring/prometheus/deployment/pom.xml new file mode 100644 index 00000000000..aa875a18c1e --- /dev/null +++ b/quarkus/addons/monitoring/prometheus/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-monitoring-prometheus-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-monitoring-prometheus-deployment + Kogito Add-On Monitoring Prometheus - Deployment + + + org.kie.kogito + kogito-addons-quarkus-monitoring-prometheus + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-resteasy-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/monitoring/prometheus/deployment/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/deployment/KogitoAddOnMonitoringPrometheusProcessor.java b/quarkus/addons/monitoring/prometheus/deployment/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/deployment/KogitoAddOnMonitoringPrometheusProcessor.java new file mode 100644 index 00000000000..5603774418b --- /dev/null +++ b/quarkus/addons/monitoring/prometheus/deployment/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/deployment/KogitoAddOnMonitoringPrometheusProcessor.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.monitoring.prometheus.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.AnyEngineKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnMonitoringPrometheusProcessor extends AnyEngineKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-monitoring-prometheus-extension"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/monitoring/prometheus/pom.xml b/quarkus/addons/monitoring/prometheus/pom.xml index 4f9b96106ac..5b213f64174 100644 --- a/quarkus/addons/monitoring/prometheus/pom.xml +++ b/quarkus/addons/monitoring/prometheus/pom.xml @@ -1,43 +1,19 @@ - + 4.0.0 - kogito-addons-quarkus-monitoring-parent org.kie.kogito + kogito-addons-quarkus-monitoring-parent 2.0.0-SNAPSHOT - 4.0.0 - - kogito-addons-quarkus-monitoring-prometheus - Kogito :: Add-Ons :: Monitoring Prometheus Quarkus - - Prometheus monitoring for Quarkus - - - - io.quarkus - quarkus-resteasy - - - org.kie.kogito - kogito-addons-monitoring-prometheus - - - org.kie.kogito - kogito-addons-quarkus-monitoring-core - + kogito-addons-quarkus-monitoring-prometheus-parent + pom + Kogito Add-On Monitoring Prometheus - Parent + Kogito Quarkus Monitoring Prometheus Parent - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.assertj - assertj-core - test - - - \ No newline at end of file + + runtime + deployment + + diff --git a/quarkus/addons/monitoring/prometheus/runtime/pom.xml b/quarkus/addons/monitoring/prometheus/runtime/pom.xml new file mode 100644 index 00000000000..1d85372fbb7 --- /dev/null +++ b/quarkus/addons/monitoring/prometheus/runtime/pom.xml @@ -0,0 +1,78 @@ + + + + kogito-addons-quarkus-monitoring-prometheus-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-monitoring-prometheus + Kogito Add-On Monitoring Prometheus + Prometheus monitoring for Quarkus + + + + io.quarkus + quarkus-resteasy + + + org.kie.kogito + kogito-addons-monitoring-prometheus + + + org.kie.kogito + kogito-addons-quarkus-monitoring-core + + + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.assertj + assertj-core + test + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.monitoring.prometheus + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/monitoring/prometheus/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResource.java b/quarkus/addons/monitoring/prometheus/runtime/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResource.java similarity index 100% rename from quarkus/addons/monitoring/prometheus/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResource.java rename to quarkus/addons/monitoring/prometheus/runtime/src/main/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResource.java diff --git a/quarkus/addons/monitoring/prometheus/src/main/resources/META-INF/beans.xml b/quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/monitoring/prometheus/src/main/resources/META-INF/beans.xml rename to quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/monitoring/prometheus/src/main/resources/META-INF/kogito.addon b/quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/monitoring/prometheus/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..2616e19b037 --- /dev/null +++ b/quarkus/addons/monitoring/prometheus/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,10 @@ +name: Kogito Add-On Monitoring Prometheus +description: Kogito Add-On for Prometheus Monitoring +metadata: + keywords: + - kogito + - prometheus + - monitoring + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/monitoring/prometheus/src/test/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResourceTest.java b/quarkus/addons/monitoring/prometheus/runtime/src/test/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResourceTest.java similarity index 100% rename from quarkus/addons/monitoring/prometheus/src/test/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResourceTest.java rename to quarkus/addons/monitoring/prometheus/runtime/src/test/java/org/kie/kogito/monitoring/prometheus/quarkus/rest/QuarkusMetricsResourceTest.java diff --git a/quarkus/addons/persistence/filesystem/deployment/pom.xml b/quarkus/addons/persistence/filesystem/deployment/pom.xml new file mode 100644 index 00000000000..a69e6bbec82 --- /dev/null +++ b/quarkus/addons/persistence/filesystem/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-filesystem-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-filesystem-deployment + Kogito Add-On Persistence FileSystem - Deployment + + + org.kie.kogito + kogito-addons-quarkus-persistence-filesystem + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-arc-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/persistence/filesystem/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/filesystem/deployment/KogitoAddOnPersistenceFileSystemProcessor.java b/quarkus/addons/persistence/filesystem/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/filesystem/deployment/KogitoAddOnPersistenceFileSystemProcessor.java new file mode 100644 index 00000000000..2535ecba9f7 --- /dev/null +++ b/quarkus/addons/persistence/filesystem/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/filesystem/deployment/KogitoAddOnPersistenceFileSystemProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.addons.quarkus.persistence.filesystem.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnPersistenceFileSystemProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-persistence-filesystem-extension"; + + KogitoAddOnPersistenceFileSystemProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/persistence/filesystem/pom.xml b/quarkus/addons/persistence/filesystem/pom.xml new file mode 100644 index 00000000000..f2fb6cf9618 --- /dev/null +++ b/quarkus/addons/persistence/filesystem/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-filesystem-parent + pom + Kogito Add-On Persistence FileSystem - Parent + Kogito Quarkus Persistence FileSystem Parent + + + runtime + deployment + + diff --git a/quarkus/addons/persistence/filesystem/runtime/pom.xml b/quarkus/addons/persistence/filesystem/runtime/pom.xml new file mode 100644 index 00000000000..e543c6233f2 --- /dev/null +++ b/quarkus/addons/persistence/filesystem/runtime/pom.xml @@ -0,0 +1,80 @@ + + + + + + kogito-addons-quarkus-persistence-filesystem-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-persistence-filesystem + Kogito Add-On Persistence FileSystem + + FileSystem Persistence support for Quarkus + + + + io.quarkus + quarkus-arc + + + + org.kie.kogito + kogito-addons-persistence-filesystem + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.persistence.filesystem + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/persistence/filesystem/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/persistence/filesystem/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..76f231f55b8 --- /dev/null +++ b/quarkus/addons/persistence/filesystem/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Persistence FileSystem +description: Kogito Add-On support for persistence on FileSystem +metadata: + keywords: + - kogito + - persistence + - filesystem + - process + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/persistence/infinispan/deployment/pom.xml b/quarkus/addons/persistence/infinispan/deployment/pom.xml new file mode 100644 index 00000000000..bf178fbbf52 --- /dev/null +++ b/quarkus/addons/persistence/infinispan/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-infinispan-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-infinispan-deployment + Kogito Add-On Persistence Infinispan - Deployment + + + org.kie.kogito + kogito-addons-quarkus-persistence-infinispan + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-infinispan-client-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/persistence/infinispan/deployment/src/main/java/org/kie/kogito/infinispan/quarkus/deployment/KogitoAddOnPersistenceInfinispanProcessor.java b/quarkus/addons/persistence/infinispan/deployment/src/main/java/org/kie/kogito/infinispan/quarkus/deployment/KogitoAddOnPersistenceInfinispanProcessor.java new file mode 100644 index 00000000000..533d6020db9 --- /dev/null +++ b/quarkus/addons/persistence/infinispan/deployment/src/main/java/org/kie/kogito/infinispan/quarkus/deployment/KogitoAddOnPersistenceInfinispanProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.infinispan.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnPersistenceInfinispanProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-persistence-infinispan-extension"; + + KogitoAddOnPersistenceInfinispanProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/persistence/infinispan-health/pom.xml b/quarkus/addons/persistence/infinispan/health/pom.xml similarity index 89% rename from quarkus/addons/persistence/infinispan-health/pom.xml rename to quarkus/addons/persistence/infinispan/health/pom.xml index 54601779a93..189df0cc110 100644 --- a/quarkus/addons/persistence/infinispan-health/pom.xml +++ b/quarkus/addons/persistence/infinispan/health/pom.xml @@ -19,17 +19,16 @@ 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"> - kogito-addons-quarkus-persistence-parent + kogito-addons-quarkus-persistence-infinispan-parent org.kie.kogito 2.0.0-SNAPSHOT 4.0.0 - kogito-addons-quarkus-persistence-infinispan-health - Kogito :: Add-Ons :: Persistence :: Infinispan Health Check for Quarkus + Kogito Add-On Persistence Infinispan Health Check - Infinispan Health Check for Quarkus + Infinispan Health Check support for Quarkus diff --git a/quarkus/addons/persistence/infinispan-health/src/main/java/org/kie/kogito/infinispan/health/InfinispanHealthCheck.java b/quarkus/addons/persistence/infinispan/health/src/main/java/org/kie/kogito/infinispan/health/InfinispanHealthCheck.java similarity index 100% rename from quarkus/addons/persistence/infinispan-health/src/main/java/org/kie/kogito/infinispan/health/InfinispanHealthCheck.java rename to quarkus/addons/persistence/infinispan/health/src/main/java/org/kie/kogito/infinispan/health/InfinispanHealthCheck.java diff --git a/quarkus/addons/persistence/infinispan-health/src/test/java/org/kie/kogito/infinispan/health/InfinispanHealthCheckIT.java b/quarkus/addons/persistence/infinispan/health/src/test/java/org/kie/kogito/infinispan/health/InfinispanHealthCheckIT.java similarity index 100% rename from quarkus/addons/persistence/infinispan-health/src/test/java/org/kie/kogito/infinispan/health/InfinispanHealthCheckIT.java rename to quarkus/addons/persistence/infinispan/health/src/test/java/org/kie/kogito/infinispan/health/InfinispanHealthCheckIT.java diff --git a/quarkus/addons/persistence/infinispan/pom.xml b/quarkus/addons/persistence/infinispan/pom.xml new file mode 100644 index 00000000000..15a79740734 --- /dev/null +++ b/quarkus/addons/persistence/infinispan/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-infinispan-parent + pom + Kogito Add-On Persistence Infinispan - Parent + Kogito Quarkus Persistence Infinispan Parent + + + runtime + deployment + health + + diff --git a/quarkus/addons/persistence/infinispan/runtime/pom.xml b/quarkus/addons/persistence/infinispan/runtime/pom.xml new file mode 100644 index 00000000000..02e749914c2 --- /dev/null +++ b/quarkus/addons/persistence/infinispan/runtime/pom.xml @@ -0,0 +1,80 @@ + + + + + + kogito-addons-quarkus-persistence-infinispan-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-persistence-infinispan + Kogito Add-On Persistence Infinispan + + Infinispan Persistence support for Quarkus + + + + io.quarkus + quarkus-infinispan-client + + + + org.kie.kogito + kogito-addons-persistence-infinispan + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.persistence.infinispan + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/persistence/infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/persistence/infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..99613f5f90f --- /dev/null +++ b/quarkus/addons/persistence/infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Persistence Infinispan +description: Kogito Add-On support for persistence on Infinispan +metadata: + keywords: + - kogito + - persistence + - infinispan + - process + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/persistence/jdbc/deployment/pom.xml b/quarkus/addons/persistence/jdbc/deployment/pom.xml new file mode 100644 index 00000000000..d96702a1ab9 --- /dev/null +++ b/quarkus/addons/persistence/jdbc/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-jdbc-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-jdbc-deployment + Kogito Add-On Persistence JDBC - Deployment + + + org.kie.kogito + kogito-addons-quarkus-persistence-jdbc + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-arc-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/persistence/jdbc/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/jdbc/deployment/KogitoAddOnPersistenceJDBCProcessor.java b/quarkus/addons/persistence/jdbc/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/jdbc/deployment/KogitoAddOnPersistenceJDBCProcessor.java new file mode 100644 index 00000000000..152e6ee6e61 --- /dev/null +++ b/quarkus/addons/persistence/jdbc/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/jdbc/deployment/KogitoAddOnPersistenceJDBCProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.addons.quarkus.persistence.jdbc.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnPersistenceJDBCProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-persistence-jdbc-extension"; + + KogitoAddOnPersistenceJDBCProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/persistence/jdbc/pom.xml b/quarkus/addons/persistence/jdbc/pom.xml new file mode 100644 index 00000000000..776ed4adb80 --- /dev/null +++ b/quarkus/addons/persistence/jdbc/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-jdbc-parent + pom + Kogito Add-On Persistence JDBC - Parent + Kogito Quarkus Persistence JDBC Parent + + + runtime + deployment + + diff --git a/quarkus/addons/persistence/jdbc/runtime/pom.xml b/quarkus/addons/persistence/jdbc/runtime/pom.xml new file mode 100644 index 00000000000..31df8178159 --- /dev/null +++ b/quarkus/addons/persistence/jdbc/runtime/pom.xml @@ -0,0 +1,80 @@ + + + + + + kogito-addons-quarkus-persistence-jdbc-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-persistence-jdbc + Kogito Add-On Persistence JDBC + + JDBC Persistence support for Quarkus + + + + io.quarkus + quarkus-arc + + + + org.kie.kogito + kogito-addons-persistence-jdbc + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.persistence.jdbc + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/persistence/jdbc/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/persistence/jdbc/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..6dab3070a59 --- /dev/null +++ b/quarkus/addons/persistence/jdbc/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Persistence JDBC +description: Kogito Add-On support for persistence on JDBC +metadata: + keywords: + - kogito + - persistence + - jdbc + - process + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/persistence/kafka/deployment/pom.xml b/quarkus/addons/persistence/kafka/deployment/pom.xml new file mode 100644 index 00000000000..c8e3ad3c42f --- /dev/null +++ b/quarkus/addons/persistence/kafka/deployment/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-kafka-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-kafka-deployment + Kogito Add-On Persistence Kafka Streams - Deployment + + + org.kie.kogito + kogito-addons-quarkus-persistence-kafka + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-kafka-streams-deployment + runtime + + + io.quarkus + quarkus-kafka-client-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/persistence/kafka/deployment/src/main/java/org/kie/kogito/persistence/kafka/quarkus/deployment/KogitoAddOnPersistenceKafkaProcessor.java b/quarkus/addons/persistence/kafka/deployment/src/main/java/org/kie/kogito/persistence/kafka/quarkus/deployment/KogitoAddOnPersistenceKafkaProcessor.java new file mode 100644 index 00000000000..03ed48107e9 --- /dev/null +++ b/quarkus/addons/persistence/kafka/deployment/src/main/java/org/kie/kogito/persistence/kafka/quarkus/deployment/KogitoAddOnPersistenceKafkaProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.persistence.kafka.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnPersistenceKafkaProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-persistence-kafka-extension"; + + KogitoAddOnPersistenceKafkaProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/persistence/kafka/pom.xml b/quarkus/addons/persistence/kafka/pom.xml index 45051b2efb7..e18c60d2948 100644 --- a/quarkus/addons/persistence/kafka/pom.xml +++ b/quarkus/addons/persistence/kafka/pom.xml @@ -1,125 +1,19 @@ - - - - + 4.0.0 org.kie.kogito kogito-addons-quarkus-persistence-parent 2.0.0-SNAPSHOT - 4.0.0 - - kogito-addons-quarkus-persistence-kafka - Kogito :: Add-Ons :: Persistence :: Kafka Streams - Kafka Streams based persistence for Kogito - - - - org.kie.kogito - process-serialization-protobuf - - - io.quarkus - quarkus-kafka-streams - runtime - - - io.quarkus - quarkus-kafka-client - - - org.apache.kafka - kafka-streams - - - org.kie.kogito - jbpm-flow - - - org.kie.kogito - jbpm-bpmn2 - test - - - org.kie.kogito - kogito-quarkus-test-utils - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.assertj - assertj-core - test - - - org.awaitility - awaitility - test - - - org.mockito - mockito-junit-jupiter - test - - - org.mockito - mockito-core - test - - - - - - - org.jboss.jandex - jandex-maven-plugin - - - make-index - - jandex - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - ${container.image.kafka} - - - - - - integration-test - verify - - - - - - + kogito-addons-quarkus-persistence-kafka-parent + pom + Kogito Add-On Persistence Kafka Streams - Parent + Kogito Quarkus Persistence Kafka Parent - \ No newline at end of file + + runtime + deployment + + diff --git a/quarkus/addons/persistence/kafka/runtime/pom.xml b/quarkus/addons/persistence/kafka/runtime/pom.xml new file mode 100644 index 00000000000..800a729411d --- /dev/null +++ b/quarkus/addons/persistence/kafka/runtime/pom.xml @@ -0,0 +1,156 @@ + + + + + + org.kie.kogito + kogito-addons-quarkus-persistence-kafka-parent + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-persistence-kafka + Kogito Add-On Persistence Kafka Streams + Kafka Streams based persistence for Kogito + + + + org.kie.kogito + process-serialization-protobuf + + + io.quarkus + quarkus-kafka-streams + runtime + + + io.quarkus + quarkus-kafka-client + + + org.apache.kafka + kafka-streams + + + org.kie.kogito + jbpm-flow + + + org.kie.kogito + jbpm-bpmn2 + test + + + org.kie.kogito + kogito-quarkus-test-utils + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.assertj + assertj-core + test + + + org.awaitility + awaitility + test + + + org.mockito + mockito-junit-jupiter + test + + + org.mockito + mockito-core + test + + + + + + + org.jboss.jandex + jandex-maven-plugin + + + make-index + + jandex + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + ${container.image.kafka} + + + + + + integration-test + verify + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.persistence.kafka + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/KogitoProcessInstancesFactory.java b/quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/KogitoProcessInstancesFactory.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/KogitoProcessInstancesFactory.java rename to quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/KogitoProcessInstancesFactory.java diff --git a/quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtils.java b/quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtils.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtils.java rename to quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtils.java diff --git a/quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/kafka/KafkaProcessInstances.java b/quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/kafka/KafkaProcessInstances.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/kafka/KafkaProcessInstances.java rename to quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/kafka/KafkaProcessInstances.java diff --git a/quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListener.java b/quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListener.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/main/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListener.java rename to quarkus/addons/persistence/kafka/runtime/src/main/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListener.java diff --git a/quarkus/addons/persistence/kafka/src/main/resources/META-INF/kogito.addon b/quarkus/addons/persistence/kafka/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/persistence/kafka/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/persistence/kafka/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/persistence/kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/persistence/kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..b5f7249aefc --- /dev/null +++ b/quarkus/addons/persistence/kafka/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Persistence Kafka +description: Kogito Add-On support for persistence on Kafka +metadata: + keywords: + - kogito + - persistence + - kafka + - process + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/KogitoProcessInstancesFactoryTest.java b/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/KogitoProcessInstancesFactoryTest.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/KogitoProcessInstancesFactoryTest.java rename to quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/KogitoProcessInstancesFactoryTest.java diff --git a/quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtilsTest.java b/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtilsTest.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtilsTest.java rename to quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaPersistenceUtilsTest.java diff --git a/quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java b/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java rename to quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java diff --git a/quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesTest.java b/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesTest.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesTest.java rename to quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesTest.java diff --git a/quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListenerTest.java b/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListenerTest.java similarity index 100% rename from quarkus/addons/persistence/kafka/src/test/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListenerTest.java rename to quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaStreamsStateListenerTest.java diff --git a/quarkus/addons/persistence/kafka/src/test/resources/BPMN2-UserTask-Script.bpmn2 b/quarkus/addons/persistence/kafka/runtime/src/test/resources/BPMN2-UserTask-Script.bpmn2 similarity index 100% rename from quarkus/addons/persistence/kafka/src/test/resources/BPMN2-UserTask-Script.bpmn2 rename to quarkus/addons/persistence/kafka/runtime/src/test/resources/BPMN2-UserTask-Script.bpmn2 diff --git a/quarkus/addons/persistence/kafka/src/test/resources/BPMN2-UserTask.bpmn2 b/quarkus/addons/persistence/kafka/runtime/src/test/resources/BPMN2-UserTask.bpmn2 similarity index 100% rename from quarkus/addons/persistence/kafka/src/test/resources/BPMN2-UserTask.bpmn2 rename to quarkus/addons/persistence/kafka/runtime/src/test/resources/BPMN2-UserTask.bpmn2 diff --git a/quarkus/addons/persistence/mongodb/deployment/pom.xml b/quarkus/addons/persistence/mongodb/deployment/pom.xml new file mode 100644 index 00000000000..2116170cae3 --- /dev/null +++ b/quarkus/addons/persistence/mongodb/deployment/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-mongodb-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-mongodb-deployment + Kogito Add-On Persistence MongoDB - Deployment + + + org.kie.kogito + kogito-addons-quarkus-persistence-mongodb + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-arc-deployment + + + io.quarkus + quarkus-mongodb-client-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/persistence/mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/mongodb/deployment/KogitoAddOnPersistenceMongoDBProcessor.java b/quarkus/addons/persistence/mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/mongodb/deployment/KogitoAddOnPersistenceMongoDBProcessor.java new file mode 100644 index 00000000000..6b5a515b54d --- /dev/null +++ b/quarkus/addons/persistence/mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/mongodb/deployment/KogitoAddOnPersistenceMongoDBProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.addons.quarkus.persistence.mongodb.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnPersistenceMongoDBProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-persistence-mongodb-extension"; + + KogitoAddOnPersistenceMongoDBProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/persistence/mongodb/pom.xml b/quarkus/addons/persistence/mongodb/pom.xml new file mode 100644 index 00000000000..87954ca857d --- /dev/null +++ b/quarkus/addons/persistence/mongodb/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-mongodb-parent + pom + Kogito Add-On Persistence MongoDB - Parent + Kogito Quarkus Persistence MongoDB Parent + + + runtime + deployment + + diff --git a/quarkus/addons/persistence/mongodb/runtime/pom.xml b/quarkus/addons/persistence/mongodb/runtime/pom.xml new file mode 100644 index 00000000000..d785239d50e --- /dev/null +++ b/quarkus/addons/persistence/mongodb/runtime/pom.xml @@ -0,0 +1,84 @@ + + + + + + kogito-addons-quarkus-persistence-mongodb-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-persistence-mongodb + Kogito Add-On Persistence MongoDB + + MongoDB Persistence support for Quarkus + + + + io.quarkus + quarkus-arc + + + + org.kie.kogito + kogito-addons-persistence-mongodb + + + io.quarkus + quarkus-mongodb-client + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.persistence.mongodb + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/persistence/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/persistence/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..8e4ea6d493b --- /dev/null +++ b/quarkus/addons/persistence/mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Persistence MongoDB +description: Kogito Add-On support for persistence on MongoDB +metadata: + keywords: + - kogito + - persistence + - mongodb + - process + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/persistence/pom.xml b/quarkus/addons/persistence/pom.xml index cb37dace4ff..b2e637d1acd 100644 --- a/quarkus/addons/persistence/pom.xml +++ b/quarkus/addons/persistence/pom.xml @@ -1,6 +1,6 @@ - kogito-addons-quarkus-parent @@ -10,13 +10,17 @@ 4.0.0 kogito-addons-quarkus-persistence-parent - Kogito :: Add-Ons :: Quarkus :: Persistence + Kogito Add-On Quarkus Persistence Kogito Persistence Addons for Quarkus Runtime pom - infinispan-health + infinispan kafka + filesystem + jdbc + mongodb + postgresql \ No newline at end of file diff --git a/quarkus/addons/persistence/postgresql/deployment/pom.xml b/quarkus/addons/persistence/postgresql/deployment/pom.xml new file mode 100644 index 00000000000..65ed026768d --- /dev/null +++ b/quarkus/addons/persistence/postgresql/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-postgresql-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-postgresql-deployment + Kogito Add-On Persistence PostgreSQL - Deployment + + + org.kie.kogito + kogito-addons-quarkus-persistence-postgresql + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-arc-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/persistence/postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/postgresql/deployment/KogitoAddOnPersistencePostgreSQLProcessor.java b/quarkus/addons/persistence/postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/postgresql/deployment/KogitoAddOnPersistencePostgreSQLProcessor.java new file mode 100644 index 00000000000..989c7d5411a --- /dev/null +++ b/quarkus/addons/persistence/postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/persistence/postgresql/deployment/KogitoAddOnPersistencePostgreSQLProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.addons.quarkus.persistence.postgresql.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnPersistencePostgreSQLProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-persistence-postgresql-extension"; + + KogitoAddOnPersistencePostgreSQLProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/persistence/postgresql/pom.xml b/quarkus/addons/persistence/postgresql/pom.xml new file mode 100644 index 00000000000..7b5043c0d8d --- /dev/null +++ b/quarkus/addons/persistence/postgresql/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-persistence-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-persistence-postgresql-parent + pom + Kogito Add-On Persistence PostgreSQL - Parent + Kogito Quarkus Persistence PostgreSQL Parent + + + runtime + deployment + + diff --git a/quarkus/addons/persistence/postgresql/runtime/pom.xml b/quarkus/addons/persistence/postgresql/runtime/pom.xml new file mode 100644 index 00000000000..d7a90b1a688 --- /dev/null +++ b/quarkus/addons/persistence/postgresql/runtime/pom.xml @@ -0,0 +1,80 @@ + + + + + + kogito-addons-quarkus-persistence-postgresql-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-persistence-postgresql + Kogito Add-On Persistence PostgreSQL + + PostgreSQL Persistence support for Quarkus + + + + io.quarkus + quarkus-arc + + + + org.kie.kogito + kogito-addons-persistence-postgresql + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.persistence.postgresql + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/persistence/postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/persistence/postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..a8faf4cff25 --- /dev/null +++ b/quarkus/addons/persistence/postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Persistence PostgreSQL +description: Kogito Add-On support for persistence on PostgreSQL +metadata: + keywords: + - kogito + - persistence + - postgresql + - process + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/pom.xml b/quarkus/addons/pom.xml index 385acc8b4e8..fb36819100a 100644 --- a/quarkus/addons/pom.xml +++ b/quarkus/addons/pom.xml @@ -3,21 +3,23 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - quarkus + kogito-quarkus-bom org.kie.kogito 2.0.0-SNAPSHOT + ../bom/pom.xml 4.0.0 kogito-addons-quarkus-parent Kogito :: Add-Ons :: Quarkus - Parent Module for Kogito Quarkus Addons + Parent Module for Kogito Quarkus Add-Ons. All add-ons are Quarkus Extensions. pom events messaging monitoring + common @@ -54,15 +56,41 @@ - - - - org.kie.kogito - kogito-quarkus-bom - ${project.version} - pom - import - - - + + + + + io.quarkus + quarkus-maven-plugin + ${version.io.quarkus} + + + maven-surefire-plugin + ${version.surefire.plugin} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-failsafe-plugin + ${version.failsafe.plugin} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-compiler-plugin + ${version.compiler.plugin} + + + + \ No newline at end of file diff --git a/quarkus/addons/process-management/deployment/pom.xml b/quarkus/addons/process-management/deployment/pom.xml new file mode 100644 index 00000000000..a145b634c1d --- /dev/null +++ b/quarkus/addons/process-management/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-process-management-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-process-management-deployment + Kogito Add-On Process Management - Deployment + + + org.kie.kogito + kogito-addons-quarkus-process-management + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-arc-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/process-management/deployment/src/main/java/org/kie/kogito/process/management/deployment/KogitoAddOnProcessManagementProcessor.java b/quarkus/addons/process-management/deployment/src/main/java/org/kie/kogito/process/management/deployment/KogitoAddOnProcessManagementProcessor.java new file mode 100644 index 00000000000..3ca2615507c --- /dev/null +++ b/quarkus/addons/process-management/deployment/src/main/java/org/kie/kogito/process/management/deployment/KogitoAddOnProcessManagementProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.process.management.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnProcessManagementProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-process-management-extension"; + + KogitoAddOnProcessManagementProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/process-management/pom.xml b/quarkus/addons/process-management/pom.xml index fa5c0fc585c..120a2fcf446 100644 --- a/quarkus/addons/process-management/pom.xml +++ b/quarkus/addons/process-management/pom.xml @@ -1,69 +1,21 @@ - - 4.0.0 + + - org.kie.kogito kogito-addons-quarkus-parent + org.kie.kogito 2.0.0-SNAPSHOT - kogito-addons-quarkus-process-management - Kogito :: Add-Ons :: Process Management :: Quarkus Addon - Management of process instances for Quarkus + 4.0.0 + + kogito-addons-quarkus-process-management-parent + Kogito Add-On Process Management - Parent + pom - - - org.kie.kogito - kogito-addons-process-management - - - org.kie.kogito - kogito-api - - - org.kie.kogito - jbpm-flow - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - provided - - - javax.inject - javax.inject - provided - + + deployment + runtime + - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.assertj - assertj-core - test - - - org.mockito - mockito-junit-jupiter - test - - - ch.qos.logback - logback-classic - test - - - javax.xml.bind - jaxb-api - test - - - org.kie.kogito - kogito-addons-quarkus-rest-exception-handler - - \ No newline at end of file diff --git a/quarkus/addons/process-management/runtime/pom.xml b/quarkus/addons/process-management/runtime/pom.xml new file mode 100644 index 00000000000..234f3acd160 --- /dev/null +++ b/quarkus/addons/process-management/runtime/pom.xml @@ -0,0 +1,104 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-process-management-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-process-management + Kogito Add-On Process Management + Management of process instances for Quarkus + + + + io.quarkus + quarkus-arc + + + org.kie.kogito + kogito-addons-process-management + + + org.kie.kogito + kogito-api + + + org.kie.kogito + kogito-addons-quarkus-rest-exception-handler + + + org.kie.kogito + jbpm-flow + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + provided + + + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.assertj + assertj-core + test + + + org.mockito + mockito-junit-jupiter + test + + + ch.qos.logback + logback-classic + test + + + javax.xml.bind + jaxb-api + test + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.process.management + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/process-management/src/main/java/org/kie/kogito/process/management/ProcessInstanceManagementResource.java b/quarkus/addons/process-management/runtime/src/main/java/org/kie/kogito/process/management/ProcessInstanceManagementResource.java similarity index 100% rename from quarkus/addons/process-management/src/main/java/org/kie/kogito/process/management/ProcessInstanceManagementResource.java rename to quarkus/addons/process-management/runtime/src/main/java/org/kie/kogito/process/management/ProcessInstanceManagementResource.java diff --git a/quarkus/addons/process-management/src/main/resources/META-INF/beans.xml b/quarkus/addons/process-management/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/process-management/src/main/resources/META-INF/beans.xml rename to quarkus/addons/process-management/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/process-management/src/main/resources/META-INF/kogito.addon b/quarkus/addons/process-management/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/process-management/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/process-management/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/process-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/process-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..8751a132425 --- /dev/null +++ b/quarkus/addons/process-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,10 @@ +name: Kogito Add-On Process Management +description: Kogito Process Management REST API +metadata: + keywords: + - kogito + - process + - management + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/process-management/src/test/java/org/kie/kogito/process/management/ProcessInstanceManagementResourceTest.java b/quarkus/addons/process-management/runtime/src/test/java/org/kie/kogito/process/management/ProcessInstanceManagementResourceTest.java similarity index 100% rename from quarkus/addons/process-management/src/test/java/org/kie/kogito/process/management/ProcessInstanceManagementResourceTest.java rename to quarkus/addons/process-management/runtime/src/test/java/org/kie/kogito/process/management/ProcessInstanceManagementResourceTest.java diff --git a/quarkus/addons/process-management/src/test/resources/logback-test.xml b/quarkus/addons/process-management/runtime/src/test/resources/logback-test.xml similarity index 100% rename from quarkus/addons/process-management/src/test/resources/logback-test.xml rename to quarkus/addons/process-management/runtime/src/test/resources/logback-test.xml diff --git a/quarkus/addons/process-svg/deployment/pom.xml b/quarkus/addons/process-svg/deployment/pom.xml new file mode 100644 index 00000000000..b7c0983a531 --- /dev/null +++ b/quarkus/addons/process-svg/deployment/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-process-svg-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-process-svg-deployment + Kogito Add-On Process SVG - Deployment + + + org.kie.kogito + kogito-addons-quarkus-process-svg + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-resteasy-deployment + + + io.quarkus + quarkus-security-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/process-svg/deployment/src/main/java/org/kie/kogito/svg/deployment/KogitoAddOnProcessSVGProcessor.java b/quarkus/addons/process-svg/deployment/src/main/java/org/kie/kogito/svg/deployment/KogitoAddOnProcessSVGProcessor.java new file mode 100644 index 00000000000..a5459c6612e --- /dev/null +++ b/quarkus/addons/process-svg/deployment/src/main/java/org/kie/kogito/svg/deployment/KogitoAddOnProcessSVGProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.svg.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnProcessSVGProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-process-svg-extension"; + + KogitoAddOnProcessSVGProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/process-svg/pom.xml b/quarkus/addons/process-svg/pom.xml index 5aef7e843ff..5fa2ebc8cd9 100644 --- a/quarkus/addons/process-svg/pom.xml +++ b/quarkus/addons/process-svg/pom.xml @@ -1,57 +1,21 @@ + - 4.0.0 - org.kie.kogito kogito-addons-quarkus-parent + org.kie.kogito 2.0.0-SNAPSHOT - kogito-addons-quarkus-process-svg - Kogito :: Add-Ons :: Process SVG :: Quarkus Addon - - Quarkus Addon to interact with Process SVG Service + 4.0.0 - - - org.kie.kogito - kogito-addons-process-svg - - - io.quarkus - quarkus-resteasy - - - io.quarkus - quarkus-security - - - io.vertx - vertx-web-client - + kogito-addons-quarkus-process-svg-parent + Kogito Add-On Process SVG - Parent + pom - - - io.quarkus - quarkus-junit5 - test - - - org.mockito - mockito-junit-jupiter - test - - - net.javacrumbs.json-unit - json-unit-assertj - test - - - org.kie.kogito - kogito-addons-process-svg - test-jar - test - + + deployment + runtime + - - + \ No newline at end of file diff --git a/quarkus/addons/process-svg/runtime/pom.xml b/quarkus/addons/process-svg/runtime/pom.xml new file mode 100644 index 00000000000..223f8db2e64 --- /dev/null +++ b/quarkus/addons/process-svg/runtime/pom.xml @@ -0,0 +1,92 @@ + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-process-svg-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-process-svg + Kogito Add-On Process SVG + + Quarkus Addon to interact with Process SVG Service + + + + org.kie.kogito + kogito-addons-process-svg + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-security + + + io.vertx + vertx-web-client + + + + + io.quarkus + quarkus-junit5 + test + + + org.mockito + mockito-junit-jupiter + test + + + net.javacrumbs.json-unit + json-unit-assertj + test + + + org.kie.kogito + kogito-addons-process-svg + test-jar + test + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.process.svg + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/process-svg/src/main/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClient.java b/quarkus/addons/process-svg/runtime/src/main/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClient.java similarity index 100% rename from quarkus/addons/process-svg/src/main/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClient.java rename to quarkus/addons/process-svg/runtime/src/main/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClient.java diff --git a/quarkus/addons/process-svg/src/main/java/org/kie/kogito/svg/rest/ProcessSvgResource.java b/quarkus/addons/process-svg/runtime/src/main/java/org/kie/kogito/svg/rest/ProcessSvgResource.java similarity index 100% rename from quarkus/addons/process-svg/src/main/java/org/kie/kogito/svg/rest/ProcessSvgResource.java rename to quarkus/addons/process-svg/runtime/src/main/java/org/kie/kogito/svg/rest/ProcessSvgResource.java diff --git a/quarkus/addons/process-svg/src/main/java/org/kie/kogito/svg/service/QuarkusProcessSvgService.java b/quarkus/addons/process-svg/runtime/src/main/java/org/kie/kogito/svg/service/QuarkusProcessSvgService.java similarity index 100% rename from quarkus/addons/process-svg/src/main/java/org/kie/kogito/svg/service/QuarkusProcessSvgService.java rename to quarkus/addons/process-svg/runtime/src/main/java/org/kie/kogito/svg/service/QuarkusProcessSvgService.java diff --git a/quarkus/addons/process-svg/src/main/resources/META-INF/beans.xml b/quarkus/addons/process-svg/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/process-svg/src/main/resources/META-INF/beans.xml rename to quarkus/addons/process-svg/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/process-svg/src/main/resources/META-INF/kogito.addon b/quarkus/addons/process-svg/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/process-svg/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/process-svg/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/process-svg/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/process-svg/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..fa6cdea31ea --- /dev/null +++ b/quarkus/addons/process-svg/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,10 @@ +name: Kogito Add-On Process SVG +description: Kogito Add-On for SVG process generation +metadata: + keywords: + - kogito + - process + - svg + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/process-svg/src/test/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClientTest.java b/quarkus/addons/process-svg/runtime/src/test/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClientTest.java similarity index 100% rename from quarkus/addons/process-svg/src/test/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClientTest.java rename to quarkus/addons/process-svg/runtime/src/test/java/org/kie/kogito/svg/dataindex/QuarkusDataIndexClientTest.java diff --git a/quarkus/addons/process-svg/src/test/java/org/kie/kogito/svg/rest/ProcessSvgResourceTest.java b/quarkus/addons/process-svg/runtime/src/test/java/org/kie/kogito/svg/rest/ProcessSvgResourceTest.java similarity index 100% rename from quarkus/addons/process-svg/src/test/java/org/kie/kogito/svg/rest/ProcessSvgResourceTest.java rename to quarkus/addons/process-svg/runtime/src/test/java/org/kie/kogito/svg/rest/ProcessSvgResourceTest.java diff --git a/quarkus/addons/process-svg/src/test/java/org/kie/kogito/svg/service/QuarkusProcessSvgServiceTest.java b/quarkus/addons/process-svg/runtime/src/test/java/org/kie/kogito/svg/service/QuarkusProcessSvgServiceTest.java similarity index 100% rename from quarkus/addons/process-svg/src/test/java/org/kie/kogito/svg/service/QuarkusProcessSvgServiceTest.java rename to quarkus/addons/process-svg/runtime/src/test/java/org/kie/kogito/svg/service/QuarkusProcessSvgServiceTest.java diff --git a/quarkus/addons/process-svg/src/test/resources/META-INF/processSVG/travels.svg b/quarkus/addons/process-svg/runtime/src/test/resources/META-INF/processSVG/travels.svg similarity index 100% rename from quarkus/addons/process-svg/src/test/resources/META-INF/processSVG/travels.svg rename to quarkus/addons/process-svg/runtime/src/test/resources/META-INF/processSVG/travels.svg diff --git a/quarkus/addons/process-svg/src/test/resources/travels-expected.svg b/quarkus/addons/process-svg/runtime/src/test/resources/travels-expected.svg similarity index 100% rename from quarkus/addons/process-svg/src/test/resources/travels-expected.svg rename to quarkus/addons/process-svg/runtime/src/test/resources/travels-expected.svg diff --git a/quarkus/addons/task-management/deployment/pom.xml b/quarkus/addons/task-management/deployment/pom.xml new file mode 100644 index 00000000000..b52153e73ce --- /dev/null +++ b/quarkus/addons/task-management/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-task-management-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-task-management-deployment + Kogito Add-On Task Management - Deployment + + + org.kie.kogito + kogito-addons-quarkus-task-management + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-arc-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/task-management/deployment/src/main/java/org/kie/kogito/task/management/deployment/KogitoAddOnTaskManagementProcessor.java b/quarkus/addons/task-management/deployment/src/main/java/org/kie/kogito/task/management/deployment/KogitoAddOnTaskManagementProcessor.java new file mode 100644 index 00000000000..ab3dd6c082b --- /dev/null +++ b/quarkus/addons/task-management/deployment/src/main/java/org/kie/kogito/task/management/deployment/KogitoAddOnTaskManagementProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.task.management.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnTaskManagementProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-task-management-extension"; + + KogitoAddOnTaskManagementProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/task-management/pom.xml b/quarkus/addons/task-management/pom.xml index 29de06bc3b9..51ee637298c 100644 --- a/quarkus/addons/task-management/pom.xml +++ b/quarkus/addons/task-management/pom.xml @@ -1,95 +1,21 @@ - - 4.0.0 - org.kie.kogito kogito-addons-quarkus-parent + org.kie.kogito 2.0.0-SNAPSHOT - kogito-addons-quarkus-task-management - Kogito :: Add-Ons :: Task Management :: Quarkus Addon - Management of process instances for Quarkus + 4.0.0 - - - org.kie.kogito - kogito-addons-task-management - - - org.kie.kogito - kogito-addons-quarkus-rest-exception-handler - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - provided - - - javax.inject - javax.inject - provided - - - javax.annotation - javax.annotation-api - provided - - - io.quarkus - quarkus-junit5 - test - - - io.rest-assured - rest-assured - test - - - io.rest-assured - json-schema-validator - test - - - org.mockito - mockito-junit-jupiter - test - - - ch.qos.logback - logback-classic - test - - + kogito-addons-quarkus-task-management-parent + Kogito Add-On Task Management - Parent + pom + + deployment + runtime + - - - - io.quarkus - quarkus-maven-plugin - - - - build - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org/kie/kogito/task/management/test/* - - - org.jboss.logmanager.LogManager - ${container.image.infinispan} - - - - - \ No newline at end of file diff --git a/quarkus/addons/task-management/runtime/pom.xml b/quarkus/addons/task-management/runtime/pom.xml new file mode 100644 index 00000000000..91ab306cbb9 --- /dev/null +++ b/quarkus/addons/task-management/runtime/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-task-management-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-task-management + Kogito Add-On Task Management + Management of process instances for Quarkus + + + + org.kie.kogito + kogito-addons-task-management + + + org.kie.kogito + kogito-addons-quarkus-rest-exception-handler + + + io.quarkus + quarkus-arc + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + provided + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + io.rest-assured + json-schema-validator + test + + + org.mockito + mockito-junit-jupiter + test + + + ch.qos.logback + logback-classic + test + + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.task.management + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + io.quarkus + quarkus-maven-plugin + + + + build + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + org/kie/kogito/task/management/test/* + + + org.jboss.logmanager.LogManager + ${container.image.infinispan} + + + + + + \ No newline at end of file diff --git a/quarkus/addons/task-management/src/main/java/org/kie/kogito/task/management/TaskManagementResource.java b/quarkus/addons/task-management/runtime/src/main/java/org/kie/kogito/task/management/TaskManagementResource.java similarity index 100% rename from quarkus/addons/task-management/src/main/java/org/kie/kogito/task/management/TaskManagementResource.java rename to quarkus/addons/task-management/runtime/src/main/java/org/kie/kogito/task/management/TaskManagementResource.java diff --git a/quarkus/addons/task-management/src/main/resources/META-INF/beans.xml b/quarkus/addons/task-management/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/task-management/src/main/resources/META-INF/beans.xml rename to quarkus/addons/task-management/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/task-management/src/main/resources/META-INF/kogito.addon b/quarkus/addons/task-management/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/task-management/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/task-management/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/task-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/task-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..fcfcadf73fa --- /dev/null +++ b/quarkus/addons/task-management/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,10 @@ +name: Kogito Add-On Task Management +description: Kogito Add-On Task Management REST API +metadata: + keywords: + - kogito + - process + - task + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/task-notification/deployment/pom.xml b/quarkus/addons/task-notification/deployment/pom.xml new file mode 100644 index 00000000000..b87d5172c36 --- /dev/null +++ b/quarkus/addons/task-notification/deployment/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-task-notification-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-task-notification-deployment + Kogito Add-On Task Notification - Deployment + + + org.kie.kogito + kogito-addons-quarkus-task-notification + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + io.quarkus + quarkus-arc-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/task-notification/deployment/src/main/java/org/kie/kogito/task/notification/quarkus/deployment/KogitoAddOnTaskNotificationProcessor.java b/quarkus/addons/task-notification/deployment/src/main/java/org/kie/kogito/task/notification/quarkus/deployment/KogitoAddOnTaskNotificationProcessor.java new file mode 100644 index 00000000000..53c711d403a --- /dev/null +++ b/quarkus/addons/task-notification/deployment/src/main/java/org/kie/kogito/task/notification/quarkus/deployment/KogitoAddOnTaskNotificationProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.task.notification.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnTaskNotificationProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-task-notification-extension"; + + KogitoAddOnTaskNotificationProcessor() { + super(KogitoCapability.PROCESSES); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/task-notification/pom.xml b/quarkus/addons/task-notification/pom.xml index a84a31fe234..e7158b4ae05 100644 --- a/quarkus/addons/task-notification/pom.xml +++ b/quarkus/addons/task-notification/pom.xml @@ -2,62 +2,20 @@ - 4.0.0 - org.kie.kogito kogito-addons-quarkus-parent + org.kie.kogito 2.0.0-SNAPSHOT - kogito-addons-quarkus-task-notification - Kogito :: Add-Ons :: Task notification :: Quarkus Addon - Task notification addon for for Quarkus + 4.0.0 + + kogito-addons-quarkus-task-notification-parent + Kogito Add-On Task Notification - Parent + pom + + + deployment + runtime + - - - io.smallrye.reactive - smallrye-reactive-messaging-provider - - - org.eclipse.microprofile.config - microprofile-config-api - - - org.slf4j - slf4j-api - - - javax.inject - javax.inject - provided - - - org.kie.kogito - kogito-events-api - - - io.quarkus - quarkus-junit5 - test - - - io.rest-assured - rest-assured - test - - - io.rest-assured - json-schema-validator - test - - - org.mockito - mockito-junit-jupiter - test - - - ch.qos.logback - logback-classic - test - - \ No newline at end of file diff --git a/quarkus/addons/task-notification/runtime/pom.xml b/quarkus/addons/task-notification/runtime/pom.xml new file mode 100644 index 00000000000..c4079745a5f --- /dev/null +++ b/quarkus/addons/task-notification/runtime/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-task-notification-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-task-notification + Kogito Add-On Task Notification + Task notification addon for for Quarkus + + + + io.quarkus + quarkus-arc + + + io.smallrye.reactive + smallrye-reactive-messaging-provider + + + org.eclipse.microprofile.config + microprofile-config-api + + + org.slf4j + slf4j-api + + + org.kie.kogito + kogito-events-api + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + io.rest-assured + json-schema-validator + test + + + org.mockito + mockito-junit-jupiter + test + + + ch.qos.logback + logback-classic + test + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.task.notification + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + \ No newline at end of file diff --git a/quarkus/addons/task-notification/src/main/java/org/kie/kogito/task/notification/quarkus/NotificationEventPublisher.java b/quarkus/addons/task-notification/runtime/src/main/java/org/kie/kogito/task/notification/quarkus/NotificationEventPublisher.java similarity index 100% rename from quarkus/addons/task-notification/src/main/java/org/kie/kogito/task/notification/quarkus/NotificationEventPublisher.java rename to quarkus/addons/task-notification/runtime/src/main/java/org/kie/kogito/task/notification/quarkus/NotificationEventPublisher.java diff --git a/quarkus/addons/task-notification/src/main/resources/META-INF/beans.xml b/quarkus/addons/task-notification/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/task-notification/src/main/resources/META-INF/beans.xml rename to quarkus/addons/task-notification/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/task-notification/src/main/resources/META-INF/kogito.addon b/quarkus/addons/task-notification/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/task-notification/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/task-notification/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/task-notification/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/task-notification/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..6aa58707084 --- /dev/null +++ b/quarkus/addons/task-notification/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,12 @@ +name: Kogito Add-On Task Notification +description: Kogito Add-On to handle tasks notifications +metadata: + keywords: + - kogito + - process + - task + - notification + - BPMN + guide: https://quarkus.io/guides/kogito + categories: + - "business-automation" diff --git a/quarkus/addons/tracing-decision/deployment/pom.xml b/quarkus/addons/tracing-decision/deployment/pom.xml new file mode 100644 index 00000000000..fbe10d0efef --- /dev/null +++ b/quarkus/addons/tracing-decision/deployment/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + org.kie.kogito + kogito-addons-quarkus-tracing-decision-parent + 2.0.0-SNAPSHOT + + kogito-addons-quarkus-tracing-decision-deployment + Kogito Add-On Tracing Decision - Deployment + + + org.kie.kogito + kogito-addons-quarkus-tracing-decision + + + org.kie.kogito + kogito-addons-quarkus-common-deployment + + + org.kie.kogito + kogito-addons-quarkus-explainability-deployment + ${project.version} + + + io.quarkus + quarkus-resteasy-jackson-deployment + + + io.quarkus + quarkus-smallrye-reactive-messaging-kafka-deployment + + + io.quarkus + quarkus-vertx-deployment + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + + diff --git a/quarkus/addons/tracing-decision/deployment/src/main/java/org/kie/kogito/tracing/decision/quarkus/deployment/KogitoAddOnTracingDecisionProcessor.java b/quarkus/addons/tracing-decision/deployment/src/main/java/org/kie/kogito/tracing/decision/quarkus/deployment/KogitoAddOnTracingDecisionProcessor.java new file mode 100644 index 00000000000..051fc580580 --- /dev/null +++ b/quarkus/addons/tracing-decision/deployment/src/main/java/org/kie/kogito/tracing/decision/quarkus/deployment/KogitoAddOnTracingDecisionProcessor.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.tracing.decision.quarkus.deployment; + +import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability; +import org.kie.kogito.quarkus.addons.common.deployment.RequireCapabilityKogitoAddOnProcessor; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class KogitoAddOnTracingDecisionProcessor extends RequireCapabilityKogitoAddOnProcessor { + + private static final String FEATURE = "kogito-addon-tracing-decision-extension"; + + KogitoAddOnTracingDecisionProcessor() { + super(KogitoCapability.DECISIONS); + } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/quarkus/addons/tracing-decision/pom.xml b/quarkus/addons/tracing-decision/pom.xml index add0b6f63a3..ecc97fd451c 100644 --- a/quarkus/addons/tracing-decision/pom.xml +++ b/quarkus/addons/tracing-decision/pom.xml @@ -1,6 +1,6 @@ - kogito-addons-quarkus-parent @@ -9,96 +9,13 @@ 4.0.0 - kogito-addons-quarkus-tracing-decision - Kogito :: Add-Ons :: Tracing :: Quarkus Addon + kogito-addons-quarkus-tracing-decision-parent + Kogito Add-On Tracing Decision - Parent + pom - - - io.quarkus - quarkus-resteasy - - - io.quarkus - quarkus-resteasy-jackson - - - org.kie.kogito - kogito-addons-tracing-decision-common - + + deployment + runtime + - - org.kie.kogito - kogito-addons-quarkus-explainability - - - - io.quarkus - quarkus-smallrye-reactive-messaging-kafka - - - io.quarkus - quarkus-vertx - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - provided - - - - io.quarkus - quarkus-junit5 - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.mockito - mockito-core - test - - - io.rest-assured - rest-assured - test - - - io.quarkus - quarkus-junit5-mockito - test - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - **/Native*IT.java - - - org.jboss.logmanager.LogManager - - - - - default - - integration-test - - - - verify - - verify - - - - - - - + \ No newline at end of file diff --git a/quarkus/addons/tracing-decision/runtime/pom.xml b/quarkus/addons/tracing-decision/runtime/pom.xml new file mode 100644 index 00000000000..f4060486102 --- /dev/null +++ b/quarkus/addons/tracing-decision/runtime/pom.xml @@ -0,0 +1,131 @@ + + + + kogito-addons-quarkus-tracing-decision-parent + org.kie.kogito + 2.0.0-SNAPSHOT + + 4.0.0 + + kogito-addons-quarkus-tracing-decision + Kogito Add-On Tracing Decision + + + + io.quarkus + quarkus-resteasy-jackson + + + io.quarkus + quarkus-smallrye-reactive-messaging-kafka + + + io.quarkus + quarkus-vertx + + + + org.kie.kogito + kogito-addons-tracing-decision-common + + + org.kie.kogito + kogito-addons-quarkus-explainability + + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + provided + + + + io.quarkus + quarkus-junit5 + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.mockito + mockito-core + test + + + io.rest-assured + rest-assured + test + + + io.quarkus + quarkus-junit5-mockito + test + + + + + + io.quarkus + quarkus-bootstrap-maven-plugin + ${version.io.quarkus} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + org.kie.kogito.addons.tracing.decision + + + + + + + maven-compiler-plugin + + + + io.quarkus + quarkus-extension-processor + ${version.io.quarkus} + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/Native*IT.java + + + org.jboss.logmanager.LogManager + + + + + default + + integration-test + + + + verify + + verify + + + + + + + diff --git a/quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingCollector.java b/quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingCollector.java similarity index 100% rename from quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingCollector.java rename to quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingCollector.java diff --git a/quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingListener.java b/quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingListener.java similarity index 100% rename from quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingListener.java rename to quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingListener.java diff --git a/quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitter.java b/quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitter.java similarity index 100% rename from quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitter.java rename to quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitter.java diff --git a/quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusStartupModelPublisher.java b/quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusStartupModelPublisher.java similarity index 100% rename from quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusStartupModelPublisher.java rename to quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusStartupModelPublisher.java diff --git a/quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusTraceEventEmitter.java b/quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusTraceEventEmitter.java similarity index 100% rename from quarkus/addons/tracing-decision/src/main/java/org/kie/kogito/tracing/decision/QuarkusTraceEventEmitter.java rename to quarkus/addons/tracing-decision/runtime/src/main/java/org/kie/kogito/tracing/decision/QuarkusTraceEventEmitter.java diff --git a/quarkus/addons/tracing-decision/src/main/resources/META-INF/beans.xml b/quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/beans.xml similarity index 100% rename from quarkus/addons/tracing-decision/src/main/resources/META-INF/beans.xml rename to quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/beans.xml diff --git a/quarkus/addons/tracing-decision/src/main/resources/META-INF/kogito.addon b/quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/kogito.addon similarity index 100% rename from quarkus/addons/tracing-decision/src/main/resources/META-INF/kogito.addon rename to quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/kogito.addon diff --git a/quarkus/addons/tracing-decision/src/main/resources/META-INF/microprofile-config.properties b/quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/microprofile-config.properties similarity index 100% rename from quarkus/addons/tracing-decision/src/main/resources/META-INF/microprofile-config.properties rename to quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/microprofile-config.properties diff --git a/quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 00000000000..a74b38409f0 --- /dev/null +++ b/quarkus/addons/tracing-decision/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,11 @@ +name: Kogito Add-On Tracing Decision +description: Kogito Add-On to enable tracing decisions projects +metadata: + keywords: + - kogito + - decisions + - dmn + - tracing + guide: https://quarkus.io/guides/kogito-dmn + categories: + - "business-automation" diff --git a/quarkus/addons/tracing-decision/src/test/java/org/kie/kogito/tracing/decision/DecisionModelResourcesProviderMock.java b/quarkus/addons/tracing-decision/runtime/src/test/java/org/kie/kogito/tracing/decision/DecisionModelResourcesProviderMock.java similarity index 100% rename from quarkus/addons/tracing-decision/src/test/java/org/kie/kogito/tracing/decision/DecisionModelResourcesProviderMock.java rename to quarkus/addons/tracing-decision/runtime/src/test/java/org/kie/kogito/tracing/decision/DecisionModelResourcesProviderMock.java diff --git a/quarkus/addons/tracing-decision/src/test/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingTest.java b/quarkus/addons/tracing-decision/runtime/src/test/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingTest.java similarity index 100% rename from quarkus/addons/tracing-decision/src/test/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingTest.java rename to quarkus/addons/tracing-decision/runtime/src/test/java/org/kie/kogito/tracing/decision/QuarkusDecisionTracingTest.java diff --git a/quarkus/addons/tracing-decision/src/test/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitterTest.java b/quarkus/addons/tracing-decision/runtime/src/test/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitterTest.java similarity index 100% rename from quarkus/addons/tracing-decision/src/test/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitterTest.java rename to quarkus/addons/tracing-decision/runtime/src/test/java/org/kie/kogito/tracing/decision/QuarkusModelEventEmitterTest.java diff --git a/quarkus/addons/tracing-decision/src/test/resources/Traffic Violation.dmn b/quarkus/addons/tracing-decision/runtime/src/test/resources/Traffic Violation.dmn similarity index 100% rename from quarkus/addons/tracing-decision/src/test/resources/Traffic Violation.dmn rename to quarkus/addons/tracing-decision/runtime/src/test/resources/Traffic Violation.dmn diff --git a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/pom.xml b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/pom.xml index aaf91c51ab2..e4e1f4cf1bf 100644 --- a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/pom.xml +++ b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/pom.xml @@ -29,6 +29,11 @@ kogito-quarkus-processes-deployment ${project.version} + + org.kie.kogito + kogito-addons-quarkus-messaging-deployment + ${project.version} + io.quarkus diff --git a/springboot/addons/README.md b/springboot/addons/README.md index cfbbdf43183..7758c753700 100644 --- a/springboot/addons/README.md +++ b/springboot/addons/README.md @@ -14,6 +14,11 @@ In this module you will find all the add-ons supported by the community for Spri | Mail | kogito-addons-springboot-mail | 1.6.0 | | Monitoring Elastic | kogito-addons-springboot-monitoring-elastic | 1.2.0 | | Monitoring Prometheus |kogito-addons-springboot-monitoring-prometheus | 0.1.0 | +| Persistence FileSystem | kogito-addons-persistence-filesystem | 0.10.0 | +| Persistence Infinispan | kogito-addons-persistence-infinispan | 0.3.0 | +| Persistence JDBC | kogito-addons-persistence-jdbc | 1.8.0 | +| Persistence MongoDB | kogito-addons-persistence-mongodb | 0.15.0 | +| Persistence Postgresql | kogito-addons-persistence-postgresql | 1.6.0 | | Process Management | kogito-addons-springboot-process-management | 0.3.0 | | Process SVG | kogito-addons-springboot-process-svg | 1.0.0 | | Task Management | kogito-addons-springboot-task-management | 1.4.0 | diff --git a/springboot/archetype/src/main/resources/META-INF/archetype-post-generate.groovy b/springboot/archetype/src/main/resources/META-INF/archetype-post-generate.groovy index 2a5147726a0..117a5e4eee3 100644 --- a/springboot/archetype/src/main/resources/META-INF/archetype-post-generate.groovy +++ b/springboot/archetype/src/main/resources/META-INF/archetype-post-generate.groovy @@ -63,9 +63,9 @@ def addonsToArtifactsIds(String addons) { [id: "persistence-mongodb", addon: "kogito-addons-persistence-mongodb"], [id: "persistence-postgresql", addon: "kogito-addons-persistence-postgresql"], [id: "human-task-prediction-api", addon: "kogito-addons-human-task-prediction-api"], - [id: "cloudevents", addon: "kogito-addons-springboot-cloudevents"], + [id: "messaging", addon: "kogito-addons-springboot-messaging"], [id: "events-decisions", addon: "kogito-addons-springboot-events-decisions"], - [id: "events-kafka", addon: "kogito-addons-springboot-events-kafka"], + [id: "events-process-kafka", addon: "kogito-addons-springboot-events-process-kafka"], [id: "explainability", addon: "kogito-addons-springboot-explainability"], [id: "jobs-management", addon: "kogito-addons-springboot-jobs-management"], [id: "mail", addon: "kogito-addons-springboot-mail"], diff --git a/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy b/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy index f590aa78582..2f33e54ed0f 100644 --- a/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy +++ b/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy @@ -28,7 +28,7 @@ class AddDependencyToPomWithTextReplaceTest extends Specification { def "Add a list of new dependencies to original pom.xml"() { given: - String[] artifacts = "cloudevents,persistence,monitoring".split(",") + String[] artifacts = "messaging,persistence,monitoring".split(",") def dependencies = new StringBuilder() artifacts.each { dependencies << diff --git a/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithXmlTest.groovy b/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithXmlTest.groovy index 4479ffdb964..d6fddb6138b 100644 --- a/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithXmlTest.groovy +++ b/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithXmlTest.groovy @@ -40,7 +40,7 @@ class AddDependencyToPomWithXmlTest extends Specification { when: Node newDep = new Node(null, "dependency", - [groupId: "org.kie.kogito", artifactId: "kogito-addons-springboot-cloudevents", version: "2.0.0-SNAPSHOT"]) + [groupId: "org.kie.kogito", artifactId: "kogito-addons-springboot-messaging", version: "2.0.0-SNAPSHOT"]) pomXml.dependencies[0].children().add(0, newDep) then: @@ -49,7 +49,7 @@ class AddDependencyToPomWithXmlTest extends Specification { def "Add a list of new dependencies to original pom.xml"() { given: - String[] artifacts = "cloudevents,persistence,monitoring".split(",") + String[] artifacts = "messaging,persistence,monitoring".split(",") Node pomXml = new XmlParser().parse(this.getClass().getResourceAsStream(pomFile)) when: From 9914e231f82b037191fc64a8ceabcec58aefa020 Mon Sep 17 00:00:00 2001 From: Jan Stastny Date: Mon, 20 Sep 2021 17:50:22 +0200 Subject: [PATCH 3/8] KOGITO-5789 use activating property for kogito-quarkus-test-list (#1584) * KOGITO-5789 use activating property for kogito-quarkus-test-list * configure kogito-quarkus-test-list as IT module --- .../pom.xml | 4 +++ .../integration-tests-quarkus-norest/pom.xml | 5 +++ .../pom.xml | 4 +++ .../pom.xml | 4 +++ .../pom.xml | 5 +++ .../pom.xml | 5 +++ .../pom.xml | 5 +++ .../pom.xml | 5 +++ .../pom.xml | 5 +++ .../integration-tests-quarkus-rules/pom.xml | 4 +++ kogito-build/kogito-build-parent/pom.xml | 2 +- .../kogito-codegen-integration-tests/pom.xml | 5 +++ .../pom.xml | 5 +++ .../pom.xml | 4 +++ .../pom.xml | 5 +++ .../kogito-quarkus-integration-test/pom.xml | 4 +++ .../pom.xml | 4 +++ .../pom.xml | 5 +++ .../pom.xml | 5 +++ .../pom.xml | 4 +++ .../pom.xml | 4 +++ .../pom.xml | 4 +++ .../kogito-quarkus-test-list/pom.xml | 34 +------------------ quarkus/extensions/pom.xml | 12 ++++++- 24 files changed, 108 insertions(+), 35 deletions(-) diff --git a/integration-tests/integration-tests-quarkus-decisions/pom.xml b/integration-tests/integration-tests-quarkus-decisions/pom.xml index e3b39098b4e..e1302fac84c 100644 --- a/integration-tests/integration-tests-quarkus-decisions/pom.xml +++ b/integration-tests/integration-tests-quarkus-decisions/pom.xml @@ -10,6 +10,10 @@ integration-tests-quarkus-decisions Kogito :: Integration Tests :: Quarkus :: Decisions + + true + + diff --git a/integration-tests/integration-tests-quarkus-norest/pom.xml b/integration-tests/integration-tests-quarkus-norest/pom.xml index b0ef9320b55..8b0f0a78e1b 100644 --- a/integration-tests/integration-tests-quarkus-norest/pom.xml +++ b/integration-tests/integration-tests-quarkus-norest/pom.xml @@ -10,6 +10,11 @@ integration-tests-quarkus-norest Kogito :: Integration Tests :: Quarkus :: Without REST + + + false + + diff --git a/integration-tests/integration-tests-quarkus-predictions/pom.xml b/integration-tests/integration-tests-quarkus-predictions/pom.xml index 6057e4b9297..43b887dc410 100644 --- a/integration-tests/integration-tests-quarkus-predictions/pom.xml +++ b/integration-tests/integration-tests-quarkus-predictions/pom.xml @@ -10,6 +10,10 @@ integration-tests-quarkus-predictions Kogito :: Integration Tests :: Quarkus :: Predictions + + true + + diff --git a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-infinispan/pom.xml b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-infinispan/pom.xml index 7cb50ddfb0f..c54a3d41096 100644 --- a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-infinispan/pom.xml +++ b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-infinispan/pom.xml @@ -12,6 +12,10 @@ integration-tests-quarkus-processes-infinispan Kogito :: Integration Tests :: Quarkus :: Processes :: Persistence :: Infinispan + + true + + io.quarkus diff --git a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-jdbc/pom.xml b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-jdbc/pom.xml index ca08474710d..1a33fcf0d59 100644 --- a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-jdbc/pom.xml +++ b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-jdbc/pom.xml @@ -12,6 +12,11 @@ integration-tests-quarkus-processes-jdbc Kogito :: Integration Tests :: Quarkus :: Processes :: Persistence :: JDBC + + + false + + io.quarkus diff --git a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-kafka-persistence/pom.xml b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-kafka-persistence/pom.xml index a1693b8c577..d4688d2b604 100644 --- a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-kafka-persistence/pom.xml +++ b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-kafka-persistence/pom.xml @@ -12,6 +12,11 @@ integration-tests-quarkus-processes-kafka-persistence Kogito :: Integration Tests :: Quarkus :: Processes :: Persistence :: Kafka + + + false + + org.kie.kogito diff --git a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-mongodb/pom.xml b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-mongodb/pom.xml index dbb1a039e5e..d6c8d5bcf42 100644 --- a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-mongodb/pom.xml +++ b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-mongodb/pom.xml @@ -12,6 +12,11 @@ integration-tests-quarkus-processes-mongodb Kogito :: Integration Tests :: Quarkus :: Processes :: Persistence :: MongoDB + + + false + + io.quarkus diff --git a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-postgresql/pom.xml b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-postgresql/pom.xml index b483d785387..d3912c2b264 100644 --- a/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-postgresql/pom.xml +++ b/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-quarkus-processes-postgresql/pom.xml @@ -12,6 +12,11 @@ integration-tests-quarkus-processes-postgresql Kogito :: Integration Tests :: Quarkus :: Processes :: Persistence :: PostgreSQL + + + false + + io.quarkus diff --git a/integration-tests/integration-tests-quarkus-processes/pom.xml b/integration-tests/integration-tests-quarkus-processes/pom.xml index 603c2434ad3..95be9d72220 100644 --- a/integration-tests/integration-tests-quarkus-processes/pom.xml +++ b/integration-tests/integration-tests-quarkus-processes/pom.xml @@ -11,6 +11,11 @@ integration-tests-quarkus-processes Kogito :: Integration Tests :: Quarkus :: Processes + + + false + + diff --git a/integration-tests/integration-tests-quarkus-rules/pom.xml b/integration-tests/integration-tests-quarkus-rules/pom.xml index 4e559d42c15..c809f93190d 100644 --- a/integration-tests/integration-tests-quarkus-rules/pom.xml +++ b/integration-tests/integration-tests-quarkus-rules/pom.xml @@ -10,6 +10,10 @@ integration-tests-quarkus-rules Kogito :: Integration Tests :: Quarkus :: Rules + + true + + diff --git a/kogito-build/kogito-build-parent/pom.xml b/kogito-build/kogito-build-parent/pom.xml index 0a62447d8ee..de0c0d5a338 100644 --- a/kogito-build/kogito-build-parent/pom.xml +++ b/kogito-build/kogito-build-parent/pom.xml @@ -104,7 +104,7 @@ 0.6.1 3.6.0 0.3 - 0.10.0 + 0.11.0 3.1.0 3.7.1 3.0.0 diff --git a/kogito-codegen-modules/kogito-codegen-integration-tests/pom.xml b/kogito-codegen-modules/kogito-codegen-integration-tests/pom.xml index 8b8692a0708..d7835313c8f 100644 --- a/kogito-codegen-modules/kogito-codegen-integration-tests/pom.xml +++ b/kogito-codegen-modules/kogito-codegen-integration-tests/pom.xml @@ -11,6 +11,11 @@ kogito-codegen-integration-tests Kogito :: Codegen Integration Tests + + + false + + diff --git a/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test-hot-reload/pom.xml b/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test-hot-reload/pom.xml index 46bfedca5cf..136a8ab68a4 100644 --- a/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test-hot-reload/pom.xml +++ b/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test-hot-reload/pom.xml @@ -12,6 +12,11 @@ kogito-quarkus-decisions-integration-test-hot-reload Kogito :: Quarkus Decicions Extension :: Integration Tests (Hot Reload) + + + false + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test/pom.xml b/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test/pom.xml index e687aba8db7..f91134bc943 100644 --- a/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test/pom.xml +++ b/quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test/pom.xml @@ -12,6 +12,10 @@ kogito-quarkus-decisions-integration-test Kogito :: Quarkus Decisions Extension :: Integration Tests + + true + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test-maven-devmode/pom.xml b/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test-maven-devmode/pom.xml index 8c11dba77d4..7f6d411b022 100644 --- a/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test-maven-devmode/pom.xml +++ b/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test-maven-devmode/pom.xml @@ -13,6 +13,11 @@ kogito-quarkus-integration-test-maven-devmode Kogito :: Quarkus Extension :: Integration Tests (Maven devmode) + + + false + + diff --git a/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test/pom.xml b/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test/pom.xml index 616bf662951..5308a2c11df 100644 --- a/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test/pom.xml +++ b/quarkus/extensions/kogito-quarkus-extension/kogito-quarkus-integration-test/pom.xml @@ -13,6 +13,10 @@ kogito-quarkus-integration-test Kogito :: Quarkus Extension :: Integration Tests + + true + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-predictions-extension/kogito-quarkus-predictions-integration-test/pom.xml b/quarkus/extensions/kogito-quarkus-predictions-extension/kogito-quarkus-predictions-integration-test/pom.xml index 14ec466711f..50faeb3b659 100644 --- a/quarkus/extensions/kogito-quarkus-predictions-extension/kogito-quarkus-predictions-integration-test/pom.xml +++ b/quarkus/extensions/kogito-quarkus-predictions-extension/kogito-quarkus-predictions-integration-test/pom.xml @@ -12,6 +12,10 @@ kogito-quarkus-predictions-integration-test Kogito :: Quarkus Predictions Extension :: Integration Tests + + true + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-integration-test-hot-reload/pom.xml b/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-integration-test-hot-reload/pom.xml index f688db9fa41..bc013fc9e54 100644 --- a/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-integration-test-hot-reload/pom.xml +++ b/quarkus/extensions/kogito-quarkus-processes-extension/kogito-quarkus-processes-integration-test-hot-reload/pom.xml @@ -13,6 +13,11 @@ kogito-quarkus-processes-integration-test-hot-reload Kogito :: Quarkus Processes Extension :: Integration Tests (Hot Reload) + + + false + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-hot-reload/pom.xml b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-hot-reload/pom.xml index 5f9ce0e9e5c..1c8d122c522 100644 --- a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-hot-reload/pom.xml +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-hot-reload/pom.xml @@ -12,6 +12,11 @@ kogito-quarkus-rules-integration-test-hot-reload Kogito :: Quarkus Rules Extension :: Integration Tests (Hot Reload) + + + false + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/pom.xml b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/pom.xml index 0fec28fd71e..7a6c6bbd9f2 100644 --- a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/pom.xml +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test-session/pom.xml @@ -12,6 +12,10 @@ kogito-quarkus-rules-integration-test-session Kogito :: Quarkus Rules Extension :: Integration Tests (KieSession API) + + true + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test/pom.xml b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test/pom.xml index 89638f0e5a1..93fe6865da8 100644 --- a/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test/pom.xml +++ b/quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules-integration-test/pom.xml @@ -12,6 +12,10 @@ kogito-quarkus-rules-integration-test Kogito :: Quarkus Rules Extension :: Integration Tests + + true + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/pom.xml b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/pom.xml index 2be0bcac537..34b6e32aade 100644 --- a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/pom.xml +++ b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/pom.xml @@ -12,6 +12,10 @@ kogito-quarkus-serverless-workflow-integration-test Kogito :: Quarkus Workflows Extension :: Integration Tests + + true + + org.kie.kogito diff --git a/quarkus/extensions/kogito-quarkus-test-list/pom.xml b/quarkus/extensions/kogito-quarkus-test-list/pom.xml index a7725d0a47e..256be139b0d 100644 --- a/quarkus/extensions/kogito-quarkus-test-list/pom.xml +++ b/quarkus/extensions/kogito-quarkus-test-list/pom.xml @@ -45,39 +45,7 @@ generate-resources ${test.list.file.location} - - - ${project.root.dir}/integration-tests/ - - *quarkus*/pom.xml - integration-tests-quarkus-processes-persistence/*/pom.xml - - - - integration-tests-kogito-plugin/pom.xml - integration-tests-quarkus-norest/pom.xml - integration-tests-quarkus-processes/pom.xml - integration-tests-quarkus-processes-persistence/pom.xml - - - - ${project.root.dir}/quarkus/extensions/ - - kogito-quarkus-decisions-extension/*-integration-test*/pom.xml - kogito-quarkus-extension/*-integration-test*/pom.xml - kogito-quarkus-predictions-extension/*-integration-test*/pom.xml - kogito-quarkus-rules-extension/*-integration-test*/pom.xml - kogito-quarkus-serverless-workflow-extension/*-integration-test*/pom.xml - - - - **/kogito-quarkus-decisions-integration-test-hot-reload/pom.xml - **/kogito-quarkus-integration-test-hot-reload/pom.xml - **/kogito-quarkus-rules-integration-test-hot-reload/pom.xml - **/kogito-quarkus-rules-integration-test-legacy/pom.xml - - - + quarkus.test.list.include diff --git a/quarkus/extensions/pom.xml b/quarkus/extensions/pom.xml index c74f438e84c..15176fc8cdf 100644 --- a/quarkus/extensions/pom.xml +++ b/quarkus/extensions/pom.xml @@ -34,7 +34,6 @@ kogito-quarkus-decisions-extension kogito-quarkus-predictions-extension kogito-quarkus-processes-extension - kogito-quarkus-test-list @@ -49,6 +48,17 @@ kogito-quarkus-serverless-workflow-extension + + integration-test-modules + + + !excludeITModules + + + + kogito-quarkus-test-list + + From d25ce855ae81bec90aa3b6bbcb45fe7068cb27a9 Mon Sep 17 00:00:00 2001 From: Tristan Radisson Date: Tue, 21 Sep 2021 16:15:06 +0200 Subject: [PATCH 4/8] KOGITO-5730 Update DSL folder structure (#1538) Update jobs.groovy --- .ci/jenkins/dsl/jobs.groovy | 48 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index 4e0d9d5b352..9b42750b29b 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -1,5 +1,5 @@ import org.kie.jenkins.jobdsl.templates.KogitoJobTemplate -import org.kie.jenkins.jobdsl.KogitoConstants +import org.kie.jenkins.jobdsl.FolderUtils import org.kie.jenkins.jobdsl.Utils import org.kie.jenkins.jobdsl.KogitoJobType @@ -49,16 +49,12 @@ Map getMultijobPRConfig() { ] } -def bddRuntimesPrFolder = "${KogitoConstants.KOGITO_DSL_PULLREQUEST_FOLDER}/${KogitoConstants.KOGITO_DSL_RUNTIMES_BDD_FOLDER}" -def nightlyBranchFolder = "${KogitoConstants.KOGITO_DSL_NIGHTLY_FOLDER}/${JOB_BRANCH_FOLDER}" -def releaseBranchFolder = "${KogitoConstants.KOGITO_DSL_RELEASE_FOLDER}/${JOB_BRANCH_FOLDER}" - if (Utils.isMainBranch(this)) { - setupDeployJob(bddRuntimesPrFolder, KogitoJobType.PR) + setupDeployJob(FolderUtils.getPullRequestRuntimesBDDFolder(this), KogitoJobType.PR) // Sonarcloud analysis only on main branch // As we have only Community edition - setupSonarCloudJob(nightlyBranchFolder) + setupSonarCloudJob() } // PR checks @@ -68,23 +64,23 @@ setupMultijobPrLTSChecks() // Nightly jobs if (Utils.isMainBranch(this)) { - setupDroolsJob(nightlyBranchFolder) + setupDroolsJob() - setupQuarkusJob(nightlyBranchFolder, 'main') + setupQuarkusJob('main') } -setupNativeJob(nightlyBranchFolder) -setupDeployJob(nightlyBranchFolder, KogitoJobType.NIGHTLY) -setupPromoteJob(nightlyBranchFolder, KogitoJobType.NIGHTLY) +setupNativeJob() +setupDeployJob(FolderUtils.getNightlyFolder(this), KogitoJobType.NIGHTLY) +setupPromoteJob(FolderUtils.getNightlyFolder(this), KogitoJobType.NIGHTLY) // No release directly on main branch if (!Utils.isMainBranch(this)) { - setupDeployJob(releaseBranchFolder, KogitoJobType.RELEASE) - setupPromoteJob(releaseBranchFolder, KogitoJobType.RELEASE) + setupDeployJob(FolderUtils.getReleaseFolder(this), KogitoJobType.RELEASE) + setupPromoteJob(FolderUtils.getReleaseFolder(this), KogitoJobType.RELEASE) } if (Utils.isLTSBranch(this)) { - setupQuarkusJob(nightlyBranchFolder, Utils.getQuarkusLTSVersion(this)) - setupNativeLTSJob(nightlyBranchFolder) + setupQuarkusJob(Utils.getQuarkusLTSVersion(this)) + setupNativeLTSJob() } ///////////////////////////////////////////////////////////////// // Methods @@ -102,8 +98,8 @@ void setupMultijobPrLTSChecks() { KogitoJobTemplate.createMultijobLTSPRJobs(this, getMultijobPRConfig()) { return getDefaultJobParams() } } -void setupDroolsJob(String jobFolder) { - def jobParams = getJobParams('kogito-drools-snapshot', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.drools", 'Kogito Runtimes Drools Snapshot') +void setupDroolsJob() { + def jobParams = getJobParams('kogito-drools-snapshot', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.drools", 'Kogito Runtimes Drools Snapshot') jobParams.triggers = [ cron : 'H 2 * * *' ] KogitoJobTemplate.createPipelineJob(this, jobParams).with { parameters { @@ -119,8 +115,8 @@ void setupDroolsJob(String jobFolder) { } } -void setupQuarkusJob(String jobFolder, String quarkusBranch) { - def jobParams = getJobParams("kogito-quarkus-${quarkusBranch}", jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.quarkus", 'Kogito Runtimes Quarkus Snapshot') +void setupQuarkusJob(String quarkusBranch) { + def jobParams = getJobParams("kogito-quarkus-${quarkusBranch}", FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.quarkus", 'Kogito Runtimes Quarkus Snapshot') jobParams.triggers = [ cron : 'H 4 * * *' ] KogitoJobTemplate.createPipelineJob(this, jobParams).with { parameters { @@ -134,8 +130,8 @@ void setupQuarkusJob(String jobFolder, String quarkusBranch) { } } -void setupSonarCloudJob(String jobFolder) { - def jobParams = getJobParams('kogito-runtimes-sonarcloud', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.sonarcloud", 'Kogito Runtimes Daily Sonar') +void setupSonarCloudJob() { + def jobParams = getJobParams('kogito-runtimes-sonarcloud', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.sonarcloud", 'Kogito Runtimes Daily Sonar') jobParams.triggers = [ cron : 'H 20 * * 1-5' ] KogitoJobTemplate.createPipelineJob(this, jobParams).with { parameters { @@ -148,8 +144,8 @@ void setupSonarCloudJob(String jobFolder) { } } -void setupNativeJob(String jobFolder) { - def jobParams = getJobParams('kogito-runtimes-native', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native Testing') +void setupNativeJob() { + def jobParams = getJobParams('kogito-runtimes-native', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native Testing') jobParams.triggers = [ cron : 'H 6 * * *' ] KogitoJobTemplate.createPipelineJob(this, jobParams).with { parameters { @@ -163,8 +159,8 @@ void setupNativeJob(String jobFolder) { } } -void setupNativeLTSJob(String jobFolder) { - def jobParams = getJobParams('kogito-runtimes-native-lts', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native LTS Testing') +void setupNativeLTSJob() { + def jobParams = getJobParams('kogito-runtimes-native-lts', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native LTS Testing') jobParams.triggers = [ cron : 'H 8 * * *' ] KogitoJobTemplate.createPipelineJob(this, jobParams).with { parameters { From 775d1b7ae84fe3ed588be5f588f908a7bce428c4 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Date: Wed, 22 Sep 2021 11:14:36 -0300 Subject: [PATCH 5/8] [KOGITO-5935] Adding Kogito Quarkus Add-Ons to the quarkus test list (#1616) Signed-off-by: Ricardo Zanini --- quarkus/addons/messaging/integration-tests/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quarkus/addons/messaging/integration-tests/pom.xml b/quarkus/addons/messaging/integration-tests/pom.xml index 6c19e25f2ac..85245d6226b 100644 --- a/quarkus/addons/messaging/integration-tests/pom.xml +++ b/quarkus/addons/messaging/integration-tests/pom.xml @@ -11,6 +11,10 @@ Kogito Add-On Messaging - Integration Tests Integration tests for for Messaging Add-On (Quarkus) + + true + + org.kie.kogito From f5669f4dbb1939a5ea5f2cbe1ef25a4cf88bc9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Macik?= Date: Thu, 23 Sep 2021 09:14:15 +0200 Subject: [PATCH 6/8] KOGITO-5748 - Public API: Straight-Through Process Modules (Incubation) - fix modules organization (#1619) --- quarkus/extensions/kogito-quarkus-processes-extension/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quarkus/extensions/kogito-quarkus-processes-extension/pom.xml b/quarkus/extensions/kogito-quarkus-processes-extension/pom.xml index 56e83d4df76..cf94c0921ce 100644 --- a/quarkus/extensions/kogito-quarkus-processes-extension/pom.xml +++ b/quarkus/extensions/kogito-quarkus-processes-extension/pom.xml @@ -16,8 +16,6 @@ kogito-quarkus-processes kogito-quarkus-processes-deployment - kogito-quarkus-processes-integration-test - kogito-quarkus-processes-integration-test-hot-reload @@ -29,6 +27,7 @@ + kogito-quarkus-processes-integration-test kogito-quarkus-processes-integration-test-hot-reload From 46d675ba3943598e5742d7848d22ea66fa9189cb Mon Sep 17 00:00:00 2001 From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Date: Thu, 23 Sep 2021 09:39:16 -0300 Subject: [PATCH 7/8] Fix leftovers on Add-ons README (#1617) Signed-off-by: Ricardo Zanini --- addons/README.md | 2 +- quarkus/addons/README.md | 3 +-- springboot/addons/README.md | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/README.md b/addons/README.md index 08e1793f5f8..6545cdb1cd2 100644 --- a/addons/README.md +++ b/addons/README.md @@ -88,7 +88,7 @@ In this case, you will have to create a new capability from the scratch. To do t knowledge of the Kogito engine internals. Then follow these steps: 1. Create a new sub-module under `common` with a meaningful name. This module can be a parent module if you foresee a - complex scenario for your new add-on. See [`cloudevents`](common/cloudevents) as an example. + complex scenario for your new add-on. See [`messaging`](common/messaging) as an example. 2. Do not use any dependencies from Quarkus or Spring Boot in `common` module. Your add-on must only have code to support your capability. New dependencies must be added to the [kogito-build](../kogito-build/kogito-build-parent) BOM. 3. Create the same capability under the `addons` module in the runtime module you wish to add support ( diff --git a/quarkus/addons/README.md b/quarkus/addons/README.md index 9035c3839c9..4481f42c712 100644 --- a/quarkus/addons/README.md +++ b/quarkus/addons/README.md @@ -6,14 +6,13 @@ In this module you will find all the add-ons supported by the community for Quar | Add-On Description | Artifact ID | Since | |----------------------|------------------------------------|------------------| -| Cloud Events | kogito-addons-quarkus-cloudevents | 1.0.0 | -| Cloud Events Multi | kogito-addons-quarkus-cloudevents-multi | 1.8.0 | | Events Decisions | kogito-addons-quarkus-events-decisions | 1.2.0 | | Events Smallrye | kogito-addons-quarkus-events-smallrye | 0.3.0 | | Explainability | kogito-addons-quarkus-explainability | 0.15.0 | | Jobs Management | kogito-addons-quarkus-jobs-management | 0.6.0 | | Knative Eventing | kogito-addons-quarkus-knative-eventing | 1.10.0 | | Mail | kogito-addons-quarkus-mail | 1.6.0 | +| Messaging | kogito-addons-quarkus-messaging | 1.0.0 | | Monitoring Elastic | kogito-addons-quarkus-monitoring-elastic | 1.2.0 | | Monitoring Prometheus | kogito-addons-quarkus-monitoring-prometheus | 0.1.0 | | Persistence FileSystem | kogito-addons-quarkus-persistence-filesystem | 1.12.0 | diff --git a/springboot/addons/README.md b/springboot/addons/README.md index 7758c753700..262b1c6725a 100644 --- a/springboot/addons/README.md +++ b/springboot/addons/README.md @@ -6,12 +6,12 @@ In this module you will find all the add-ons supported by the community for Spri | Add-On Description | Artifact ID | Since | |---------------------|---------------------------------------|-------------------| -| Cloud Events | kogito-addons-springboot-cloudevents | 1.0.0 | | Events Decisions | kogito-addons-springboot-events-decisions | 1.2.0 | | Events Kafka | kogito-addons-springboot-events-kafka | 0.3.0 | | Explainability | kogito-addons-springboot-explainability | 0.15.0 | | Jobs Management | kogito-addons-springboot-jobs-management | 0.6.0 | | Mail | kogito-addons-springboot-mail | 1.6.0 | +| Messaging | kogito-addons-springboot-messaging | 1.0.0 | | Monitoring Elastic | kogito-addons-springboot-monitoring-elastic | 1.2.0 | | Monitoring Prometheus |kogito-addons-springboot-monitoring-prometheus | 0.1.0 | | Persistence FileSystem | kogito-addons-persistence-filesystem | 0.10.0 | From 568bd01de186eafb3a41f191c2693e2156df56fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Petrovick=C3=BD?= Date: Thu, 23 Sep 2021 19:47:28 +0200 Subject: [PATCH 8/8] KOGITO-5941 Introduce changes to successfully run tests with JDK 17 (#1607) --- .../mongodb/MongoDBProcessInstancesIT.java | 4 +-- .../org/acme/travels/ManagementAddOnTest.java | 4 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../integrationtests/quarkus/BasicRestIT.java | 2 +- .../integrationtests/quarkus/EnumsIT.java | 2 +- .../quarkus/ManagementAddOnIT.java | 4 +-- .../quarkus/ParentSubProcessIT.java | 2 +- .../quarkus/PingPongMessageIT.java | 4 +-- .../springboot/BasicRestTest.java | 2 +- .../springboot/EnumsTest.java | 2 +- .../springboot/ManagementAddOnTest.java | 4 +-- .../springboot/ParentSubProcessTest.java | 2 +- .../springboot/PingPongMessageTest.java | 4 +-- jbpm/jbpm-flow-builder/pom.xml | 16 ++++++++++++ jbpm/jbpm-flow/pom.xml | 13 ++++++++++ .../instance/impl/JavaScriptAction.java | 13 ++++++++-- .../impl/JavaScriptReturnValueEvaluator.java | 4 +-- kogito-build/kogito-build-parent/pom.xml | 2 +- kogito-build/kogito-dependencies-bom/pom.xml | 26 ++++++++++++++----- .../kogito/codegen/tests/PublishEventIT.java | 4 +-- kogito-test-utils/pom.xml | 5 ++++ .../src/test/resources/logback-test.xml | 16 ++++++++++++ .../kafka/KafkaProcessInstancesIT.java | 4 +-- ...dDependencyToPomWithTextReplaceTest.groovy | 5 ++-- 24 files changed, 108 insertions(+), 38 deletions(-) create mode 100644 kogito-test-utils/src/test/resources/logback-test.xml diff --git a/addons/common/persistence/mongodb/src/test/java/org/kie/kogito/mongodb/MongoDBProcessInstancesIT.java b/addons/common/persistence/mongodb/src/test/java/org/kie/kogito/mongodb/MongoDBProcessInstancesIT.java index ab4430987ef..3cbf11e405d 100644 --- a/addons/common/persistence/mongodb/src/test/java/org/kie/kogito/mongodb/MongoDBProcessInstancesIT.java +++ b/addons/common/persistence/mongodb/src/test/java/org/kie/kogito/mongodb/MongoDBProcessInstancesIT.java @@ -217,7 +217,7 @@ void testFindByIdReadMode(MongoDBTransactionManager transactionManager) { mutablePi.start(); assertThat(mutablePi.status()).isEqualTo(STATE_ERROR); assertThat(mutablePi.error()).hasValueSatisfying(error -> { - assertThat(error.errorMessage()).endsWith("java.lang.NullPointerException - null"); + assertThat(error.errorMessage()).contains("java.lang.NullPointerException"); assertThat(error.failedNodeId()).isEqualTo("ScriptTask_1"); }); assertThat(mutablePi.variables().toMap()).containsExactly(entry("var", "value")); @@ -230,7 +230,7 @@ void testFindByIdReadMode(MongoDBTransactionManager transactionManager) { ProcessInstance readOnlyPi = instances.findById(mutablePi.id(), ProcessInstanceReadMode.READ_ONLY).get(); assertThat(readOnlyPi.status()).isEqualTo(STATE_ERROR); assertThat(readOnlyPi.error()).hasValueSatisfying(error -> { - assertThat(error.errorMessage()).endsWith("java.lang.NullPointerException - null"); + assertThat(error.errorMessage()).contains("java.lang.NullPointerException"); assertThat(error.failedNodeId()).isEqualTo("ScriptTask_1"); }); assertThat(readOnlyPi.variables().toMap()).containsExactly(entry("var", "value")); diff --git a/integration-tests/integration-tests-kogito-plugin/src/it/integration-tests-kogito-plugin-it/src/test/java/org/acme/travels/ManagementAddOnTest.java b/integration-tests/integration-tests-kogito-plugin/src/it/integration-tests-kogito-plugin-it/src/test/java/org/acme/travels/ManagementAddOnTest.java index d5a81405a4b..460a9328fa0 100644 --- a/integration-tests/integration-tests-kogito-plugin/src/it/integration-tests-kogito-plugin-it/src/test/java/org/acme/travels/ManagementAddOnTest.java +++ b/integration-tests/integration-tests-kogito-plugin/src/it/integration-tests-kogito-plugin-it/src/test/java/org/acme/travels/ManagementAddOnTest.java @@ -85,7 +85,7 @@ void testGetNodeInstances() { .get("/management/processes/{processId}/instances/{processInstanceId}/nodeInstances", "greetings", pid) .then() .statusCode(200) - .body("$.size", is(2)) + .body("$.size()", is(2)) .body("[0].name", is("Task")) .body("[0].state", is(0)) .body("[1].name", is("Task")) @@ -100,7 +100,7 @@ void testGetProcessNodes() { .get("/management/processes/{processId}/nodes", "greetings") .then() .statusCode(200) - .body("$.size", is(10)) + .body("$.size()", is(10)) .body("[0].id", is(1)) .body("[0].name", is("End")) .body("[0].type", is("EndNode")) diff --git a/integration-tests/integration-tests-quarkus-gradle/integration-tests-quarkus-gradle-project/gradle/wrapper/gradle-wrapper.properties b/integration-tests/integration-tests-quarkus-gradle/integration-tests-quarkus-gradle-project/gradle/wrapper/gradle-wrapper.properties index 549d84424d0..ffed3a254e9 100644 --- a/integration-tests/integration-tests-quarkus-gradle/integration-tests-quarkus-gradle-project/gradle/wrapper/gradle-wrapper.properties +++ b/integration-tests/integration-tests-quarkus-gradle/integration-tests-quarkus-gradle-project/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/BasicRestIT.java b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/BasicRestIT.java index 58e72c00817..f0d51961c84 100644 --- a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/BasicRestIT.java +++ b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/BasicRestIT.java @@ -268,7 +268,7 @@ void testGetTasks() { .get("/AdHocFragments/{id}/tasks", id) .then() .statusCode(200) - .body("$.size", is(1)) + .body("$.size()", is(1)) .body("[0].name", is("Task")); assertExpectedUnitOfWorkEvents(1); diff --git a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/EnumsIT.java b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/EnumsIT.java index 8bdb9cf97d1..9c214b2f855 100644 --- a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/EnumsIT.java +++ b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/EnumsIT.java @@ -69,7 +69,7 @@ void testSubmitMovie() { .get("/cinema/{pid}/tasks", pid) .then() .statusCode(200) - .body("$.size", is(1)) + .body("$.size()", is(1)) .body("[0].name", is("ReviewRatingTask")) .extract() .path("[0].id"); diff --git a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ManagementAddOnIT.java b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ManagementAddOnIT.java index ef78c79397e..b8d9ab0ea5f 100644 --- a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ManagementAddOnIT.java +++ b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ManagementAddOnIT.java @@ -74,7 +74,7 @@ void testGetNodeInstances() { .get("/management/processes/{processId}/instances/{processInstanceId}/nodeInstances", GREETINGS, pid) .then() .statusCode(200) - .body("$.size", is(2)) + .body("$.size()", is(2)) .body("$", hasItems(hasEntry("name", "Hello1"), hasEntry("name", "Hello2"))) .body("[0].state", is(0)) .body("[1].state", is(0)); @@ -87,7 +87,7 @@ void testGetProcessNodes() { .get("/management/processes/{processId}/nodes", GREETINGS) .then() .statusCode(200) - .body("$.size", is(10)) + .body("$.size()", is(10)) .body("[0].id", is(1)) .body("[0].name", is("End")) .body("[0].type", is("EndNode")) diff --git a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ParentSubProcessIT.java b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ParentSubProcessIT.java index e5609f6df8d..4a352dfd2a9 100644 --- a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ParentSubProcessIT.java +++ b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/ParentSubProcessIT.java @@ -69,7 +69,7 @@ public void testParentSubProcessRest() { String taskId = given().accept(ContentType.JSON) .when().get("/subprocess/{uuid}/tasks?user=john", subProcessId) .then().statusCode(200) - .body("$.size", is(1)) + .body("$.size()", is(1)) .body("[0].parameters.param_name", is(name)) .extract().path("[0].id"); diff --git a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/PingPongMessageIT.java b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/PingPongMessageIT.java index 9594d727fc6..de396cfe262 100644 --- a/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/PingPongMessageIT.java +++ b/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/PingPongMessageIT.java @@ -82,7 +82,7 @@ private void validateSubProcess() { .get("/pong_message/") .then() .statusCode(200) - .body("$.size", equalTo(1))); + .body("$.size()", equalTo(1))); String pId = given() .contentType(ContentType.JSON) @@ -90,7 +90,7 @@ private void validateSubProcess() { .get("/pong_message/") .then() .statusCode(200) - .body("$.size", equalTo(1)) + .body("$.size()", equalTo(1)) .extract().body().path("[0].id"); given() diff --git a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/BasicRestTest.java b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/BasicRestTest.java index 286ff60a49a..5f7fde6df4e 100644 --- a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/BasicRestTest.java +++ b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/BasicRestTest.java @@ -260,7 +260,7 @@ void testGetTasks() { .get("/AdHocFragments/{id}/tasks", id) .then() .statusCode(200) - .body("$.size", is(1)) + .body("$.size()", is(1)) .body("[0].name", is("Task")); assertExpectedUnitOfWorkEvents(1); diff --git a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/EnumsTest.java b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/EnumsTest.java index d59d1695e4c..accc8afbb72 100644 --- a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/EnumsTest.java +++ b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/EnumsTest.java @@ -69,7 +69,7 @@ void testSubmitMovie() { .get("/cinema/{pid}/tasks", pid) .then() .statusCode(200) - .body("$.size", is(1)) + .body("$.size()", is(1)) .extract() .as(TestWorkItem[].class)[0]; diff --git a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ManagementAddOnTest.java b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ManagementAddOnTest.java index 0e65a931519..e299d22708e 100644 --- a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ManagementAddOnTest.java +++ b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ManagementAddOnTest.java @@ -75,7 +75,7 @@ void testGetNodeInstances() { .get("/management/processes/{processId}/instances/{processInstanceId}/nodeInstances", GREETINGS, pid) .then() .statusCode(200) - .body("$.size", is(2)) + .body("$.size()", is(2)) .body("$", hasItems(hasEntry("name", "Hello1"),hasEntry("name", "Hello2"))) .body("[0].state", is(0)) .body("[1].state", is(0)); @@ -88,7 +88,7 @@ void testGetProcessNodes() { .get("/management/processes/{processId}/nodes", GREETINGS) .then() .statusCode(200) - .body("$.size", is(10)) + .body("$.size()", is(10)) .body("[0].id", is(1)) .body("[0].name", is("End")) .body("[0].type", is("EndNode")) diff --git a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ParentSubProcessTest.java b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ParentSubProcessTest.java index e67536936c5..3aae23b6465 100644 --- a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ParentSubProcessTest.java +++ b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-it/src/test/java/org/kie/kogito/integrationtests/springboot/ParentSubProcessTest.java @@ -67,7 +67,7 @@ public void testParentSubProcessRest() { String taskId = given().accept(ContentType.JSON) .when().get("/subprocess/{uuid}/tasks?user=john", subProcessId) .then().statusCode(200) - .body("$.size", is(1)) + .body("$.size()", is(1)) .body("[0].parameters.param_name", is(name)) .extract().path("[0].id"); diff --git a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-kafka-it/src/test/java/org/kie/kogito/integrationtests/springboot/PingPongMessageTest.java b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-kafka-it/src/test/java/org/kie/kogito/integrationtests/springboot/PingPongMessageTest.java index d99d213693c..96c36601001 100644 --- a/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-kafka-it/src/test/java/org/kie/kogito/integrationtests/springboot/PingPongMessageTest.java +++ b/integration-tests/integration-tests-springboot/src/it/integration-tests-springboot-kafka-it/src/test/java/org/kie/kogito/integrationtests/springboot/PingPongMessageTest.java @@ -88,7 +88,7 @@ private void validateSubProcess(){ .get("/pong_message/") .then() .statusCode(200) - .body("$.size", equalTo(1))); + .body("$.size()", equalTo(1))); String pId = given() .contentType(ContentType.JSON) @@ -96,7 +96,7 @@ private void validateSubProcess(){ .get("/pong_message/") .then() .statusCode(200) - .body("$.size", equalTo(1)) + .body("$.size()", equalTo(1)) .extract().body().path("[0].id"); given() diff --git a/jbpm/jbpm-flow-builder/pom.xml b/jbpm/jbpm-flow-builder/pom.xml index 7d1e89f8879..e9cec0811ab 100755 --- a/jbpm/jbpm-flow-builder/pom.xml +++ b/jbpm/jbpm-flow-builder/pom.xml @@ -83,4 +83,20 @@ test + + + + java15-javascript + + [15,) + + + + org.mozilla + rhino-engine + test + + + + diff --git a/jbpm/jbpm-flow/pom.xml b/jbpm/jbpm-flow/pom.xml index 1f7f6f97429..a571cf18c32 100755 --- a/jbpm/jbpm-flow/pom.xml +++ b/jbpm/jbpm-flow/pom.xml @@ -87,6 +87,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 + org.kie.kogito @@ -122,5 +123,17 @@ **/JBPMMessages.java + + java15-javascript + + [15,) + + + + org.mozilla + rhino-engine + + + diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptAction.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptAction.java index f0d920ece63..25a76ed2296 100755 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptAction.java +++ b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptAction.java @@ -33,6 +33,16 @@ public class JavaScriptAction implements Action, Externalizable { + static ScriptEngine loadJavaScriptEngine() { + ScriptEngineManager factory = new ScriptEngineManager(); + ScriptEngine engine = factory.getEngineByName("JavaScript"); + if (engine != null) { + return engine; + } + throw new IllegalStateException("JavaScript implementation not found on the classpath." + + "If you're running JDK 15 or later, please include org.mozilla:rhino-engine in your project."); + } + private static final long serialVersionUID = 630l; private String expr; @@ -54,8 +64,7 @@ public void writeExternal(ObjectOutput out) throws IOException { @Override public void execute(KogitoProcessContext context) throws Exception { - ScriptEngineManager factory = new ScriptEngineManager(); - ScriptEngine engine = factory.getEngineByName("JavaScript"); + ScriptEngine engine = loadJavaScriptEngine(); engine.put("kcontext", context); // insert globals into context diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptReturnValueEvaluator.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptReturnValueEvaluator.java index 1beda30f010..e9bc4cda460 100755 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptReturnValueEvaluator.java +++ b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/JavaScriptReturnValueEvaluator.java @@ -23,7 +23,6 @@ import java.util.Map.Entry; import javax.script.ScriptEngine; -import javax.script.ScriptEngineManager; import org.jbpm.process.core.context.variable.VariableScope; import org.jbpm.process.instance.context.variable.VariableScopeInstance; @@ -53,8 +52,7 @@ public void writeExternal(ObjectOutput out) throws IOException { } public Object evaluate(KogitoProcessContext context) throws Exception { - ScriptEngineManager factory = new ScriptEngineManager(); - ScriptEngine engine = factory.getEngineByName("JavaScript"); + ScriptEngine engine = JavaScriptAction.loadJavaScriptEngine(); // insert globals into context Globals globals = context.getKieRuntime().getGlobals(); diff --git a/kogito-build/kogito-build-parent/pom.xml b/kogito-build/kogito-build-parent/pom.xml index de0c0d5a338..624579ba5d8 100644 --- a/kogito-build/kogito-build-parent/pom.xml +++ b/kogito-build/kogito-build-parent/pom.xml @@ -76,7 +76,7 @@ 1.8.2 1.8 - 3.0.1 + 3.2.0 1.5.2.1 3.0.0 3.1.0 diff --git a/kogito-build/kogito-dependencies-bom/pom.xml b/kogito-build/kogito-dependencies-bom/pom.xml index 77985541084..7dacbc72eca 100644 --- a/kogito-build/kogito-dependencies-bom/pom.xml +++ b/kogito-build/kogito-dependencies-bom/pom.xml @@ -33,7 +33,8 @@ 5.0.1 0.2.0 - 2.3.0 + 2.3.0.1 + 2.3.5 1.2.0 1.4.17 1.3.2 @@ -68,17 +69,18 @@ 4.3.1 4.2.3 4.1.0 + 1.7.13 3.20.2 2.9.0 1.3 - 7.2 + 8.0 5.${version.org.junit.minor} ${version.org.junit} ${version.org.junit} 1.${version.org.junit.minor} - 1.0.0 - 3.11.2 + 1.4.2 + 3.12.4 1.15.3 2.4.12.Final @@ -145,6 +147,18 @@ ${version.ch.qos.logback} + + + org.mozilla + rhino + ${version.org.mozilla.rhino} + + + org.mozilla + rhino-engine + ${version.org.mozilla.rhino} + + com.github.javaparser @@ -406,12 +420,12 @@ com.sun.xml.bind jaxb-core - ${version.com.sun.xml.bind} + ${version.com.sun.xml.bind.core} com.sun.xml.bind jaxb-impl - ${version.com.sun.xml.bind} + ${version.com.sun.xml.bind.impl} com.sun.activation diff --git a/kogito-codegen-modules/kogito-codegen-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java b/kogito-codegen-modules/kogito-codegen-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java index 5f07e388202..185304d0ea1 100644 --- a/kogito-codegen-modules/kogito-codegen-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java +++ b/kogito-codegen-modules/kogito-codegen-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java @@ -531,7 +531,7 @@ public void testServiceTaskProcessWithError() throws Exception { assertThat(body.getNodeInstances()).extractingResultOf("getLeaveTime").containsNull();// human task is active thus null for leave time assertThat(body.getError()).isNotNull(); - assertThat(body.getError().getErrorMessage()).contains("java.lang.NullPointerException - null"); + assertThat(body.getError().getErrorMessage()).contains("java.lang.NullPointerException"); assertThat(body.getError().getNodeDefinitionId()).isEqualTo("_38E04E27-3CCA-47F9-927B-E37DC4B8CE25"); parameters.put("s", "john"); @@ -545,7 +545,7 @@ public void testServiceTaskProcessWithError() throws Exception { assertThat(events).isNotNull().hasSize(1); body = assertProcessInstanceEvent(events.get(0), "ServiceProcessDifferentOperations", "Service Process", 5); assertThat(body.getError()).isNotNull(); - assertThat(body.getError().getErrorMessage()).contains("java.lang.NullPointerException - null"); + assertThat(body.getError().getErrorMessage()).contains("java.lang.NullPointerException"); assertThat(body.getError().getNodeDefinitionId()).isEqualTo("_38E04E27-3CCA-47F9-927B-E37DC4B8CE25"); uow = app.unitOfWorkManager().newUnitOfWork(); diff --git a/kogito-test-utils/pom.xml b/kogito-test-utils/pom.xml index ebb10b3bf1f..1566a0a36f4 100644 --- a/kogito-test-utils/pom.xml +++ b/kogito-test-utils/pom.xml @@ -86,6 +86,11 @@ mockito-core test + + ch.qos.logback + logback-classic + test + diff --git a/kogito-test-utils/src/test/resources/logback-test.xml b/kogito-test-utils/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..2fe8072965e --- /dev/null +++ b/kogito-test-utils/src/test/resources/logback-test.xml @@ -0,0 +1,16 @@ + + + + + + + %d{HH:mm:ss.SSS} [%-12.12t] %-5p %m%n + + + + + + + + + diff --git a/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java b/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java index b857f4f2c2b..2cd8dbf62f6 100644 --- a/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java +++ b/quarkus/addons/persistence/kafka/runtime/src/test/java/org/kie/kogito/persistence/kafka/KafkaProcessInstancesIT.java @@ -101,7 +101,7 @@ void testFindByIdReadMode() { mutablePi.start(); assertThat(mutablePi.status()).isEqualTo(STATE_ERROR); assertThat(mutablePi.error()).hasValueSatisfying(error -> { - assertThat(error.errorMessage()).endsWith("java.lang.NullPointerException - null"); + assertThat(error.errorMessage()).contains("java.lang.NullPointerException"); assertThat(error.failedNodeId()).isEqualTo("ScriptTask_1"); }); assertThat(mutablePi.variables().toMap()).containsExactly(entry("var", "value")); @@ -114,7 +114,7 @@ void testFindByIdReadMode() { ProcessInstance readOnlyPi = instances.findById(mutablePi.id(), ProcessInstanceReadMode.READ_ONLY).get(); assertThat(readOnlyPi.status()).isEqualTo(STATE_ERROR); assertThat(readOnlyPi.error()).hasValueSatisfying(error -> { - assertThat(error.errorMessage()).endsWith("java.lang.NullPointerException - null"); + assertThat(error.errorMessage()).contains("java.lang.NullPointerException"); assertThat(error.failedNodeId()).isEqualTo("ScriptTask_1"); }); assertThat(readOnlyPi.variables().toMap()).containsExactly(entry("var", "value")); diff --git a/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy b/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy index 2f33e54ed0f..6d5be79dc1f 100644 --- a/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy +++ b/springboot/archetype/src/test/groovy/org/kie/kogito/springboot/archetypes/AddDependencyToPomWithTextReplaceTest.groovy @@ -18,8 +18,7 @@ package org.kie.kogito.springboot.archetypes import spock.lang.Specification -import java.nio.file.Files -import java.nio.file.Path +import java.nio.charset.StandardCharsets // we can't use XML with the current Archetype plugin see: https://github.com/apache/maven-archetype/pull/58 @@ -40,7 +39,7 @@ class AddDependencyToPomWithTextReplaceTest extends Specification { } when: - String pomFile = Files.readString(Path.of(this.getClass().getResource(pomFile).toURI())) + String pomFile = new String(this.getClass().getResourceAsStream(pomFile).readAllBytes(), StandardCharsets.UTF_8) .replace(" ", dependencies) then: