Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[pull] master from Taskana:master #363

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion camunda-outbox-example-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion ci/taskana-adapter-sonar-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
12 changes: 6 additions & 6 deletions docker-databases/prepare_db.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ SETLOCAL

:START_POSTGRES_14
ECHO ---
ECHO docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_14
docker-compose -f %~dp0/docker-compose.yml up -d taskana-postgres_14
ECHO docker compose -f %~dp0/docker-compose.yml up -d taskana-postgres_14
docker compose -f %~dp0/docker-compose.yml up -d taskana-postgres_14

ECHO ---
GOTO MENU

:STOP_POSTGRES_14
ECHO ---
ECHO docker stop taskana-postgres_14
ECHO docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_14
docker-compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_14
ECHO docker compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_14
docker compose -f %~dp0/docker-compose.yml rm -f -s -v taskana-postgres_14
ECHO ---
GOTO MENU

:STOP_ALL
ECHO ---
ECHO docker-compose -f %~dp0/docker-compose.yml down -v
docker-compose -f %~dp0/docker-compose.yml down -v
ECHO docker compose -f %~dp0/docker-compose.yml down -v
docker compose -f %~dp0/docker-compose.yml down -v
ECHO ---
GOTO MENU
4 changes: 2 additions & 2 deletions docker-databases/prepare_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ function main() {
H2)
;;
POSTGRES|POSTGRES_14)
docker-compose -f $scriptDir/docker-compose.yml up -d "$(mapDBToDockerComposeServiceName "$1")"
docker compose -f $scriptDir/docker-compose.yml up -d "$(mapDBToDockerComposeServiceName "$1")"
;;
stop)
# this variable is necessary, so that the script can terminate properly
# when the provided database name does not match. PLEASE DO NOT INLINE!
local composeServiceName="$(mapDBToDockerComposeServiceName "$2")"
docker-compose -f $scriptDir/docker-compose.yml rm -f -s -v $composeServiceName
docker compose -f $scriptDir/docker-compose.yml rm -f -s -v $composeServiceName
;;
*)
echo "unknown database '$1'" >&2
Expand Down
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down Expand Up @@ -42,34 +42,34 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<version.taskana>8.0.1-SNAPSHOT</version.taskana>
<version.taskana>8.1.1-SNAPSHOT</version.taskana>

<!-- build dependencies -->
<version.checkstyle>10.14.0</version.checkstyle>
<version.google-java-format>1.20.0</version.google-java-format>
<version.maven.checkstyle>3.3.1</version.maven.checkstyle>
<version.maven.compiler>3.11.0</version.maven.compiler>
<version.maven.compiler>3.13.0</version.maven.compiler>
<version.maven.dependency>3.6.1</version.maven.dependency>
<version.maven.failsafe.plugin>3.2.5</version.maven.failsafe.plugin>
<version.maven.jar>3.3.0</version.maven.jar>
<version.maven.jar>3.4.0</version.maven.jar>
<version.maven.javadoc>3.6.3</version.maven.javadoc>
<version.maven.jboss-as.plugin>7.9.Final</version.maven.jboss-as.plugin>
<version.maven.resources>3.3.1</version.maven.resources>
<version.maven.sonar>3.11.0.3922</version.maven.sonar>
<version.maven.source>3.3.1</version.maven.source>
<version.maven.spring-boot>3.1.9</version.maven.spring-boot>
<version.maven.surefire.plugin>3.2.1</version.maven.surefire.plugin>
<version.maven.surefire.plugin>3.2.5</version.maven.surefire.plugin>
<version.maven-war-plugin>3.4.0</version.maven-war-plugin>
<version.maven.wildfly.plugin>4.2.2.Final</version.maven.wildfly.plugin>

<version.mybatis>3.5.16</version.mybatis>
<version.spring.mybatis>3.0.3</version.spring.mybatis>

<version.spring.plugin.core>3.0.0</version.spring.plugin.core>
<version.spring.boot>3.1.8</version.spring.boot>
<version.spring.boot>3.2.4</version.spring.boot>

<version.camunda>7.20.0</version.camunda>
<version.camunda.spin>1.22.0</version.camunda.spin>
<version.camunda>7.21.0</version.camunda>
<version.camunda.spin>1.23.0</version.camunda.spin>
<version.camunda.template-engines-freemarker>2.2.0</version.camunda.template-engines-freemarker>
<version.camunda.template-engines-velocity>2.1.0</version.camunda.template-engines-velocity>

Expand All @@ -81,7 +81,7 @@
<version.org.webjars.bootstrap>5.3.3</version.org.webjars.bootstrap>
<version.org.jboss.spec>3.0.3.Final</version.org.jboss.spec>

<version.wildfly>27.0.1.Final</version.wildfly>
<version.wildfly>31.0.1.Final</version.wildfly>
<version.arquillian>1.8.0.Final</version.arquillian>
<version.arquillian.managed.wildfly>5.0.1.Final</version.arquillian.managed.wildfly>

