Skip to content

Commit

Permalink
Dependency management changes for JVM-SDK libraries. (#761)
Browse files Browse the repository at this point in the history
* Change gradle implementation to api for JVM-SDK dependencies.

* Update documentation and prepare release 7.0.0.
  • Loading branch information
praveenkumarct authored Aug 24, 2021
1 parent 339b606 commit f818e06
Show file tree
Hide file tree
Showing 18 changed files with 82 additions and 78 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# commercetools sync
[![CI](https://github.com/commercetools/commercetools-sync-java/workflows/CI/badge.svg)](https://github.com/commercetools/commercetools-sync-java/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
[![Benchmarks 6.0.0](https://img.shields.io/badge/Benchmarks-6.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![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)
[![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/)
[![Benchmarks 7.0.0](https://img.shields.io/badge/Benchmarks-7.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![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)
[![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/)
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)

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

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

- Library requires the min JDK version `>= 8`.
> 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).
- [commercetools-jvm-sdk](https://github.com/commercetools/commercetools-jvm-sdk) as a dependency in your JVM-based
application. (Make sure to use a version `>= 1.64.0`).
> 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).
- A target commercetools project for syncing your source data to.

### Installation
Expand All @@ -62,24 +60,24 @@ Here are the most popular ones:
<dependency>
<groupId>com.commercetools</groupId>
<artifactId>commercetools-sync-java</artifactId>
<version>6.0.0</version>
<version>7.0.0</version>
</dependency>
````

#### Gradle

````groovy
implementation 'com.commercetools:commercetools-sync-java:6.0.0'
implementation 'com.commercetools:commercetools-sync-java:7.0.0'
````

#### SBT

````
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "6.0.0"
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "7.0.0"
````

#### Ivy

````xml
<dependency org="com.commercetools" name="commercetools-sync-java" rev="6.0.0"/>
<dependency org="com.commercetools" name="commercetools-sync-java" rev="7.0.0"/>
````
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ apply from: "$rootDir/gradle-scripts/mkdocs.gradle"
apply from: "$rootDir/gradle-scripts/spotless.gradle"

dependencies {
implementation "com.commercetools.sdk.jvm.core:commercetools-models:${commercetoolsJvmSdkVersion}"
implementation "com.commercetools.sdk.jvm.core:commercetools-java-client-ahc-2_5:${commercetoolsJvmSdkVersion}"
implementation "com.commercetools.sdk.jvm.core:commercetools-convenience:${commercetoolsJvmSdkVersion}"
api "com.commercetools.sdk.jvm.core:commercetools-models:${commercetoolsJvmSdkVersion}"
api "com.commercetools.sdk.jvm.core:commercetools-java-client-ahc-2_5:${commercetoolsJvmSdkVersion}"
api "com.commercetools.sdk.jvm.core:commercetools-convenience:${commercetoolsJvmSdkVersion}"
implementation "com.github.ben-manes.caffeine:caffeine:${caffeineVersion}"
constraints {
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.3") {
Expand Down
16 changes: 7 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# commercetools sync
[![CI](https://github.com/commercetools/commercetools-sync-java/workflows/CI/badge.svg)](https://github.com/commercetools/commercetools-sync-java/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
[![Benchmarks 6.0.0](https://img.shields.io/badge/Benchmarks-6.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![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)
[![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/)
[![Benchmarks 7.0.0](https://img.shields.io/badge/Benchmarks-7.0.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
[![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)
[![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/)
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)


Expand All @@ -30,8 +30,6 @@ Notes:

- Library requires the min JDK version `>= 8`.
> 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).
- [commercetools-jvm-sdk](https://github.com/commercetools/commercetools-jvm-sdk) as a dependency in your JVM-based
application. (Make sure to use a version `>= 1.64.0`).
- A target commercetools project for syncing your source data to.

### Installation
Expand All @@ -42,18 +40,18 @@ Here are the most popular ones:
<dependency>
<groupId>com.commercetools</groupId>
<artifactId>commercetools-sync-java</artifactId>
<version>6.0.0</version>
<version>7.0.0</version>
</dependency>
````
#### Gradle
````groovy
implementation 'com.commercetools:commercetools-sync-java:6.0.0'
implementation 'com.commercetools:commercetools-sync-java:7.0.0'
````
#### SBT
````
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "6.0.0"
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "7.0.0"
````
#### Ivy
````xml
<dependency org="com.commercetools" name="commercetools-sync-java" rev="6.0.0"/>
<dependency org="com.commercetools" name="commercetools-sync-java" rev="7.0.0"/>
````
48 changes: 39 additions & 9 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,47 @@
7. Add Migration guide section which specifies explicitly if there are breaking changes and how to tackle them.
-->

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

- ✨ **Documentation** (1)
- Usage documentation on main readme improved, obsolete links is removed. [#758](https://github.com/commercetools/commercetools-sync-java/pull/758)
-->
- 🚧 **Breaking Changes** (1)
- **Dependency management:** Avoid `commercetools JVM SDK` libraries version mismatch between projects.
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.

For Gradle users, remove:

````groovy
implementation 'com.commercetools.sdk.jvm.core:commercetools-models:<version>'
implementation 'com.commercetools.sdk.jvm.core:commercetools-java-client-ahc-2_5:<version>'
implementation 'com.commercetools.sdk.jvm.core:commercetools-convenience:<version>'
````
For Maven users, remove:
````xml
<dependency>
<groupId>com.commercetools.sdk.jvm.core</groupId>
<artifactId>commercetools-models</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>com.commercetools.sdk.jvm.core</groupId>
<artifactId>commercetools-java-client-ahc-2_5</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>com.commercetools.sdk.jvm.core</groupId>
<artifactId>commercetools-convenience</artifactId>
<version>version</version>
</dependency>
````
✨ **Documentation** (1)
- Usage documentation on main readme improved, obsolete links is removed. [#758](https://github.com/commercetools/commercetools-sync-java/pull/758)
### 6.0.0 - Jul 19, 2021
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/5.1.3...6.0.0) |
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/6.0.0/) |
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/CART_DISCOUNT_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ against a [CartDiscountDraft](https://docs.commercetools.com/http-api-projects-c

#### SphereClient

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.
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.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -67,7 +67,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
##### Syncing from a commercetools project

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-)
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-)
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:

````java
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/CATEGORY_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ against a [CategoryDraft](https://docs.commercetools.com/http-api-projects-categ

#### SphereClient

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.
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.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

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

##### Syncing from a commercetools project

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-)
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-)
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:

````java
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/CUSTOMER_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ against a [CustomerDraft](https://docs.commercetools.com/api/projects/customers#
### Prerequisites
#### SphereClient

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.
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.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -69,7 +69,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
##### Syncing from a commercetools project

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-)
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-)
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:

````java
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/CUSTOM_OBJECT_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ against a [CustomObjectDraft](https://docs.commercetools.com/http-api-projects-c

#### SphereClient

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.
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.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/IMPORTANT_USAGE_TIPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ productSync.sync(batch1)
By design, scaling the sync process should **not** be done by executing the batches themselves in parallel. However, it can be done either by:

- 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.
- 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.
- 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.

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`
is the recommended good balance for stability and performance for the sync process.
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/INVENTORY_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ against a [InventoryEntryDraft](https://docs.commercetools.com/http-api-projects

#### SphereClient

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.
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.
If you have custom requirements for the sphere client creation, have a look into the [Important Usage Tips](IMPORTANT_USAGE_TIPS.md).

````java
Expand Down Expand Up @@ -68,7 +68,7 @@ Therefore, in order to resolve the actual ids of those references in the sync pr
##### Syncing from a commercetools project

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-)
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-)
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:

````java
Expand Down
Loading

0 comments on commit f818e06

Please sign in to comment.