Skip to content

Commit abf0b65

Browse files
authored
docs: update lyo 7.x migration guide for JDK 21 and JSON4J removal (#45)
* docs: update lyo 7.x migration guide for JDK 21 and JSON4J removal * Update migration guide for Lyo 7.x changes
1 parent eccf23a commit abf0b65

1 file changed

Lines changed: 37 additions & 5 deletions

File tree

docs-new/eclipse_lyo/migration-6x-7x.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ Migration from Lyo 6.x to 7.x involves:
2525

2626
| Component | Lyo 6.x | Lyo 7.x |
2727
|-----------|---------|---------|
28-
| **JDK baseline** | 17 | 17 (21 planned) |
29-
| **Apache Jena** | 4.8 | 4.10 (5.x planned) |
28+
| **JDK baseline** | 17 | 21 |
29+
| **Apache Jena** | 4.8 | 6.1.0 |
3030
| **Jersey** | 3.1.5 | 3.1.5 (3.1.10 planned) |
3131
| **Jakarta EE** | EE10 | EE10 |
3232

3333
### Breaking Changes Summary
3434

35+
-**JDK 17 support removed** (JDK 21+ required)
3536
-**`oslc4j-json4j-provider` removed** (deprecated dependency)
36-
- 🔄 **Apache Jena 4.10 API changes** (minor breaking changes)
37-
-**Most applications should migrate seamlessly**
37+
- 🔄 **Apache Jena 5.x and 6.x API changes** (minor downstream breaking changes unless your app uses TDB1 directly)
38+
-**Most applications should migrate seamlessly if compiled with Java 21**
3839

3940
## Step-by-Step Migration
4041

@@ -60,14 +61,32 @@ grep -r "org.apache.jena" src/
6061
### Phase 2: Dependency Updates
6162

6263
#### 2.1 Update Lyo Version
64+
Update the Lyo version in your properties. Note that starting with version `7.0.0.Alpha4`, Eclipse Lyo introduced a **Bill of Materials (BOM)** to simplify dependency management and ensure version convergence across different Lyo artifacts:
65+
6366
```xml
6467
<properties>
65-
<lyo.version>7.0.0.Alpha3</lyo.version>
68+
<lyo.version>7.0.0-Alpha.12</lyo.version> <!-- Use the latest available version -->
6669
<!-- Other versions remain the same -->
6770
<jersey.version>3.1.5</jersey.version>
6871
</properties>
6972
```
7073

74+
You can optionally manage Lyo dependencies via the new BOM in `<dependencyManagement>`:
75+
76+
```xml
77+
<dependencyManagement>
78+
<dependencies>
79+
<dependency>
80+
<groupId>org.eclipse.lyo</groupId>
81+
<artifactId>lyo-bom</artifactId>
82+
<version>${lyo.version}</version>
83+
<type>pom</type>
84+
<scope>import</scope>
85+
</dependency>
86+
</dependencies>
87+
</dependencyManagement>
88+
```
89+
7190
#### 2.2 Remove Deprecated Dependencies
7291
If using the deprecated JSON4J provider:
7392

@@ -82,6 +101,19 @@ If using the deprecated JSON4J provider:
82101
-->
83102
```
84103

104+
!!! note "Wink JSON4J Classes Usage"
105+
If the project code (such as generated selection/creation dialogue methods) still imports and uses classes from `org.apache.wink.json4j.*` (like `JSONObject`, `JSONArray`, or `JSONException`), a direct dependency on Apache Wink JSON4J shall be added to the `pom.xml` to avoid compilation errors:
106+
107+
```xml
108+
<dependency>
109+
<groupId>org.apache.wink</groupId>
110+
<artifactId>wink-json4j</artifactId>
111+
<version>1.4</version>
112+
</dependency>
113+
```
114+
115+
The `Json4JProvidersRegistry` and `JsonHelper` imports and registrations shall also be removed from the JAX-RS Application registration logic, as these specific helpers were part of the removed `oslc4j-json4j-provider` wrapper.
116+
85117
### Phase 3: Code Changes (Minimal Expected)
86118

87119
#### 3.1 JSON4J Provider Replacement

0 commit comments

Comments
 (0)