Expand Down
2 changes: 1 addition & 1 deletion taskana-adapter-camunda-listener-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion taskana-adapter-camunda-listener/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion taskana-adapter-camunda-outbox-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion taskana-adapter-camunda-spring-boot-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
7 changes: 1 addition & 6 deletions taskana-adapter-camunda-spring-boot-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -137,11 +137,6 @@
<version>${version.jakarta.annotation}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.test.web.server.LocalServerPort;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import pro.taskana.TaskanaConfiguration;
import pro.taskana.adapter.systemconnector.camunda.api.impl.HttpHeaderProvider;
import pro.taskana.classification.api.ClassificationService;
Expand Down Expand Up @@ -113,7 +113,7 @@ void setUp() throws Exception {
new TestRestTemplate(
new RestTemplateBuilder()
.rootUri("http://localhost:" + port)
.requestFactory(OkHttp3ClientHttpRequestFactory.class));
.requestFactory(HttpComponentsClientHttpRequestFactory.class));
// set up camunda requester and taskanaEngine-Taskservice
this.camundaProcessengineRequester =
new CamundaProcessengineRequester(
Expand Down
6 changes: 3 additions & 3 deletions taskana-adapter-camunda-system-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>pro.taskana</groupId>
<artifactId>taskana-adapter-parent</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -21,8 +21,8 @@
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import java.time.Duration;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import pro.taskana.adapter.systemconnector.camunda.api.impl.CamundaTaskClaimCanceler;
import pro.taskana.adapter.systemconnector.camunda.api.impl.CamundaTaskClaimer;
Expand All @@ -19,15 +18,15 @@
/** Configures the camunda system connector. */
@Configuration
@DependsOn(value = {"adapterSpringContextProvider"})
@EnableConfigurationProperties(OkHttpProperties.class)
public class CamundaSystemConnectorConfiguration {

@Bean
RestTemplate restTemplate(RestTemplateBuilder builder, OkHttpProperties okHttpProperties) {
RestTemplate restTemplate(
RestTemplateBuilder builder, HttpComponentsClientProperties httpComponentsClientProperties) {
return builder
.setConnectTimeout(Duration.ofMillis(okHttpProperties.getConnectionTimeout()))
.setReadTimeout(Duration.ofMillis(okHttpProperties.getReadTimeout()))
.requestFactory(OkHttp3ClientHttpRequestFactory.class)
.setConnectTimeout(Duration.ofMillis(httpComponentsClientProperties.getConnectionTimeout()))
.setReadTimeout(Duration.ofMillis(httpComponentsClientProperties.getReadTimeout()))
.requestFactory(HttpComponentsClientHttpRequestFactory.class)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "okhttp")
public class OkHttpProperties {
@ConfigurationProperties(prefix = "httpcomponentsclient")
public class HttpComponentsClientProperties {

private long connectionTimeout = 2_000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import pro.taskana.adapter.systemconnector.camunda.config.OkHttpPropertiesWithDefaultValuesIntegrationTest.OkHttpPropertiesWithDefaultValuesIntegrationTestConfiguration;
import pro.taskana.adapter.systemconnector.camunda.config.HttpComponentsClientPropertiesWithDefaultValuesIntegrationTest.OkHttpPropertiesWithDefaultValuesIntegrationTestConfiguration;

@SpringBootTest(classes = {OkHttpPropertiesWithDefaultValuesIntegrationTestConfiguration.class})
class OkHttpPropertiesWithDefaultValuesIntegrationTest {
class HttpComponentsClientPropertiesWithDefaultValuesIntegrationTest {

@Test
void should_HaveDefaultConnectionTimeout2000ms_When_NoPropertyOkHttpConnectionTimeoutIsSet(
@Autowired OkHttpProperties okHttpProperties
@Autowired HttpComponentsClientProperties httpComponentsClientProperties
) {
assertThat(okHttpProperties.getConnectionTimeout()).isEqualTo(2_000);
assertThat(httpComponentsClientProperties.getConnectionTimeout()).isEqualTo(2_000);
}

@Test
void should_HaveDefaultReadTimeout5000ms_When_NoPropertyOkHttpReadTimeoutIsSet(
@Autowired OkHttpProperties okHttpProperties
@Autowired HttpComponentsClientProperties httpComponentsClientProperties
) {
assertThat(okHttpProperties.getReadTimeout()).isEqualTo(5_000);
assertThat(httpComponentsClientProperties.getReadTimeout()).isEqualTo(5_000);
}

@EnableConfigurationProperties(OkHttpProperties.class)
@EnableConfigurationProperties(HttpComponentsClientProperties.class)
static class OkHttpPropertiesWithDefaultValuesIntegrationTestConfiguration {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package pro.taskana.adapter.systemconnector.camunda.config;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import pro.taskana.adapter.systemconnector.camunda.config.HttpComponentsClientPropertiesWithUserDefinedValuesIntegrationTest.OkHttpPropertiesWithUserDefinedValuesIntegrationTestConfiguration;

@SpringBootTest(
classes = {OkHttpPropertiesWithUserDefinedValuesIntegrationTestConfiguration.class},
properties = {
"httpcomponentsclient.connection-timeout=1000",
"httpcomponentsclient.read-timeout=10000"
})
class HttpComponentsClientPropertiesWithUserDefinedValuesIntegrationTest {

@Test
void should_HaveConnectionTimeout1000ms_When_PropertyOkHttpConnectionTimeoutIsSet(
@Autowired HttpComponentsClientProperties httpComponentsClientProperties) {
assertThat(httpComponentsClientProperties.getConnectionTimeout()).isEqualTo(1_000);
}

@Test
void should_HaveReadTimeout10000ms_When_PropertyOkHttpReadTimeoutIsSet(
@Autowired HttpComponentsClientProperties httpComponentsClientProperties) {
assertThat(httpComponentsClientProperties.getReadTimeout()).isEqualTo(10_000);
}

@EnableConfigurationProperties(HttpComponentsClientProperties.class)
static class OkHttpPropertiesWithUserDefinedValuesIntegrationTestConfiguration {}
}

This file was deleted.

Loading