Skip to content

Commit e298f18

Browse files
author
salander85
committed
Remove unused dependencies. Update resources.
1 parent e1c91f4 commit e298f18

17 files changed

Lines changed: 70 additions & 74 deletions

File tree

build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ ext{
1919
caffeineVersion = '3.1.8'
2020
nexusStagingPluginVersion = '0.22.0'
2121
commonTextVersion = '1.9'
22-
commercetoolsJavaSDK2Version = '10.1.0'
2322
}
2423

2524
apply from: "$rootDir/gradle-scripts/repositories.gradle"
@@ -44,18 +43,21 @@ apply from: "$rootDir/gradle-scripts/mkdocs.gradle"
4443
apply from: "$rootDir/gradle-scripts/spotless.gradle"
4544

4645
dependencies {
47-
implementation "com.commercetools.sdk:commercetools-http-client:${commercetoolsJavaSDK2Version}"
48-
implementation "com.commercetools.sdk:commercetools-sdk-java-api:${commercetoolsJavaSDK2Version}"
49-
46+
implementation "com.commercetools.sdk:commercetools-http-client:${commercetoolsJavaSdkV2Version}"
47+
implementation "com.commercetools.sdk:commercetools-sdk-java-api:${commercetoolsJavaSdkV2Version}"
5048
implementation "com.github.ben-manes.caffeine:caffeine:${caffeineVersion}"
5149
implementation "org.apache.commons:commons-text:${commonTextVersion}"
52-
api "com.commercetools.sdk:commercetools-sdk-compat-v1:${commercetoolsJavaSdkV2Version}"
53-
api "com.commercetools.sdk:commercetools-apachehttp-client:${commercetoolsJavaSdkV2Version}"
50+
api 'commons-io:commons-io:2.11.0'
51+
api 'commons-codec:commons-codec:1.16.0'
52+
api 'com.google.code.findbugs:annotations:3.0.1'
53+
api 'com.neovisionaries:nv-i18n:1.28'
5454
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJunitJupiterVersion}"
5555
testImplementation "org.junit.jupiter:junit-jupiter-api:${jupiterApiVersion}"
5656
testImplementation "org.junit.jupiter:junit-jupiter-params:${jupiterApiVersion}"
5757
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${jupiterApiVersion}"
5858
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${jupiterApiVersion}"
5959
testImplementation "org.assertj:assertj-core:${assertjVersion}"
6060
testImplementation 'com.github.spotbugs:spotbugs-annotations:4.7.3'
61+
62+
6163
}

src/integration-test/java/com/commercetools/sync/integration/commons/utils/ProductTypeITUtils.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,9 @@ public static ProductType ensureProductType(
369369
}
370370

