You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: migration-guides/from-box-java-sdk-gen-v0-to-box-java-sdk.md
+104-5Lines changed: 104 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
-
# Migration guide from beta release (v0.X.Y) of the `box-java-sdk-gen` to the v10 version of the `box-java-sdk`
1
+
# Migration guide from beta release (v0.X.Y) of the `box-java-sdk-gen` to the `box-java-sdk`
2
+
3
+
Note: This guide applies only to migrations targeting Box Java SDK v5.X.Y or v10.X.Y.
4
+
It does not apply to other major versions (e.g., v6.X, v11.X).
2
5
3
6
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4
7
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5
8
9
+
-[Introduction](#introduction)
6
10
-[Installation](#installation)
7
11
-[How to migrate](#how-to-migrate)
8
12
-[Maven](#maven)
@@ -11,20 +15,39 @@
11
15
-[How to migrate](#how-to-migrate-1)
12
16
-[Removed unused models from schemas namespace](#removed-unused-models-from-schemas-namespace)
13
17
-[How to migrate](#how-to-migrate-2)
18
+
-[Usage](#usage)
19
+
-[Using the Box Java SDK v10](#using-the-box-java-sdk-v10)
20
+
-[Using the Box Java SDK v5](#using-the-box-java-sdk-v5)
14
21
15
22
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
16
23
24
+
## Introduction
25
+
26
+
From the `box-java-sdk-gen` you can migrate either to v5 or v10 of the Box Java SDK.
27
+
Your choice should depend on whether you want to continue using the manually maintained SDK (Box Java SDK v4) alongside the generated one or not.
28
+
29
+
The v5 version of the Box Java SDK consolidates both the legacy SDK package `com.box.sdk` and the generated one `com.box.sdkgen`.
30
+
31
+
- If previously you were using both artifacts `box-java-sdk` v4 and `box-java-sdk-gen` v0, migrate to v5 version of the Box Java SDK which consolidates `com.box.sdk` and `com.box.sdkgen` packages.
32
+
- If you were only using the generated artifact `box-java-sdk-gen`, migrate to v10 version of the Box Java SDK which contains only the generated `com.box.sdkgen` package.
33
+
34
+
| Scenario | Your current usage | Recommended target | Packages included in target | Why this choice | Notes |
| Using both manual and generated SDK together |`com.box.sdk` v4 + `com.box.sdkgen` v0 in the same project | v5.X.Y |`com.box.sdk` (manual) + `com.box.sdkgen` (generated) | Keep existing v4 code while adopting new features from the generated SDK | Run both modules side by side; use type aliases to avoid name conflicts if necessary |
37
+
| Using only the generated SDK |`com.box.sdkgen` v0 only | v10.X.Y |`com.box.sdkgen` (generated) only | Clean upgrade path with no legacy module; simpler dependency surface | Best when you don’t need the manual `com.box.sdk` package |
38
+
17
39
## Installation
18
40
19
-
In order to start using v10 version of the Box Java SDK, you need to change the dependency in your project.
41
+
In order to start using v5 or v10 version of the Box Java SDK, you need to change the dependency in your project.
20
42
The artifact name has changed from `com.box:box-java-sdk-gen` to `com.box:box-java-sdk`.
21
-
You also need to set the version to `10.0.0` or higher. You can find the latest version on [Maven Central](https://search.maven.org/artifact/com.box/box-java-sdk).
43
+
You also need to set the version to `5.X.Y` if you are migrating to v5 or `10.X.Y` if you are migrating to v10.
44
+
You can find the latest version on [Maven Central](https://search.maven.org/artifact/com.box/box-java-sdk).
22
45
23
46
### How to migrate
24
47
25
48
#### Maven
26
49
27
-
To start using v10 version of Box Java SDK in your Maven project replace the dependency in your `pom.xml` file.
50
+
To start using v5 or v10 version of Box Java SDK in your Maven project replace the dependency in your `pom.xml` file.
28
51
29
52
**Old (`box-java-sdk-gen-v0`)**
30
53
@@ -46,9 +69,19 @@ To start using v10 version of Box Java SDK in your Maven project replace the dep
46
69
</dependency>
47
70
```
48
71
72
+
**New (`box-java-sdk-v5`)**
73
+
74
+
```xml
75
+
<dependency>
76
+
<groupId>com.box</groupId>
77
+
<artifactId>box-java-sdk</artifactId>
78
+
<version>5.0.0</version>
79
+
</dependency>
80
+
```
81
+
49
82
#### Gradle
50
83
51
-
To start using v10 version of Box Java SDK in your Gradle project replace the dependency in your `build.gradle` file.
84
+
To start using v5 or v10 version of Box Java SDK in your Gradle project replace the dependency in your `build.gradle` file.
0 commit comments