Skip to content

Commit

Permalink
incubator-kie-issues#933: Rename SonataFlow Quarkus Extensions in `…
Browse files Browse the repository at this point in the history
…kogito-runtimes` (apache#3430)

* incubator-kie-issues#933: Rename `SonataFlow` Quarkus Extensions in `kogito-runtimes`
* change groupId to `org.apache.kie.sonataflow`
* Improving `KogitoCapability` verifications to include new extension GAV's
  • Loading branch information
pefernan authored and rgdoliveira committed Mar 27, 2024
1 parent 98c8b7c commit 7c6b3de
Show file tree
Hide file tree
Showing 39 changed files with 218 additions and 179 deletions.
52 changes: 26 additions & 26 deletions kogito-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,24 +269,24 @@
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel-deployment</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
Expand Down Expand Up @@ -1992,24 +1992,24 @@
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-serverless-workflow-python</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-python</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-serverless-workflow-python</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-python</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-serverless-workflow-python-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-python-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-serverless-workflow-python-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-python-deployment</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
Expand Down Expand Up @@ -2247,19 +2247,19 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -2314,23 +2314,23 @@
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-devui</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-devui</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-devui-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-devui-deployment</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
Expand Down
18 changes: 9 additions & 9 deletions quarkus/addons/camel/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
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">
<parent>
<artifactId>kogito-addons-quarkus-camel-parent</artifactId>
<groupId>org.kie.kogito</groupId>
<artifactId>sonataflow-addons-quarkus-camel-parent</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<version>999-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand All @@ -33,21 +33,21 @@
<java.module.name>org.kie.kogito.addons.quarkus.camel.deployment</java.module.name>
</properties>

<name>Kogito :: Add-Ons :: Quarkus :: Camel :: Deployment</name>
<description>Kogito Quarkus Camel Integration with Serverless Workflow</description>
<artifactId>kogito-addons-quarkus-camel-deployment</artifactId>
<name>SonataFlow :: Add-Ons :: Quarkus :: Camel :: Deployment</name>
<description>SonataFlow Quarkus Camel Integration with Serverless Workflow</description>
<artifactId>sonataflow-addons-quarkus-camel-deployment</artifactId>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class KogitoAddonsQuarkusCamelProcessor extends RequireCapabilityKogitoAddOnProcessor {

private static final String FEATURE = "kogito-addons-quarkus-camel";
private static final String FEATURE = "sonataflow-addons-quarkus-camel";

public KogitoAddonsQuarkusCamelProcessor() {
super(KogitoCapability.SERVERLESS_WORKFLOW);
Expand Down
26 changes: 13 additions & 13 deletions quarkus/addons/camel/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@
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">
<parent>
<artifactId>kogito-addons-quarkus-camel-parent</artifactId>
<groupId>org.kie.kogito</groupId>
<artifactId>sonataflow-addons-quarkus-camel-parent</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<version>999-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>


<name>Kogito :: Add-Ons :: Quarkus :: Camel :: Integration Tests</name>
<description>Kogito Quarkus Camel Integration with Serverless Workflow</description>
<artifactId>kogito-addons-quarkus-camel-integration-tests</artifactId>
<name>SonataFlow :: Add-Ons :: Quarkus :: Camel :: Integration Tests</name>
<description>SonataFlow Quarkus Camel Integration with Serverless Workflow</description>
<artifactId>sonataflow-addons-quarkus-camel-integration-tests</artifactId>

<properties>
<java.module.name>org.kie.kogito.addons.quarkus.camel.integration.test</java.module.name>
</properties>

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -83,8 +83,8 @@

<!-- this is used implicitly by quarkus tests so let's make Maven aware of it. necessary to run the tests in parallel. -->
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
Expand All @@ -96,8 +96,8 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow-deployment</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
Expand Down
8 changes: 4 additions & 4 deletions quarkus/addons/camel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-camel-parent</artifactId>
<name>Kogito :: Add-Ons :: Quarkus :: Camel :: Parent</name>
<description>Kogito Quarkus Camel Integration with Serverless Workflow</description>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-addons-quarkus-camel-parent</artifactId>
<name>SonataFlow :: Add-Ons :: Quarkus :: Camel :: Parent</name>
<description>SonataFlow Quarkus Camel Integration with Serverless Workflow</description>
<modules>
<module>deployment</module>
<module>runtime</module>
Expand Down
16 changes: 8 additions & 8 deletions quarkus/addons/camel/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
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">
<parent>
<artifactId>kogito-addons-quarkus-camel-parent</artifactId>
<groupId>org.kie.kogito</groupId>
<artifactId>sonataflow-addons-quarkus-camel-parent</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<version>999-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<name>Kogito :: Add-Ons :: Quarkus :: Camel :: Runtimes</name>
<description>Kogito Quarkus Camel Integration with Serverless Workflow</description>
<artifactId>kogito-addons-quarkus-camel</artifactId>
<name>SonataFlow :: Add-Ons :: Quarkus :: Camel :: Runtimes</name>
<description>SonataFlow Quarkus Camel Integration with Serverless Workflow</description>
<artifactId>sonataflow-addons-quarkus-camel</artifactId>

<properties>
<java.module.name>org.kie.kogito.addons.quarkus.camel.runtime</java.module.name>
Expand All @@ -40,8 +40,8 @@

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-serverless-workflow</artifactId>
<groupId>org.apache.kie.sonataflow</groupId>
<artifactId>sonataflow-quarkus</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down Expand Up @@ -74,7 +74,7 @@
<configuration>
<deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
<capabilities>
<provides>org.sonataflow.addons.camel</provides>
<provides>org.apache.kie.sonataflow.addons.camel</provides>
</capabilities>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ private IllegalStateException exceptionForEngineNotPresent() {
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(c.getOfferedBy().getGroupId())
.append(":")
.append(c.getOfferedBy())
.append(c.getOfferedBy().getArtifactId())
.append("\n");
});
sb.append("Add one of the above artifacts in your project's pom.xml file");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
*/
public final class KogitoCapability {

public static final String KOGITO_GROUP_ID = "org.kie.kogito";
public static final KogitoCapability DECISIONS = new KogitoCapability("org.drools.decisions", "drools-quarkus-decisions");
public static final KogitoCapability PROCESSES = new KogitoCapability("org.jbpm.processes", "jbpm-quarkus");
public static final KogitoCapability PREDICTIONS = new KogitoCapability("org.kie.predictions", "kie-quarkus-predictions");
public static final KogitoCapability RULES = new KogitoCapability("org.drools.rules", "drools-quarkus-rules");
public static final KogitoCapability SERVERLESS_WORKFLOW = new KogitoCapability("org.sonataflow.serverless-workflow", "kogito-quarkus-serverless-workflow");
public static final KogitoCapability DECISIONS = new KogitoCapability("org.drools.decisions", new KogitoCapabilityExtension("org.drools", "drools-quarkus-decisions"));
public static final KogitoCapability PROCESSES = new KogitoCapability("org.jbpm.processes", new KogitoCapabilityExtension("org.jbpm", "jbpm-quarkus"));
public static final KogitoCapability PREDICTIONS = new KogitoCapability("org.kie.predictions", new KogitoCapabilityExtension("org.kie", "kie-quarkus-predictions"));
public static final KogitoCapability RULES = new KogitoCapability("org.drools.rules", new KogitoCapabilityExtension("org.drools", "drools-quarkus-rules"));
public static final KogitoCapability SERVERLESS_WORKFLOW =
new KogitoCapability("org.apache.kie.sonataflow.serverless-workflow", new KogitoCapabilityExtension("org.apache.kie.sonataflow", "sonataflow-quarkus"));

public static final List<KogitoCapability> ENGINES = asList(
KogitoCapability.DECISIONS,
Expand All @@ -42,9 +42,9 @@ public final class KogitoCapability {
KogitoCapability.SERVERLESS_WORKFLOW);

private final String capability;
private final String offeredBy;
private final KogitoCapabilityExtension offeredBy;

public KogitoCapability(final String capability, final String offeredBy) {
public KogitoCapability(final String capability, final KogitoCapabilityExtension offeredBy) {
this.capability = capability;
this.offeredBy = offeredBy;
}
Expand All @@ -53,7 +53,7 @@ public String getCapability() {
return capability;
}

public String getOfferedBy() {
public KogitoCapabilityExtension getOfferedBy() {
return offeredBy;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 KogitoCapabilityExtension {

private String groupId;
private String artifactId;

public KogitoCapabilityExtension(String groupId, String artifactId) {
this.groupId = groupId;
this.artifactId = artifactId;
}

public String getGroupId() {
return groupId;
}

public String getArtifactId() {
return artifactId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ private IllegalStateException exceptionForRequiredCapabilities(List<KogitoCapabi
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(c.getOfferedBy().getGroupId())
.append(":")
.append(c.getOfferedBy())
.append(c.getOfferedBy().getArtifactId())
.append("\n");
});
sb.append("Add the above artifacts in your project's pom.xml file");
Expand Down
Loading

0 comments on commit 7c6b3de

Please sign in to comment.