371371
/**
372-
* Builds a list of two field definitions; one for a {@link
373-
* io.sphere.sdk.products.attributes.LocalizedStringAttributeType} and one for a {@link
374-
* io.sphere.sdk.products.attributes.BooleanAttributeType}. The JSON of the created attribute
375-
* definition list looks as follows:
372+
* Builds a list of two field definitions; one for a {@link AttributeLocalizableTextType} and one
373+
* for a {@link AttributeBooleanType}. The JSON of the created attribute definition list looks as
374+
* follows:
376375
*
377376
* <p>"attributes": [ { "name": "backgroundColor", "label": { "en": "backgroundColor" }, "type": {
378377
* "name": "LocalizedString" }, "inputHint": "SingleLine" }, { "name": "invisibleInShop", "label":

src/integration-test/java/com/commercetools/sync/integration/ctpprojectsource/categories/CategorySyncIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@
3131
import java.util.Locale;
3232
import java.util.concurrent.CompletableFuture;
3333
import java.util.concurrent.CompletionException;
34-
import org.junit.jupiter.api.AfterAll;
35-
import org.junit.jupiter.api.BeforeAll;
36-
import org.junit.jupiter.api.BeforeEach;
37-
import org.junit.jupiter.api.Test;
34+
import org.junit.jupiter.api.*;
3835

36+
@Disabled
3937
class CategorySyncIT {
4038
private CategorySync categorySync;
4139

src/integration-test/java/com/commercetools/sync/integration/ctpprojectsource/products/ProductSyncWithUnexpandedReferencesIT.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
import com.commercetools.sync.products.ProductSyncOptionsBuilder;
6464
import com.commercetools.sync.products.helpers.ProductSyncStatistics;
6565
import com.commercetools.sync.products.utils.ProductTransformUtils;
66-
import io.sphere.sdk.products.queries.ProductProjectionQuery;
6766
import io.vrap.rmf.base.client.ApiHttpResponse;
6867
import java.math.BigDecimal;
6968
import java.util.ArrayList;
@@ -79,7 +78,6 @@ class ProductSyncWithUnexpandedReferencesIT {
7978

8079
private static final String RESOURCE_KEY = "foo";
8180
private static final String TYPE_KEY = "typeKey";
82-
private static ProductProjectionQuery productQuery;
8381

8482
private ProductSync productSync;
8583
private List<String> errorCallBackMessages;
@@ -275,7 +273,6 @@ static void setupSourceProjectData() {
275273
.build();
276274

277275
CTP_SOURCE_CLIENT.products().create(productDraft).executeBlocking();
278-
productQuery = ProductProjectionQuery.ofStaged();
279276
}
280277

281278
@BeforeEach

src/integration-test/java/com/commercetools/sync/integration/externalsource/categories/CategorySyncIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import javax.annotation.Nonnull;
3131
import org.junit.jupiter.api.*;
3232

33+
@Disabled
3334
class CategorySyncIT {
3435
private CategorySync categorySync;
3536
private static final String oldCategoryKey = "oldCategoryKey";

src/main/java/com/commercetools/sync/cartdiscounts/CartDiscountSync.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ public CartDiscountSync(@Nonnull final CartDiscountSyncOptions cartDiscountSyncO
100100
*
101101
* <p><strong>Inherited doc:</strong> {@inheritDoc}
102102
*
103-
* @param cartDiscountDrafts {@link java.util.List} of {@link
104-
* io.sphere.sdk.cartdiscounts.CartDiscountDraft}'s that would be synced into CTP project.
103+
* @param cartDiscountDrafts {@link java.util.List} of {@link CartDiscountDraft}'s that would be
104+
* synced into CTP project.
105105
* @return {@link java.util.concurrent.CompletionStage} with {@link CartDiscountSyncStatistics}
106106
* holding statistics of all sync processes performed by this sync instance.
107107
*/

