[MODWRKFLOW-8] Upgrade to Spring Boot 3 Created: 12/Jan/24  Updated: 06/Feb/24

Status: In Review
Project: mod-workflow
Components: None
Affects versions: None
Fix versions: None

Type: Tech Debt Priority: P1
Reporter: Kevin Day Assignee: Kevin Day
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks MODWRKFLOW-10 Migrate project to the spring-way dep... Closed
blocks MODWRKFLOW-6 Basic CQL Support Blocked
Sprint: Aggies Sprint 1, Aggies Sprint 2
Story Points: 2
Development Team: Aggies
RCA Group: TBD

 Description   

Mod-workflow is using spring-module-core version 1.1.5, which is Spring Boot 2.7.

Switch over to spring-module-core 2.0.0 and upgrade mod-workflow to use Spring Boot 3.



 Comments   
Comment by Kevin Day [ 17/Jan/24 ]

Upgrading to Spring-Boot 3.0 for mod-workflow (which requires switching to spring-module-core 2.0.0 or later).

Switching all of the dependencies into Jakarta works, except for one major problem area.

The mbknor-jackson-jsonschema dependency is out of date and still using the javaxml that is replaced by Jakarta when upgrading to Spring-Boot 3.
The jackson-module-jsonSchema-jakarta provides and appropriate upgrade but that module:
1. Fails to properly handle all of the details needed to generate a proper model schema representation in the same way mbknor-jackson-jsonschema does.
2. Support is being removed for versions later than 2 ("Due to lack of support by community, this module is NOT planned to be supported beyond Jackson 2.x").

The problem is that mbknor-jackson-jsonschema has not been actively maintained for a few years and has several relevant issues on Github:
1. https://github.com/mbknor/mbknor-jackson-jsonSchema/issues/173
2. https://github.com/mbknor/mbknor-jackson-jsonSchema/pull/159

mbknor-jackson-jsonschema is using Kotlin rather than pure Java, making it more diffucult to fork and fix.
However, somebody did go out of their way to make a pure Java version here:

It is possible to use that custom fork, but additional work is needed to port this over to Jakarta by adding the following to the pom.xml and fixing the dependency usages:

<dependency>
    <groupId>jakarta.validation</groupId>
    <artifactId>jakarta.validation-api</artifactId>
    <version>3.1.0-M1</version>
</dependency>
<dependency>
    <groupId>jakarta.annotation</groupId>
    <artifactId>jakarta.annotation-api</artifactId>
    <version>3.0.0-M1</version>
</dependency>

This solution is not ideal, at all.

Therefore, this issue is blocked for further investigation and until a decision can be made on how to handle these dependency problems.

see: https://mvnrepository.com/artifact/com.kjetland/mbknor-jackson-jsonschema
see: https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-jsonSchema-jakarta
see: https://github.com/mbknor/mbknor-jackson-jsonSchema
see: https://github.com/FasterXML/jackson-module-jsonSchema

Generated at Thu Feb 08 22:31:33 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.