Skip to content

Commit f818e06

Browse files
Dependency management changes for JVM-SDK libraries. (#761)
* Change gradle implementation to api for JVM-SDK dependencies. * Update documentation and prepare release 7.0.0.
1 parent 339b606 commit f818e06

18 files changed

+82
-78
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# commercetools sync
33
[![CI](https://github.com/commercetools/commercetools-sync-java/workflows/CI/badge.svg)](https://github.com/commercetools/commercetools-sync-java/actions?query=workflow%3ACI)
44
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
5-
[![Benchmarks 6.0.0](https://img.shields.io/badge/Benchmarks-6.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
6-
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-6.0.0-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/6.0.0/jar)
7-
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/)
5+
[![Benchmarks 7.0.0](https://img.shields.io/badge/Benchmarks-7.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
6+
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-7.0.0-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/7.0.0/jar)
7+
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/)
88
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)
99

1010
More at https://commercetools.github.io/commercetools-sync-java
@@ -25,7 +25,7 @@ Supported resources: [Categories](/docs/usage/CATEGORY_SYNC.md), [Products](/doc
2525
- [SBT](#sbt)
2626
- [Ivy](#ivy)
2727
- [Release Notes](/docs/RELEASE_NOTES.md)
28-
- [Javadoc](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/)
28+
- [Javadoc](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/)
2929
- [Benchmarks](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
3030

3131
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -46,9 +46,7 @@ Notes:
4646
### Prerequisites
4747

4848
- Library requires the min JDK version `>= 8`.
49-
> The library tested with each major JDK version (i.e: 8, 9, 10, 11, 12, 13...) as well as some specific updates of LTS versions (i.e: 8.0.192, 11.0.3).
50-
- [commercetools-jvm-sdk](https://github.com/commercetools/commercetools-jvm-sdk) as a dependency in your JVM-based
51-
application. (Make sure to use a version `>= 1.64.0`).
49+
> The library tested with each major JDK version (i.e: 8, 9, 10, 11, 12, 13...) as well as some specific updates of LTS versions (i.e: 8.0.192, 11.0.3).
5250
- A target commercetools project for syncing your source data to.
5351

5452
### Installation
@@ -62,24 +60,24 @@ Here are the most popular ones:
6260
<dependency>
6361
<groupId>com.commercetools</groupId>
6462
<artifactId>commercetools-sync-java</artifactId>
65-
<version>6.0.0</version>
63+
<version>7.0.0</version>
6664
</dependency>
6765
````
6866

6967
#### Gradle
7068

7169
````groovy
72-
implementation 'com.commercetools:commercetools-sync-java:6.0.0'
70+
implementation 'com.commercetools:commercetools-sync-java:7.0.0'
7371
````
7472

7573
#### SBT
7674

7775
````
78-
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "6.0.0"
76+
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "7.0.0"
7977
````
8078

8179
#### Ivy
8280

8381
````xml
84-
<dependency org="com.commercetools" name="commercetools-sync-java" rev="6.0.0"/>
82+
<dependency org="com.commercetools" name="commercetools-sync-java" rev="7.0.0"/>
8583
````

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ apply from: "$rootDir/gradle-scripts/mkdocs.gradle"
4242
apply from: "$rootDir/gradle-scripts/spotless.gradle"
4343

4444
dependencies {
45-
implementation "com.commercetools.sdk.jvm.core:commercetools-models:${commercetoolsJvmSdkVersion}"
46-
implementation "com.commercetools.sdk.jvm.core:commercetools-java-client-ahc-2_5:${commercetoolsJvmSdkVersion}"
47-
implementation "com.commercetools.sdk.jvm.core:commercetools-convenience:${commercetoolsJvmSdkVersion}"
45+
api "com.commercetools.sdk.jvm.core:commercetools-models:${commercetoolsJvmSdkVersion}"
46+
api "com.commercetools.sdk.jvm.core:commercetools-java-client-ahc-2_5:${commercetoolsJvmSdkVersion}"
47+
api "com.commercetools.sdk.jvm.core:commercetools-convenience:${commercetoolsJvmSdkVersion}"
4848
implementation "com.github.ben-manes.caffeine:caffeine:${caffeineVersion}"
4949
constraints {
5050
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.3") {

docs/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# commercetools sync
33
[![CI](https://github.com/commercetools/commercetools-sync-java/workflows/CI/badge.svg)](https://github.com/commercetools/commercetools-sync-java/actions?query=workflow%3ACI)
44
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
5-
[![Benchmarks 6.0.0](https://img.shields.io/badge/Benchmarks-6.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
6-
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-6.0.0-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/6.0.0/jar)
7-
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/)
5+
[![Benchmarks 7.0.0](https://img.shields.io/badge/Benchmarks-7.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
6+
[![Download from Maven Central](https://img.shields.io/badge/Maven_Central-7.0.0-blue.svg)](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/7.0.0/jar)
7+
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/)
88
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)
99

1010

@@ -30,8 +30,6 @@ Notes:
3030

3131
- Library requires the min JDK version `>= 8`.
3232
> The library tested with each major JDK version (i.e: 8, 9, 10, 11, 12, 13...) as well as some specific updates of LTS versions (i.e: 8.0.192, 11.0.3).
33-
- [commercetools-jvm-sdk](https://github.com/commercetools/commercetools-jvm-sdk) as a dependency in your JVM-based
34-
application. (Make sure to use a version `>= 1.64.0`).
3533
- A target commercetools project for syncing your source data to.
3634

3735
### Installation
@@ -42,18 +40,18 @@ Here are the most popular ones:
4240
<dependency>
4341
<groupId>com.commercetools</groupId>
4442
<artifactId>commercetools-sync-java</artifactId>
45-
<version>6.0.0</version>
43+
<version>7.0.0</version>
4644
</dependency>
4745
````
4846
#### Gradle
4947
````groovy
50-
implementation 'com.commercetools:commercetools-sync-java:6.0.0'
48+
implementation 'com.commercetools:commercetools-sync-java:7.0.0'
5149
````
5250
#### SBT
5351
````
54-
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "6.0.0"
52+
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "7.0.0"
5553
````
5654
#### Ivy
5755
````xml
58-
<dependency org="com.commercetools" name="commercetools-sync-java" rev="6.0.0"/>
56+
<dependency org="com.commercetools" name="commercetools-sync-java" rev="7.0.0"/>
5957
````

docs/RELEASE_NOTES.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,47 @@
2727
7. Add Migration guide section which specifies explicitly if there are breaking changes and how to tackle them.
2828
-->
2929

30-
<!--
31-
### x.x.x - MM DD, 2021
32-
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/6.0.0...X.X.X) |
33-
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/X.X.X/) |
34-
[Jar](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/X.X.X/jar)
30+
### 7.0.0 - Aug 24, 2021
31+
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/6.0.0...7.0.0) |
32+
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/) |
33+
[Jar](https://search.maven.org/artifact/com.commercetools/commercetools-sync-java/7.0.0/jar)
3534

36-
- ✨ **Documentation** (1)
37-
- Usage documentation on main readme improved, obsolete links is removed. [#758](https://github.com/commercetools/commercetools-sync-java/pull/758)
38-
39-
-->
35+
- 🚧 **Breaking Changes** (1)
36+
- **Dependency management:** Avoid `commercetools JVM SDK` libraries version mismatch between projects.
37+
It is better not to add `commercetools JVM SDK` dependencies explicitly into your project and use them from `commercetools-Sync-Java` dependencies instead. Please remove them if you have already added the below dependencies in your project.
38+
39+
For Gradle users, remove:
40+
41+
````groovy
42+
implementation 'com.commercetools.sdk.jvm.core:commercetools-models:<version>'
43+
implementation 'com.commercetools.sdk.jvm.core:commercetools-java-client-ahc-2_5:<version>'
44+
implementation 'com.commercetools.sdk.jvm.core:commercetools-convenience:<version>'
45+
````
46+
47+
For Maven users, remove:
48+
49+
````xml
50+
<dependency>
51+
<groupId>com.commercetools.sdk.jvm.core</groupId>
52+
<artifactId>commercetools-models</artifactId>
53+
<version>version</version>
54+
</dependency>
55+
<dependency>
56+
<groupId>com.commercetools.sdk.jvm.core</groupId>
57+
<artifactId>commercetools-java-client-ahc-2_5</artifactId>
58+
<version>version</version>
59+
</dependency>
60+
<dependency>
61+
<groupId>com.commercetools.sdk.jvm.core</groupId>
62+
<artifactId>commercetools-convenience</artifactId>
63+
<version>version</version>
64+
</dependency>
65+
````
66+
67+
✨ **Documentation** (1)
68+
- Usage documentation on main readme improved, obsolete links is removed. [#758](https://github.com/commercetools/commercetools-sync-java/pull/758)
4069
70+
4171
### 6.0.0 - Jul 19, 2021
4272
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/5.1.3...6.0.0) |
4373
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/) |

docs/usage/CART_DISCOUNT_SYNC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ against a [CartDiscountDraft](https://docs.commercetools.com/http-api-projects-c
3636

3737
#### SphereClient
3838

39-
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/6.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
39+
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/7.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
4040
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
4141

4242
````java
@@ -67,7 +67,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
6767
6868
##### Syncing from a commercetools project
6969

70-
When syncing from a source commercetools project, you can use [`toCartDiscountDrafts`](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/com/commercetools/sync/cartdiscounts/utils/CartDiscountTransformUtils.html#toCartDiscountDrafts-java.util.List-)
70+
When syncing from a source commercetools project, you can use [`toCartDiscountDrafts`](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/com/commercetools/sync/cartdiscounts/utils/CartDiscountTransformUtils.html#toCartDiscountDrafts-java.util.List-)
7171
method that transforms(resolves by querying and caching key-id pairs) and maps from a `CartDiscount` to `CartDiscountDraft` using cache in order to make them ready for reference resolution by the sync, for example:
7272

7373
````java

docs/usage/CATEGORY_SYNC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ against a [CategoryDraft](https://docs.commercetools.com/http-api-projects-categ
3636

3737
#### SphereClient
3838

39-
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/6.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
39+
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/7.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
4040
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
4141

4242
````java
@@ -135,7 +135,7 @@ As soon, as the referenced parent Category draft is supplied to the sync, the dr
135135

136136
##### Syncing from a commercetools project
137137

138-
When syncing from a source commercetools project, you can use [`toCategoryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/com/commercetools/sync/categories/utils/CategoryTransformUtils.html#toCategoryDrafts-java.util.List-)
138+
When syncing from a source commercetools project, you can use [`toCategoryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/com/commercetools/sync/categories/utils/CategoryTransformUtils.html#toCategoryDrafts-java.util.List-)
139139
method that transforms(resolves by querying and caching key-id pairs) and maps from a `Category` to `CategoryDraft` using cache in order to make them ready for reference resolution by the sync, for example:
140140

141141
````java

docs/usage/CUSTOMER_SYNC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ against a [CustomerDraft](https://docs.commercetools.com/api/projects/customers#
3535
### Prerequisites
3636
#### SphereClient
3737

38-
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/6.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
38+
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/7.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
3939
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
4040

4141
````java
@@ -69,7 +69,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
6969
7070
##### Syncing from a commercetools project
7171

72-
When syncing from a source commercetools project, you can use [`toCustomerDrafts`](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/com/commercetools/sync/customers/utils/CustomerTransformUtils.html#toCustomerDrafts-java.util.List-)
72+
When syncing from a source commercetools project, you can use [`toCustomerDrafts`](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/com/commercetools/sync/customers/utils/CustomerTransformUtils.html#toCustomerDrafts-java.util.List-)
7373
method that transforms(resolves by querying and caching key-id pairs) and maps from a `Customer` to `CustomerDraft` using cache in order to make them ready for reference resolution by the sync, for example:
7474

7575
````java

docs/usage/CUSTOM_OBJECT_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ against a [CustomObjectDraft](https://docs.commercetools.com/http-api-projects-c
3131

3232
#### SphereClient
3333

34-
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/6.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
34+
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/7.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
3535
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
3636

3737
````java

docs/usage/IMPORTANT_USAGE_TIPS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ productSync.sync(batch1)
3131
By design, scaling the sync process should **not** be done by executing the batches themselves in parallel. However, it can be done either by:
3232

3333
- Changing the number of [max parallel requests](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L116) within the `sphereClient` configuration. It defines how many requests the client can execute in parallel.
34-
- or changing the draft [batch size](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/com/commercetools/sync/commons/BaseSyncOptionsBuilder.html#batchSize-int-). It defines how many drafts can one batch contains.
34+
- or changing the draft [batch size](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/com/commercetools/sync/commons/BaseSyncOptionsBuilder.html#batchSize-int-). It defines how many drafts can one batch contains.
3535

3636
The current overridable default [configuration](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) of the `sphereClient`
3737
is the recommended good balance for stability and performance for the sync process.

docs/usage/INVENTORY_SYNC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ against a [InventoryEntryDraft](https://docs.commercetools.com/http-api-projects
3636

3737
#### SphereClient
3838

39-
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/6.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
39+
Use the [ClientConfigurationUtils](https://github.com/commercetools/commercetools-sync-java/blob/7.0.0/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) which apply the best practices for `SphereClient` creation.
4040
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).
4141

4242
````java
@@ -68,7 +68,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
6868
6969
##### Syncing from a commercetools project
7070

71-
When syncing from a source commercetools project, you can use [`toInventoryEntryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/com/commercetools/sync/inventories/utils/InventoryTransformUtils.html#toInventoryEntryDrafts-java.util.List-)
71+
When syncing from a source commercetools project, you can use [`toInventoryEntryDrafts`](https://commercetools.github.io/commercetools-sync-java/v/7.0.0/com/commercetools/sync/inventories/utils/InventoryTransformUtils.html#toInventoryEntryDrafts-java.util.List-)
7272
method that transforms(resolves by querying and caching key-id pairs) and maps from a `InventoryEntry` to `InventoryEntryDraft` using cache in order to make them ready for reference resolution by the sync, for example:
7373

7474
````java

0 commit comments

Comments
 (0)