https://github.com/commercetools/commercetools-sync-java
Java library for importing and syncing (taking care of changes) data into one or more commercetools projects from external data files or from another commercetools project.
https://github.com/commercetools/commercetools-sync-java
commercetools commercetools-importer commercetools-sdk commercetools-sync ecommerce hacktoberfest import-and-export java sdk sync
Last synced: about 1 year ago
JSON representation
Java library for importing and syncing (taking care of changes) data into one or more commercetools projects from external data files or from another commercetools project.
- Host: GitHub
- URL: https://github.com/commercetools/commercetools-sync-java
- Owner: commercetools
- License: apache-2.0
- Created: 2017-03-14T15:06:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T19:40:06.000Z (about 1 year ago)
- Last Synced: 2025-04-01T18:09:38.047Z (about 1 year ago)
- Topics: commercetools, commercetools-importer, commercetools-sdk, commercetools-sync, ecommerce, hacktoberfest, import-and-export, java, sdk, sync
- Language: Java
- Homepage: https://commercetools.github.io/commercetools-sync-java
- Size: 40.7 MB
- Stars: 34
- Watchers: 60
- Forks: 37
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

# commercetools sync java
[](https://github.com/commercetools/commercetools-sync-java/actions?query=workflow%3ACI)
[](https://codecov.io/gh/commercetools/commercetools-sync-java)
[](https://commercetools.github.io/commercetools-sync-java/v/10.0.6/)
[](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)
> Note: The current version of this library uses [JVM-SDK-V2](http://commercetools.github.io/commercetools-sdk-java-v2). This doc already contains updated information. Please migrate to this version, using our [Migration Guide](/docs/MIGRATION_GUIDE.md). The support for JVM SDK v1 has been discontinued with [commercetools-sync-java v9.2.3](https://github.com/commercetools/commercetools-sync-java/tree/9.2.3)
> If migration isn't an option for you, you can still use deprecated versions of this library available at [Maven central](https://central.sonatype.com/artifact/com.commercetools/commercetools-sync-java/9.2.3).
More at https://commercetools.github.io/commercetools-sync-java
Java library which allows to import/synchronise (import changes) the data from any arbitrary source to commercetools project.
Supported resources: [Categories](/docs/usage/CATEGORY_SYNC.md), [Products](/docs/usage/PRODUCT_SYNC.md), [InventoryEntries](/docs/usage/INVENTORY_SYNC.md), [ProductTypes](/docs/usage/PRODUCT_TYPE_SYNC.md), [Types](/docs/usage/TYPE_SYNC.md), [CartDiscounts](/docs/usage/CART_DISCOUNT_SYNC.md), [States](/docs/usage/STATE_SYNC.md), [TaxCategories](/docs/usage/TAX_CATEGORY_SYNC.md), [CustomObjects](/docs/usage/CUSTOM_OBJECT_SYNC.md), [Customers](/docs/usage/CUSTOMER_SYNC.md), [ShoppingLists](/docs/usage/SHOPPING_LIST_SYNC.md)
- [Usage](#usage)
- [Quick Start](/docs/usage/QUICK_START.md)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Maven](#maven)
- [Gradle](#gradle)
- [SBT](#sbt)
- [Ivy](#ivy)
- [Release Notes](/docs/RELEASE_NOTES.md)
## Usage
Create your own event or cronjob based application and use the library to transform any external data (JSON, CSV, XML, REST API, DB, ...) into [JVM-SDK-V2](http://commercetools.github.io/commercetools-sdk-java-v2) resource draft objects (e.g. [CategoryDraft](https://github.com/commercetools/commercetools-sdk-java-v2/blob/main/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/category/CategoryDraft.java)) and import those into the commercetools project.
Notes:
- It is often more efficient if you can setup your external data source to provide you only the changes (deltas) instead of the full data set on every import iteration.
- There is dockerized ready-to-use CLI application [commercetools-project-sync](https://github.com/commercetools/commercetools-project-sync) which based on this library can synchronize entire data catalogue between the 2 commercetools projects.
- During a synchronisation, resources are either created or updated, but **not** deleted.
⚡ See the [Quick Start Guide](/docs/usage/QUICK_START.md) for more information on building a product importer!

### Prerequisites
- Library requires the min JDK version `>= 11`.
> The library tested with each major JDK version (i.e: 11, 12, 13...) as well as some specific updates of LTS versions (i.e: 11.0.3 and above).
- A target commercetools project for syncing your source data to.
### Installation
There are multiple ways to add the commercetools sync dependency to your project, based on your dependency manager.
Here are the most popular ones:
#### Maven
````xml
com.commercetools
commercetools-sync-java
10.0.7
````
#### Gradle
````groovy
implementation 'com.commercetools:commercetools-sync-java:10.0.7'
````
#### SBT
````
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "10.0.7"
````
#### Ivy
````xml
````
**Note**: To 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:commercetools-http-client:${version}"
implementation "com.commercetools.sdk:commercetools-sdk-java-api:${version}"
```
For Maven users, remove:
````xml
com.commercetools.sdk
commercetools-http-client
version
com.commercetools.sdk
commercetools-sdk-java-v2
version
````
If you want to use a different `commercetools JVM SDK` version than the version used in this project.
, below you will find examples on how to exclude `commercetools JVM SDK` from commercetools-sync-java library. Beware that library might not work with the older `commercetools JVM SDK` versions.
For Gradle:
````groovy
implementation('com.commercetools:commercetools-sync-java') {
exclude group: 'com.commercetools.sdk', module: 'commercetools-http-client'
exclude group: 'com.commercetools.sdk', module: 'commercetools-sdk-java-api'
}
````
For Maven:
````xml
com.commercetools
commercetools-sync-java
version
com.commercetools.sdk
commercetools-http-client
com.commercetools.sdk
commercetools-sdk-java-v2
````