Skip to content

Commit

Permalink
[1.40.x] Cherry pick KOGITO-9298 1.40.x (#1793)
Browse files Browse the repository at this point in the history
* splitting job-service-postgresql into a common module

* removing not needed config file

* fix the version on the new jobs-service-postgresql-common module
  • Loading branch information
tiagodolphine committed Jun 26, 2023
1 parent 9305cc6 commit 9e438a2
Show file tree
Hide file tree
Showing 30 changed files with 118 additions and 68 deletions.
2 changes: 1 addition & 1 deletion jobs-service/jobs-service-inmemory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-postgresql</artifactId>
<artifactId>jobs-service-postgresql-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.embedded.postgresql</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@

quarkus.datasource.db-kind=postgresql
quarkus.flyway.migrate-at-start=true
quarkus.datasource.health.enabled=true
quarkus.datasource.health.enabled=true
quarkus.flyway.locations=db/jobs-service
85 changes: 85 additions & 0 deletions jobs-service/jobs-service-postgresql-common/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service</artifactId>
<version>1.40.1-SNAPSHOT</version>
</parent>

<artifactId>jobs-service-postgresql-common</artifactId>
<name>Kogito Apps :: Jobs Service :: PostgreSQL</name>
<description>Jobs Service (Timers and Async Jobs) PostgreSQL Common</description>

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-reactive-pg-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-test-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# 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.
#
quarkus.datasource.db-kind=postgresql
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ quarkus.oidc.tenant-enabled=false
quarkus.datasource.db-kind=postgresql
quarkus.flyway.migrate-at-start=true
quarkus.flyway.clean-at-start=true
quarkus.flyway.locations=db/jobs-service

# Outgoing events for the event based API integration tests
%events-support.mp.messaging.outgoing.kogito-job-service-job-request-events-emitter.connector=smallrye-kafka
Expand Down
66 changes: 1 addition & 65 deletions jobs-service/jobs-service-postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,71 +16,7 @@
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-reactive-pg-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway</artifactId>
</dependency>

<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-test-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<scope>test</scope>
<artifactId>jobs-service-postgresql-common</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@
<groupId>io.quarkus.http</groupId>
<artifactId>quarkus-http-core</artifactId>
</dependency>

<dependency>
<groupId>io.quarkiverse.embedded.postgresql</groupId>
<artifactId>quarkus-embedded-postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-inmemory</artifactId>
<artifactId>jobs-service-postgresql-common</artifactId>
<exclusions>
<!-- excluding resteasy-reactive since kogito runtimes uses the classic -->
<exclusion>
Expand Down
6 changes: 6 additions & 0 deletions jobs-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<module>jobs-service-internal-api</module>
<module>jobs-recipients</module>
<module>jobs-service-common</module>
<module>jobs-service-postgresql-common</module>
<module>jobs-service-postgresql</module>
<module>jobs-service-inmemory</module>
<module>kogito-addons-jobs-service</module>
Expand Down Expand Up @@ -45,6 +46,11 @@
<artifactId>jobs-service-internal-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-postgresql-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>job-recipient-common-http</artifactId>
Expand Down

0 comments on commit 9e438a2

Please sign in to comment.