Giter Club home page Giter Club logo

commercetools-sync-java's Introduction

commercetools-java-sync-logos 002

commercetools sync

CI codecov Benchmarks 9.2.1 Download from Maven Central Javadoc Known Vulnerabilities

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, Products, InventoryEntries, ProductTypes, Types, CartDiscounts, States, TaxCategories, CustomObjects, Customers, ShoppingLists

Usage

Create you own event or cronjob based application and use the library to transform any external data (JSON, CSV, XML, REST API, DB, ...) into commercetools-jvm-sdk resource draft objects (e.g. CategoryDraft) 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 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 for more information on building a product importer!

commercetools-java-sync-final 001

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

<dependency>
  <groupId>com.commercetools</groupId>
  <artifactId>commercetools-sync-java</artifactId>
  <version>9.2.1</version>
</dependency>

Gradle

implementation 'com.commercetools:commercetools-sync-java:9.2.1'

SBT

libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "9.2.1"

Ivy

<dependency org="com.commercetools" name="commercetools-sync-java" rev="9.2.1"/>

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

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.jvm.core', module: 'commercetools-models'
        exclude group: 'com.commercetools.sdk.jvm.core', module: 'commercetools-java-client-ahc-2_5'
        exclude group: 'com.commercetools.sdk.jvm.core', module: 'commercetools-convenience'
    }
    ````
    
    For Maven:
    
    ````xml
    <dependency>
      <groupId>com.commercetools</groupId>
      <artifactId>commercetools-sync-java</artifactId>
      <version>version</version>
      <exclusions>
        <exclusion>
            <groupId>com.commercetools.sdk.jvm.core</groupId>
            <artifactId>commercetools-models</artifactId>
        </exclusion>
        <exclusion>
            <groupId>com.commercetools.sdk.jvm.core</groupId>
            <artifactId>commercetools-java-client-ahc-2_5</artifactId>
        </exclusion>
        <exclusion>
            <groupId>com.commercetools.sdk.jvm.core</groupId>
            <artifactId>commercetools-convenience</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    ````

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.