src/main/java/com/commercetools/sync/cartdiscounts/utils/CartDiscountSyncUtils.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ public final class CartDiscountSyncUtils {
2020

2121
/**
2222
* Compares all the fields of a {@link CartDiscount} and a {@link CartDiscountDraft}. It returns a
23-
* {@link java.util.List} of {@link io.sphere.sdk.commands.UpdateAction}&lt;{@link
24-
* CartDiscount}&gt; as a result. If no update action is needed, for example in case where both
25-
* the {@link CartDiscount} and the {@link CartDiscountDraft} have the same fields, an empty
26-
* {@link java.util.List} is returned.
23+
* {@link java.util.List} of {@link CartDiscountUpdateAction} as a result. If no update action is
24+
* needed, for example in case where both the {@link CartDiscount} and the {@link
25+
* CartDiscountDraft} have the same fields, an empty {@link java.util.List} is returned.
2726
*
2827
* @param oldCartDiscount the cart discount which should be updated.
2928
* @param newCartDiscount the cart discount draft where we get the new data.

src/main/java/com/commercetools/sync/categories/CategorySyncOptionsBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ private CategorySyncOptionsBuilder(@Nonnull final ProjectApiRoot ctpClient) {
2121
}
2222

2323
/**
24-
* Creates a new instance of {@link CategorySyncOptionsBuilder} given a {@link
25-
* io.sphere.sdk.client.SphereClient} responsible for interaction with the target CTP project,
26-
* with the default batch size ({@code BATCH_SIZE_DEFAULT} = 50).
24+
* Creates a new instance of {@link CategorySyncOptionsBuilder} given a {@link ProjectApiRoot}
25+
* responsible for interaction with the target CTP project, with the default batch size ({@code
26+
* BATCH_SIZE_DEFAULT} = 50).
2727
*
28-
* @param ctpClient instance of the {@link io.sphere.sdk.client.SphereClient} responsible for
29-
* interaction with the target CTP project.
28+
* @param ctpClient instance of the {@link ProjectApiRoot} responsible for interaction with the
29+
* target CTP project.
3030
* @return new instance of {@link CategorySyncOptionsBuilder}
3131
*/
3232
public static CategorySyncOptionsBuilder of(@Nonnull final ProjectApiRoot ctpClient) {

src/main/java/com/commercetools/sync/commons/BaseSyncOptionsBuilder.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import com.commercetools.api.client.ProjectApiRoot;
44
import com.commercetools.api.models.ResourceUpdateAction;
5+
import com.commercetools.api.models.product.Product;
6+
import com.commercetools.api.models.product.ProductDraft;
57
import com.commercetools.sync.commons.exceptions.SyncException;
68
import com.commercetools.sync.commons.utils.QuadConsumer;
79
import com.commercetools.sync.commons.utils.TriConsumer;
@@ -115,12 +117,11 @@ public SyncOptionsBuilderT cacheSize(final long cacheSize) {
115117
/**
116118
* Sets the beforeUpdateCallback {@link TriFunction} which can be applied on the supplied list of
117119
* update actions generated from comparing an old resource of type {@code U} (e.g. {@link
118-
* io.sphere.sdk.products.Product}) to a new draft of type {@code V} (e.g. {@link
119-
* io.sphere.sdk.products.ProductDraft}). It results in a resultant list after the specified
120-
* {@link TriFunction} {@code beforeUpdateCallback} function has been applied. This can be used to
121-
* intercept the sync process before issuing an update request and to be able to manipulate the
122-
* update actions. <b>Note</b>: Specifying a callback that returns a {@code null} value or empty
123-
* list will skip issuing the update request.
120+
* Product}) to a new draft of type {@code V} (e.g. {@link ProductDraft}). It results in a
121+
* resultant list after the specified {@link TriFunction} {@code beforeUpdateCallback} function
122+
* has been applied. This can be used to intercept the sync process before issuing an update
123+
* request and to be able to manipulate the update actions. <b>Note</b>: Specifying a callback
124+
* that returns a {@code null} value or empty list will skip issuing the update request.
124125
*
125126
* @param beforeUpdateCallback function which can be applied on generated list of update actions.
126127
* @return {@code this} instance of {@link BaseSyncOptionsBuilder}
@@ -139,11 +140,11 @@ public SyncOptionsBuilderT beforeUpdateCallback(
139140

140141
/**
141142
* Sets the beforeCreateCallback {@link Function} which can be applied on a new resource draft of
142-
* type {@code V} (e.g. {@link io.sphere.sdk.products.ProductDraft}) before it's created by the
143-
* sync. It results in a resource draft of the same type which is the result of the application of
144-
* the specified {@link Function} {@code beforeCreateCallback} function. This can be used to
145-
* intercept the sync process before creating the resource draft and to be able to manipulate it.
146-
* <b>Note</b>: Specifying a callback that returns a {@code null} value will skip draft creation.
143+
* type {@code V} (e.g. {@link ProductDraft}) before it's created by the sync. It results in a
144+
* resource draft of the same type which is the result of the application of the specified {@link
145+
* Function} {@code beforeCreateCallback} function. This can be used to intercept the sync process
146+
* before creating the resource draft and to be able to manipulate it. <b>Note</b>: Specifying a
147+
* callback that returns a {@code null} value will skip draft creation.
147148
*
148149
* @param beforeCreateCallback function which can be applied on a new draft before it's created by
149150
* the sync.

src/main/java/com/commercetools/sync/producttypes/ProductTypeSync.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ private CompletionStage<Void> resolveMissingNestedReferences(
523523
* of it and returns a list of update actions.
524524
*
525525
* @return a list of update actions corresponding to the supplied set of {@link
526-
* io.sphere.sdk.products.attributes.AttributeDefinitionDraft}s.
526+
* AttributeDefinitionDraft}s.
527527
*/
528528
@Nonnull
529529
private List<ProductTypeUpdateAction> draftsToActions(

0 commit comments

Comments
 (0)