Skip to content

Commit

Permalink
Closes #612: Switch from SB2.7.X to SB3.1.X and from javax to jakarta
Browse files Browse the repository at this point in the history
  • Loading branch information
arolfes committed Nov 27, 2023
1 parent 1e65284 commit 0d29b78
Show file tree
Hide file tree
Showing 21 changed files with 101 additions and 84 deletions.
2 changes: 1 addition & 1 deletion camunda-outbox-example-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-spring-boot-starter</artifactId>
<artifactId>resteasy-servlet-spring-boot-starter</artifactId>
<version>${version.resteasy.spring.boot}</version>
</dependency>
</dependencies>
Expand Down
21 changes: 12 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<version.taskana>7.0.1-SNAPSHOT</version.taskana>
<version.taskana>8.0.0</version.taskana>

<!-- build dependencies -->
<version.checkstyle>10.12.4</version.checkstyle>
Expand All @@ -59,16 +59,19 @@
<version.maven.sonar>3.10.0.2594</version.maven.sonar>

<version.mybatis>3.5.13</version.mybatis>
<version.spring.mybatis>2.2.2</version.spring.mybatis>
<version.spring.mybatis>3.0.2</version.spring.mybatis>

<version.spring>5.3.26.RELEASE</version.spring>
<version.spring.core>3.0.0</version.spring.core>
<version.spring.boot>2.7.10</version.spring.boot>
<version.spring.plugin.core>3.0.0</version.spring.plugin.core>
<version.spring.boot>3.1.5</version.spring.boot>

<version.camunda>7.17.0</version.camunda>
<version.camunda.bpm.extensions>1.2</version.camunda.bpm.extensions>
<version.camunda.spin>1.19.1</version.camunda.spin>
<version.resteasy.spring.boot>5.0.0.Final</version.resteasy.spring.boot>
<version.camunda>7.20.0</version.camunda>
<version.camunda.spin>1.22.0</version.camunda.spin>

<version.jakarta.annotation>2.1.1</version.jakarta.annotation>
<version.jakarta.servlet>6.0.0</version.jakarta.servlet>
<version.jakarta-ws-rs-api>3.1.0</version.jakarta-ws-rs-api>

<version.resteasy.spring.boot>6.0.4.Final</version.resteasy.spring.boot>
<version.resteasy.jaxrs>3.0.12.Final</version.resteasy.jaxrs>
<version.javax.ws.rs.api>2.1.1</version.javax.ws.rs.api>
<version.org.webjars.bootstrap>5.3.1</version.org.webjars.bootstrap>
Expand Down
19 changes: 7 additions & 12 deletions taskana-adapter-camunda-listener-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${version.javax.ws.rs.api}</version>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>${version.jakarta-ws-rs-api}</version>
</dependency>
<!-- Jersey 2.19 -->
<dependency>
Expand All @@ -54,13 +54,6 @@
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-cdi</artifactId>
</dependency>
<dependency>
<!-- AssertJ Testing Library -->
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<version>${version.camunda.bpm.extensions}</version>
<scope>test</scope>
</dependency>
<!-- Required to use Spin dataformat support in unit tests -->
<dependency>
<groupId>org.camunda.spin</groupId>
Expand All @@ -76,12 +69,14 @@
<dependency>
<groupId>org.camunda.template-engines</groupId>
<artifactId>camunda-template-engines-freemarker</artifactId>
<scope>provided</scope>
<version>2.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.template-engines</groupId>
<artifactId>camunda-template-engines-velocity</artifactId>
<scope>provided</scope>
<version>2.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- Bootstrap for styling via Webjars project -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>jaxrs-api</artifactId>
<version>${version.resteasy.jaxrs}</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
7 changes: 3 additions & 4 deletions taskana-adapter-camunda-outbox-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@
<version>${version.camunda.spin}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>jaxrs-api</artifactId>
<version>${version.resteasy.jaxrs}</version>
<scope>provided</scope>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>${version.jakarta-ws-rs-api}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package pro.taskana.adapter.camunda.outbox.rest.config;

import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
import java.util.HashSet;
import java.util.Set;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import pro.taskana.adapter.camunda.outbox.rest.controller.CamundaTaskEventsController;
import pro.taskana.adapter.camunda.outbox.rest.exception.CamundaTaskEventNotFoundExceptionMapper;
import pro.taskana.adapter.camunda.outbox.rest.exception.InvalidArgumentExceptionMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package pro.taskana.adapter.camunda.outbox.rest.controller;

import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.PATCH;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.UriInfo;
import java.util.List;
import java.util.Map;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import pro.taskana.adapter.camunda.outbox.rest.exception.CamundaTaskEventNotFoundException;
import pro.taskana.adapter.camunda.outbox.rest.exception.InvalidArgumentException;
import pro.taskana.adapter.camunda.outbox.rest.model.CamundaTaskEvent;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pro.taskana.adapter.camunda.outbox.rest.exception;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.ext.ExceptionMapper;

public class CamundaTaskEventNotFoundExceptionMapper
implements ExceptionMapper<CamundaTaskEventNotFoundException> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pro.taskana.adapter.camunda.outbox.rest.exception;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.ext.ExceptionMapper;

public class InvalidArgumentExceptionMapper implements ExceptionMapper<InvalidArgumentException> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pro.taskana.adapter.camunda.outbox.rest.exception;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.ext.ExceptionMapper;
import spinjar.com.fasterxml.jackson.core.JsonParseException;

public class JsonParseExceptionMapper implements ExceptionMapper<JsonParseException> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pro.taskana.adapter.camunda.outbox.rest.exception;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.ext.ExceptionMapper;
import spinjar.com.fasterxml.jackson.databind.exc.MismatchedInputException;

public class MismatchedInputExceptionMapper implements ExceptionMapper<MismatchedInputException> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static java.util.stream.Collectors.toList;

import jakarta.ws.rs.core.MultivaluedMap;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
Expand All @@ -21,7 +22,6 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import javax.ws.rs.core.MultivaluedMap;
import org.apache.ibatis.datasource.pooled.PooledDataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
18 changes: 13 additions & 5 deletions taskana-adapter-camunda-spring-boot-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
<version>${project.version}</version>
<type>war</type>
</dependency>
<!-- taskana-adapter-camunda-outbox-rest uses JAX-RS annotations therefore we need resteasy-spring-boot dependency -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-servlet-spring-boot-starter</artifactId>
<version>${version.resteasy.spring.boot}</version>
</dependency>
<!-- Database Drivers -->
<dependency>
<groupId>com.ibm.db2</groupId>
Expand All @@ -138,11 +144,6 @@
<artifactId>taskana-adapter-camunda-outbox-rest-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-spring-boot-starter</artifactId>
<version>${version.resteasy.spring.boot}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand All @@ -159,6 +160,13 @@
<version>${version.archunit}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${version.jakarta.annotation}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
server.port= 10020
spring.main.allow-bean-definition-overriding=true

# properties for resteasy-servlet-spring-boot-starter
# without these 2 propertiers the camunda-context is registered twice
resteasy.jaxrs.app.registration=property
resteasy.jaxrs.app.classes=pro.taskana.adapter.camunda.outbox.rest.config.OutboxRestServiceConfig

######################################################################################
## Adapter properties
Expand Down Expand Up @@ -97,6 +101,9 @@ camunda.bpm.admin-user.password = admin
camunda.bpm.admin-user.firstName = admin
camunda.bpm.filter.create = All tasks

# new mandatory field starting from camunda version 7.20
# see https://forum.camunda.io/t/camunda-7-20-history-time-to-live-cannot-be-null-cannot-deploy-wf-created-in-7-18/48159
camunda.bpm.generic-properties.properties.historyTimeToLive: P180D

#Postgres
# camunda.datasource.jdbcUrl= jdbc:postgresql://localhost:5432/postgres
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
server.port= 10020
spring.main.allow-bean-definition-overriding=true

# properties for resteasy-servlet-spring-boot-starter
# without these 2 propertiers the camunda-context is registered twice
resteasy.jaxrs.app.registration=property
resteasy.jaxrs.app.classes=pro.taskana.adapter.camunda.outbox.rest.config.OutboxRestServiceConfig

######################################################################################
## Adapter properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
server.port= 10020
spring.main.allow-bean-definition-overriding=true

# properties for resteasy-servlet-spring-boot-starter
# without these 2 propertiers the camunda-context is registered twice
resteasy.jaxrs.app.registration=property
resteasy.jaxrs.app.classes=pro.taskana.adapter.camunda.outbox.rest.config.OutboxRestServiceConfig

######################################################################################
## Adapter properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pro.taskana.adapter.integration;

import com.zaxxer.hikari.HikariDataSource;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import javax.sql.DataSource;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.junit.jupiter.api.BeforeEach;
Expand Down
7 changes: 4 additions & 3 deletions taskana-adapter-camunda-wildfly-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@
<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId>
<version>${version.spring.core}</version>
<version>${version.spring.plugin.core}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${version.jakarta.servlet}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
5 changes: 5 additions & 0 deletions taskana-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
<artifactId>taskana-spring</artifactId>
<version>${version.taskana}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${version.jakarta.annotation}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
package pro.taskana.adapter.systemconnector.api;

import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;

/** encapsulate a response from the external system. */
public class SystemResponse {
private HttpStatus statusCode;
private Throwable throwable;
private final HttpStatus statusCode;
private final Throwable throwable;

public SystemResponse(int statusCode, Throwable throwable) {
this(HttpStatus.resolve(statusCode), throwable);
}

public SystemResponse(HttpStatusCode statusCode, Throwable throwable) {
this(HttpStatus.resolve(statusCode.value()), throwable);
}

public SystemResponse(HttpStatus statusCode, Throwable throwable) {
this.statusCode = statusCode;
Expand Down

0 comments on commit 0d29b78

Please sign in to comment.