diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7f3c0cbb21d..c09674a2b85 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - name: Setup Java uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8f8363c2b9..cd06b785729 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: # https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token # https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8 token: ${{ steps.generate_github_token.outputs.token }} - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - name: Setup Java uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4 @@ -162,7 +162,7 @@ jobs: with: token: ${{ steps.generate_github_token.outputs.token }} - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - name: Setup Java uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0e3ec3dc978..262544a7144 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -50,7 +50,7 @@ jobs: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/create-pr.yml b/.github/workflows/create-pr.yml index 9da6f307e18..4fe949bb1b1 100644 --- a/.github/workflows/create-pr.yml +++ b/.github/workflows/create-pr.yml @@ -36,7 +36,7 @@ jobs: with: token: ${{ steps.generate_github_token.outputs.token }} - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - uses: jenschude/auto-create-pr-action@a5369414c74963e6ec065dab49066d3711b8c1db # v0.3.2 if: github.ref_name == 'gen-sdk-updates' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b2459342bf9..89b0b1825fe 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -54,7 +54,7 @@ jobs: distribution: 'temurin' java-version: '17' - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - name: Setup Graphviz uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2 diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index 0fe575151e4..bb6e6a0de8f 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -26,7 +26,7 @@ jobs: with: token: ${{ steps.generate_github_token.outputs.token }} - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - name: Setup Java uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9cb04099a08..e6bc347c5d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - name: Setup Java uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4 @@ -75,7 +75,7 @@ jobs: ref: main token: ${{ steps.generate_github_token.outputs.token }} - - uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0 + - uses: gradle/actions/wrapper-validation@v4 - run: ./gradlew -Pversion=$REF_NAME writeVersionToExamples writeVersionToReadme setVersion nextMinorVersion snapshotVersion env: diff --git a/.husky/pre-commit b/.husky/pre-commit index 5a182ef106d..37236231717 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - yarn lint-staged diff --git a/commercetools/commercetools-apachehttp-client/src/main/java/com/commercetools/http/apachehttp/ApacheHttpClientSolutionInfo.java b/commercetools/commercetools-apachehttp-client/src/main/java/com/commercetools/http/apachehttp/ApacheHttpClientSolutionInfo.java index 00bcba8987f..3490d37c19c 100644 --- a/commercetools/commercetools-apachehttp-client/src/main/java/com/commercetools/http/apachehttp/ApacheHttpClientSolutionInfo.java +++ b/commercetools/commercetools-apachehttp-client/src/main/java/com/commercetools/http/apachehttp/ApacheHttpClientSolutionInfo.java @@ -1,10 +1,12 @@ package com.commercetools.http.apachehttp; +import io.vrap.rmf.base.client.SolutionInfo; + import org.apache.hc.client5.http.classic.HttpClient; import org.apache.hc.core5.util.VersionInfo; -public class ApacheHttpClientSolutionInfo extends io.vrap.rmf.base.client.SolutionInfo { +public class ApacheHttpClientSolutionInfo extends SolutionInfo { public ApacheHttpClientSolutionInfo() { setName("ApacheHttpAsyncClient"); setVersion( diff --git a/commercetools/commercetools-apachehttp-client/src/test/java/com/commercetools/http/apachehttp/SolutionInfoTest.java b/commercetools/commercetools-apachehttp-client/src/test/java/com/commercetools/http/apachehttp/SolutionInfoTest.java new file mode 100644 index 00000000000..2edc0b515c0 --- /dev/null +++ b/commercetools/commercetools-apachehttp-client/src/test/java/com/commercetools/http/apachehttp/SolutionInfoTest.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.apachehttp; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; + +public class SolutionInfoTest { + @Test + public void version() { + String version = new ApacheHttpClientSolutionInfo().getVersion(); + + Assertions.assertThat(version).isEqualTo("5.4.1"); + } +} diff --git a/commercetools/commercetools-async-http-client/build.gradle b/commercetools/commercetools-async-http-client/build.gradle index 4fe1b758fd2..75e53993b0f 100644 --- a/commercetools/commercetools-async-http-client/build.gradle +++ b/commercetools/commercetools-async-http-client/build.gradle @@ -3,8 +3,10 @@ dependencies { api project(":rmf:rmf-java-base") api "org.asynchttpclient:async-http-client:2.12.4" api commons.io version commons.io_version - api "io.netty:netty-codec-http:${netty.version}" - api "io.netty:netty-codec-socks:${netty.version}" - api "io.netty:netty-handler-proxy:${netty.version}" + api "io.netty:netty-codec:4.1.116.Final" + api "io.netty:netty-codec-http:4.1.116.Final" + api "io.netty:netty-codec-socks:4.1.116.Final" + api "io.netty:netty-handler-proxy:4.1.116.Final" + api "io.netty:netty-handler:4.1.116.Final" implementation javax.validation } diff --git a/commercetools/commercetools-async-http-client/src/main/java/com/commercetools/http/asynchttp/AsyncHttpClientSolutionInfo.java b/commercetools/commercetools-async-http-client/src/main/java/com/commercetools/http/asynchttp/AsyncHttpClientSolutionInfo.java new file mode 100644 index 00000000000..ceaa22852e3 --- /dev/null +++ b/commercetools/commercetools-async-http-client/src/main/java/com/commercetools/http/asynchttp/AsyncHttpClientSolutionInfo.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.asynchttp; + +import io.vrap.rmf.base.client.SolutionInfo; +import io.vrap.rmf.base.client.VersionLoader; + +public class AsyncHttpClientSolutionInfo extends SolutionInfo { + + public AsyncHttpClientSolutionInfo() { + setName("AsyncHttpAsyncClient"); + setVersion(VersionLoader.loadVersionInfo("org.asynchttpclient", "async-http-client", "pom.properties", + "version", this.getClass().getClassLoader())); + } +} diff --git a/commercetools/commercetools-async-http-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo b/commercetools/commercetools-async-http-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo new file mode 100644 index 00000000000..97eeac311ab --- /dev/null +++ b/commercetools/commercetools-async-http-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo @@ -0,0 +1 @@ +com.commercetools.http.asynchttp.AsyncHttpClientSolutionInfo diff --git a/commercetools/commercetools-async-http-client/src/test/java/com/commercetools/http/asynchttpclient/SolutionInfoTest.java b/commercetools/commercetools-async-http-client/src/test/java/com/commercetools/http/asynchttpclient/SolutionInfoTest.java new file mode 100644 index 00000000000..936508781bf --- /dev/null +++ b/commercetools/commercetools-async-http-client/src/test/java/com/commercetools/http/asynchttpclient/SolutionInfoTest.java @@ -0,0 +1,16 @@ + +package com.commercetools.http.asynchttpclient; + +import com.commercetools.http.asynchttp.AsyncHttpClientSolutionInfo; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; + +public class SolutionInfoTest { + @Test + public void version() { + String version = new AsyncHttpClientSolutionInfo().getVersion(); + + Assertions.assertThat(version).isEqualTo("2.12.4"); + } +} diff --git a/commercetools/commercetools-javanet-client/src/main/java/com/commercetools/http/javanet/JavaNetHttpClientSolutionInfo.java b/commercetools/commercetools-javanet-client/src/main/java/com/commercetools/http/javanet/JavaNetHttpClientSolutionInfo.java new file mode 100644 index 00000000000..a1486b802eb --- /dev/null +++ b/commercetools/commercetools-javanet-client/src/main/java/com/commercetools/http/javanet/JavaNetHttpClientSolutionInfo.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.javanet; + +import io.vrap.rmf.base.client.SolutionInfo; + +import org.apache.commons.lang3.SystemUtils; + +public class JavaNetHttpClientSolutionInfo extends SolutionInfo { + + public JavaNetHttpClientSolutionInfo() { + setName("JavaNetHttpClient"); + setVersion(SystemUtils.JAVA_RUNTIME_VERSION); + } +} diff --git a/commercetools/commercetools-javanet-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo b/commercetools/commercetools-javanet-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo new file mode 100644 index 00000000000..56e446e8ac2 --- /dev/null +++ b/commercetools/commercetools-javanet-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo @@ -0,0 +1 @@ +com.commercetools.http.javanet.JavaNetHttpClientSolutionInfo diff --git a/commercetools/commercetools-javanet-client/src/test/java/com/commercetools/http/javanet/SolutionInfoTest.java b/commercetools/commercetools-javanet-client/src/test/java/com/commercetools/http/javanet/SolutionInfoTest.java new file mode 100644 index 00000000000..43fb10b9317 --- /dev/null +++ b/commercetools/commercetools-javanet-client/src/test/java/com/commercetools/http/javanet/SolutionInfoTest.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.javanet; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; + +public class SolutionInfoTest { + @Test + public void version() { + String version = new JavaNetHttpClientSolutionInfo().getVersion(); + + Assertions.assertThat(version).isNotEmpty(); + } +} diff --git a/commercetools/commercetools-okhttp-client3/src/main/java/com/commercetools/http/okhttp3/OkHttpClientSolutionInfo.java b/commercetools/commercetools-okhttp-client3/src/main/java/com/commercetools/http/okhttp3/OkHttpClientSolutionInfo.java new file mode 100644 index 00000000000..ae9d4f5fc80 --- /dev/null +++ b/commercetools/commercetools-okhttp-client3/src/main/java/com/commercetools/http/okhttp3/OkHttpClientSolutionInfo.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.okhttp3; + +import io.vrap.rmf.base.client.SolutionInfo; +import io.vrap.rmf.base.client.VersionLoader; + +public class OkHttpClientSolutionInfo extends SolutionInfo { + + public OkHttpClientSolutionInfo() { + setName("OkHttpClient"); + setVersion(VersionLoader.loadVersionInfo("com.squareup.okhttp3", "okhttp", "pom.properties", "version", + this.getClass().getClassLoader())); + } +} diff --git a/commercetools/commercetools-okhttp-client3/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo b/commercetools/commercetools-okhttp-client3/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo new file mode 100644 index 00000000000..a801f94812d --- /dev/null +++ b/commercetools/commercetools-okhttp-client3/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo @@ -0,0 +1 @@ +com.commercetools.http.okhttp3.OkHttpClientSolutionInfo diff --git a/commercetools/commercetools-okhttp-client3/src/test/java/com/commercetools/http/okhttp3/SolutionInfoTest.java b/commercetools/commercetools-okhttp-client3/src/test/java/com/commercetools/http/okhttp3/SolutionInfoTest.java new file mode 100644 index 00000000000..30c274fa731 --- /dev/null +++ b/commercetools/commercetools-okhttp-client3/src/test/java/com/commercetools/http/okhttp3/SolutionInfoTest.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.okhttp3; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; + +public class SolutionInfoTest { + @Test + public void version() { + String version = new OkHttpClientSolutionInfo().getVersion(); + + Assertions.assertThat(version).isEqualTo("3.14.9"); + } +} diff --git a/commercetools/commercetools-okhttp-client4/build.gradle b/commercetools/commercetools-okhttp-client4/build.gradle index e52aba05bff..fdb63d78df9 100644 --- a/commercetools/commercetools-okhttp-client4/build.gradle +++ b/commercetools/commercetools-okhttp-client4/build.gradle @@ -13,7 +13,7 @@ dependencies { api project(":rmf:rmf-java-base") api "com.squareup.okhttp3:okhttp:4.12.0" version { strictly '[4.0,5.0[' - prefer "4.10.0" + prefer "4.12.0" } implementation "com.squareup.okio:okio:3.9.1" diff --git a/commercetools/commercetools-okhttp-client4/src/main/java/com/commercetools/http/okhttp4/OkHttpClientSolutionInfo.java b/commercetools/commercetools-okhttp-client4/src/main/java/com/commercetools/http/okhttp4/OkHttpClientSolutionInfo.java new file mode 100644 index 00000000000..9222279fc28 --- /dev/null +++ b/commercetools/commercetools-okhttp-client4/src/main/java/com/commercetools/http/okhttp4/OkHttpClientSolutionInfo.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.okhttp4; + +import io.vrap.rmf.base.client.SolutionInfo; + +import okhttp3.OkHttp; + +public class OkHttpClientSolutionInfo extends SolutionInfo { + + public OkHttpClientSolutionInfo() { + setName("OkHttpClient"); + setVersion(OkHttp.VERSION); + } +} diff --git a/commercetools/commercetools-okhttp-client4/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo b/commercetools/commercetools-okhttp-client4/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo new file mode 100644 index 00000000000..63d60f0e3e1 --- /dev/null +++ b/commercetools/commercetools-okhttp-client4/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo @@ -0,0 +1 @@ +com.commercetools.http.okhttp4.OkHttpClientSolutionInfo diff --git a/commercetools/commercetools-okhttp-client4/src/test/java/com/commercetools/http/okhttp4/SolutionInfoTest.java b/commercetools/commercetools-okhttp-client4/src/test/java/com/commercetools/http/okhttp4/SolutionInfoTest.java new file mode 100644 index 00000000000..975c3dbeb7e --- /dev/null +++ b/commercetools/commercetools-okhttp-client4/src/test/java/com/commercetools/http/okhttp4/SolutionInfoTest.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.okhttp4; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; + +public class SolutionInfoTest { + @Test + public void version() { + String version = new OkHttpClientSolutionInfo().getVersion(); + + Assertions.assertThat(version).isEqualTo("4.12.0"); + } +} diff --git a/commercetools/commercetools-reactornetty-client/src/main/java/com/commercetools/http/netty/NettyHttpClientSolutionInfo.java b/commercetools/commercetools-reactornetty-client/src/main/java/com/commercetools/http/netty/NettyHttpClientSolutionInfo.java new file mode 100644 index 00000000000..d91eb8ae3b6 --- /dev/null +++ b/commercetools/commercetools-reactornetty-client/src/main/java/com/commercetools/http/netty/NettyHttpClientSolutionInfo.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.netty; + +import io.vrap.rmf.base.client.SolutionInfo; + +import reactor.netty.http.client.HttpClient; + +public class NettyHttpClientSolutionInfo extends SolutionInfo { + + public NettyHttpClientSolutionInfo() { + setName("NettyHttpClient"); + setVersion(HttpClient.class.getPackage().getImplementationVersion()); + } +} diff --git a/commercetools/commercetools-reactornetty-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo b/commercetools/commercetools-reactornetty-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo new file mode 100644 index 00000000000..3c112e4202d --- /dev/null +++ b/commercetools/commercetools-reactornetty-client/src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo @@ -0,0 +1 @@ +com.commercetools.http.netty.NettyHttpClientSolutionInfo diff --git a/commercetools/commercetools-reactornetty-client/src/test/java/com/commercetools/http/netty/SolutionInfoTest.java b/commercetools/commercetools-reactornetty-client/src/test/java/com/commercetools/http/netty/SolutionInfoTest.java new file mode 100644 index 00000000000..12fd322ee06 --- /dev/null +++ b/commercetools/commercetools-reactornetty-client/src/test/java/com/commercetools/http/netty/SolutionInfoTest.java @@ -0,0 +1,14 @@ + +package com.commercetools.http.netty; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; + +public class SolutionInfoTest { + @Test + public void version() { + String version = new NettyHttpClientSolutionInfo().getVersion(); + + Assertions.assertThat(version).isEqualTo("1.2.1"); + } +} diff --git a/commercetools/commercetools-sdk-compat-v1/build.gradle b/commercetools/commercetools-sdk-compat-v1/build.gradle index 810859949e5..69e51d9ef94 100644 --- a/commercetools/commercetools-sdk-compat-v1/build.gradle +++ b/commercetools/commercetools-sdk-compat-v1/build.gradle @@ -21,6 +21,8 @@ dependencies { api project(':commercetools:commercetools-sdk-java-api') api ctsdkv1.client version ctsdkv1.version api ctsdkv1.models version ctsdkv1.version + api "io.netty:netty-codec:4.1.116.Final" + api "io.netty:netty-codec-http:4.1.116.Final" jmhImplementation project(':commercetools:commercetools-async-http-client') jmhImplementation project(':commercetools:commercetools-apachehttp-client') diff --git a/gradle-scripts/extensions.gradle b/gradle-scripts/extensions.gradle index 4dacc16e522..74019be77b1 100644 --- a/gradle-scripts/extensions.gradle +++ b/gradle-scripts/extensions.gradle @@ -9,16 +9,13 @@ ext { } ] - netty = [ - version: '4.1.109.Final' - ] commons = [ text: 'org.apache.commons:commons-text:1.13.0', lang3: 'org.apache.commons:commons-lang3:3.17.0', io: 'commons-io:commons-io:2.18.0', io_version: { strictly '[2.8.0,)' - prefer '2.11.0' + prefer '2.16.1' } ] diff --git a/licenses/commercetools-apachehttp-client/index.json b/licenses/commercetools-apachehttp-client/index.json index ecb99428842..77d68043dd0 100644 --- a/licenses/commercetools-apachehttp-client/index.json +++ b/licenses/commercetools-apachehttp-client/index.json @@ -80,7 +80,7 @@ }, { "moduleName": "commons-io:commons-io", - "moduleVersion": "2.11.0", + "moduleVersion": "2.16.1", "moduleUrls": [ "https://commons.apache.org/proper/commons-io/" ], diff --git a/licenses/commercetools-async-http-client/index.json b/licenses/commercetools-async-http-client/index.json index 5f644975658..6cdaf4270cf 100644 --- a/licenses/commercetools-async-http-client/index.json +++ b/licenses/commercetools-async-http-client/index.json @@ -114,7 +114,7 @@ }, { "moduleName": "commons-io:commons-io", - "moduleVersion": "2.11.0", + "moduleVersion": "2.16.1", "moduleUrls": [ "https://commons.apache.org/proper/commons-io/" ], @@ -141,7 +141,7 @@ }, { "moduleName": "io.netty:netty-buffer", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -154,7 +154,7 @@ }, { "moduleName": "io.netty:netty-codec", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -167,7 +167,7 @@ }, { "moduleName": "io.netty:netty-codec-http", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -180,7 +180,7 @@ }, { "moduleName": "io.netty:netty-codec-socks", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -193,7 +193,7 @@ }, { "moduleName": "io.netty:netty-common", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -206,7 +206,7 @@ }, { "moduleName": "io.netty:netty-handler", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -219,7 +219,7 @@ }, { "moduleName": "io.netty:netty-handler-proxy", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -232,7 +232,7 @@ }, { "moduleName": "io.netty:netty-resolver", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -245,7 +245,7 @@ }, { "moduleName": "io.netty:netty-transport", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -284,7 +284,7 @@ }, { "moduleName": "io.netty:netty-transport-native-unix-common", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], diff --git a/licenses/commercetools-http-client/index.json b/licenses/commercetools-http-client/index.json index 5f644975658..6cdaf4270cf 100644 --- a/licenses/commercetools-http-client/index.json +++ b/licenses/commercetools-http-client/index.json @@ -114,7 +114,7 @@ }, { "moduleName": "commons-io:commons-io", - "moduleVersion": "2.11.0", + "moduleVersion": "2.16.1", "moduleUrls": [ "https://commons.apache.org/proper/commons-io/" ], @@ -141,7 +141,7 @@ }, { "moduleName": "io.netty:netty-buffer", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -154,7 +154,7 @@ }, { "moduleName": "io.netty:netty-codec", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -167,7 +167,7 @@ }, { "moduleName": "io.netty:netty-codec-http", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -180,7 +180,7 @@ }, { "moduleName": "io.netty:netty-codec-socks", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -193,7 +193,7 @@ }, { "moduleName": "io.netty:netty-common", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -206,7 +206,7 @@ }, { "moduleName": "io.netty:netty-handler", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -219,7 +219,7 @@ }, { "moduleName": "io.netty:netty-handler-proxy", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -232,7 +232,7 @@ }, { "moduleName": "io.netty:netty-resolver", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -245,7 +245,7 @@ }, { "moduleName": "io.netty:netty-transport", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -284,7 +284,7 @@ }, { "moduleName": "io.netty:netty-transport-native-unix-common", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], diff --git a/licenses/commercetools-javanet-client/index.json b/licenses/commercetools-javanet-client/index.json index 53723829928..ced29304eb3 100644 --- a/licenses/commercetools-javanet-client/index.json +++ b/licenses/commercetools-javanet-client/index.json @@ -80,7 +80,7 @@ }, { "moduleName": "commons-io:commons-io", - "moduleVersion": "2.11.0", + "moduleVersion": "2.16.1", "moduleUrls": [ "https://commons.apache.org/proper/commons-io/" ], diff --git a/licenses/commercetools-okhttp-client4/index.json b/licenses/commercetools-okhttp-client4/index.json index 10768681277..02f2e3f8368 100644 --- a/licenses/commercetools-okhttp-client4/index.json +++ b/licenses/commercetools-okhttp-client4/index.json @@ -80,7 +80,7 @@ }, { "moduleName": "com.squareup.okhttp3:okhttp", - "moduleVersion": "4.10.0", + "moduleVersion": "4.12.0", "moduleUrls": [ "https://square.github.io/okhttp/" ], @@ -170,6 +170,32 @@ } ] }, + { + "moduleName": "org.jetbrains.kotlin:kotlin-stdlib-jdk7", + "moduleVersion": "1.8.21", + "moduleUrls": [ + "https://kotlinlang.org/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "org.jetbrains.kotlin:kotlin-stdlib-jdk8", + "moduleVersion": "1.8.21", + "moduleUrls": [ + "https://kotlinlang.org/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, { "moduleName": "org.jetbrains:annotations", "moduleVersion": "13.0", diff --git a/licenses/commercetools-sdk-compat-v1/index.json b/licenses/commercetools-sdk-compat-v1/index.json index 0320c53d377..adfb3969043 100644 --- a/licenses/commercetools-sdk-compat-v1/index.json +++ b/licenses/commercetools-sdk-compat-v1/index.json @@ -243,9 +243,9 @@ }, { "moduleName": "io.netty:netty-buffer", - "moduleVersion": "4.0.54.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ - "http://netty.io/" + "https://netty.io/" ], "moduleLicenses": [ { @@ -256,9 +256,9 @@ }, { "moduleName": "io.netty:netty-codec", - "moduleVersion": "4.0.54.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ - "http://netty.io/" + "https://netty.io/" ], "moduleLicenses": [ { @@ -269,9 +269,9 @@ }, { "moduleName": "io.netty:netty-codec-http", - "moduleVersion": "4.0.54.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ - "http://netty.io/" + "https://netty.io/" ], "moduleLicenses": [ { @@ -282,9 +282,9 @@ }, { "moduleName": "io.netty:netty-common", - "moduleVersion": "4.0.54.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ - "http://netty.io/" + "https://netty.io/" ], "moduleLicenses": [ { @@ -295,9 +295,22 @@ }, { "moduleName": "io.netty:netty-handler", - "moduleVersion": "4.0.54.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ - "http://netty.io/" + "https://netty.io/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, + { + "moduleName": "io.netty:netty-resolver", + "moduleVersion": "4.1.116.Final", + "moduleUrls": [ + "https://netty.io/" ], "moduleLicenses": [ { @@ -308,9 +321,9 @@ }, { "moduleName": "io.netty:netty-transport", - "moduleVersion": "4.0.54.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ - "http://netty.io/" + "https://netty.io/" ], "moduleLicenses": [ { @@ -332,6 +345,19 @@ } ] }, + { + "moduleName": "io.netty:netty-transport-native-unix-common", + "moduleVersion": "4.1.116.Final", + "moduleUrls": [ + "https://netty.io/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, { "moduleName": "jakarta.annotation:jakarta.annotation-api", "moduleVersion": "2.0.0", diff --git a/licenses/index.json b/licenses/index.json index b08bd8324c8..1c18416785c 100644 --- a/licenses/index.json +++ b/licenses/index.json @@ -438,19 +438,6 @@ } ] }, - { - "moduleName": "com.squareup.okhttp3:okhttp", - "moduleVersion": "4.10.0", - "moduleUrls": [ - "https://square.github.io/okhttp/" - ], - "moduleLicenses": [ - { - "moduleLicense": "Apache License, Version 2.0", - "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" - } - ] - }, { "moduleName": "com.squareup.okhttp3:okhttp", "moduleVersion": "4.12.0", @@ -565,7 +552,7 @@ }, { "moduleName": "commons-io:commons-io", - "moduleVersion": "2.11.0", + "moduleVersion": "2.16.1", "moduleUrls": [ "https://commons.apache.org/proper/commons-io/" ], @@ -605,20 +592,7 @@ }, { "moduleName": "io.netty:netty-buffer", - "moduleVersion": "4.0.54.Final", - "moduleUrls": [ - "http://netty.io/" - ], - "moduleLicenses": [ - { - "moduleLicense": "Apache License, Version 2.0", - "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" - } - ] - }, - { - "moduleName": "io.netty:netty-buffer", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -631,7 +605,7 @@ }, { "moduleName": "io.netty:netty-buffer", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -644,20 +618,7 @@ }, { "moduleName": "io.netty:netty-codec", - "moduleVersion": "4.0.54.Final", - "moduleUrls": [ - "http://netty.io/" - ], - "moduleLicenses": [ - { - "moduleLicense": "Apache License, Version 2.0", - "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" - } - ] - }, - { - "moduleName": "io.netty:netty-codec", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -670,7 +631,7 @@ }, { "moduleName": "io.netty:netty-codec", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -696,20 +657,7 @@ }, { "moduleName": "io.netty:netty-codec-http", - "moduleVersion": "4.0.54.Final", - "moduleUrls": [ - "http://netty.io/" - ], - "moduleLicenses": [ - { - "moduleLicense": "Apache License, Version 2.0", - "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" - } - ] - }, - { - "moduleName": "io.netty:netty-codec-http", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -722,7 +670,7 @@ }, { "moduleName": "io.netty:netty-codec-http", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -748,7 +696,7 @@ }, { "moduleName": "io.netty:netty-codec-socks", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -761,7 +709,7 @@ }, { "moduleName": "io.netty:netty-codec-socks", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -774,20 +722,7 @@ }, { "moduleName": "io.netty:netty-common", - "moduleVersion": "4.0.54.Final", - "moduleUrls": [ - "http://netty.io/" - ], - "moduleLicenses": [ - { - "moduleLicense": "Apache License, Version 2.0", - "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" - } - ] - }, - { - "moduleName": "io.netty:netty-common", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -800,7 +735,7 @@ }, { "moduleName": "io.netty:netty-common", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -813,20 +748,7 @@ }, { "moduleName": "io.netty:netty-handler", - "moduleVersion": "4.0.54.Final", - "moduleUrls": [ - "http://netty.io/" - ], - "moduleLicenses": [ - { - "moduleLicense": "Apache License, Version 2.0", - "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" - } - ] - }, - { - "moduleName": "io.netty:netty-handler", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -839,7 +761,7 @@ }, { "moduleName": "io.netty:netty-handler", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -852,7 +774,7 @@ }, { "moduleName": "io.netty:netty-handler-proxy", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -865,7 +787,7 @@ }, { "moduleName": "io.netty:netty-handler-proxy", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -878,7 +800,7 @@ }, { "moduleName": "io.netty:netty-resolver", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -891,7 +813,7 @@ }, { "moduleName": "io.netty:netty-resolver", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -943,20 +865,7 @@ }, { "moduleName": "io.netty:netty-transport", - "moduleVersion": "4.0.54.Final", - "moduleUrls": [ - "http://netty.io/" - ], - "moduleLicenses": [ - { - "moduleLicense": "Apache License, Version 2.0", - "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" - } - ] - }, - { - "moduleName": "io.netty:netty-transport", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -969,7 +878,7 @@ }, { "moduleName": "io.netty:netty-transport", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -1047,7 +956,7 @@ }, { "moduleName": "io.netty:netty-transport-native-unix-common", - "moduleVersion": "4.1.109.Final", + "moduleVersion": "4.1.115.Final", "moduleUrls": [ "https://netty.io/" ], @@ -1060,7 +969,7 @@ }, { "moduleName": "io.netty:netty-transport-native-unix-common", - "moduleVersion": "4.1.115.Final", + "moduleVersion": "4.1.116.Final", "moduleUrls": [ "https://netty.io/" ], @@ -2068,6 +1977,19 @@ } ] }, + { + "moduleName": "org.jetbrains.kotlin:kotlin-stdlib-jdk7", + "moduleVersion": "1.8.21", + "moduleUrls": [ + "https://kotlinlang.org/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, { "moduleName": "org.jetbrains.kotlin:kotlin-stdlib-jdk7", "moduleVersion": "1.9.10", @@ -2094,6 +2016,19 @@ } ] }, + { + "moduleName": "org.jetbrains.kotlin:kotlin-stdlib-jdk8", + "moduleVersion": "1.8.21", + "moduleUrls": [ + "https://kotlinlang.org/" + ], + "moduleLicenses": [ + { + "moduleLicense": "Apache License, Version 2.0", + "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" + } + ] + }, { "moduleName": "org.jetbrains.kotlin:kotlin-stdlib-jdk8", "moduleVersion": "1.9.10", diff --git a/package.json b/package.json index f1668c312bf..214bc21769b 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,22 @@ { - "name": "commercetools-sdk-java-v2", - "version": "0.0.0", - "repository": "https://jenschude@github.com/commercetools/commercetools-sdk-java-v2.git", - "author": "Jens Schulze ", - "license": "Proprietary", - "private": true, - "engines": { - "node": ">=14.15", - "npm": ">=5" - }, - "packageManager": "yarn@4.6.0", - "dependencies": { - "husky": "9.1.7", - "lint-staged": "15.3.0" - }, - "scripts": { - "postinstall": "husky install", - "format": "./gradlew spotlessApply" - } + "name": "commercetools-sdk-java-v2", + "version": "0.0.0", + "repository": "https://jenschude@github.com/commercetools/commercetools-sdk-java-v2.git", + "author": "Jens Schulze ", + "license": "Proprietary", + "private": true, + "engines": { + "node": ">=14.15", + "npm": ">=5" + }, + "packageManager": "yarn@4.6.0", + "dependencies": { + "husky": "9.1.7", + "lint-staged": "15.3.0" + }, + "scripts": { + "postinstall": "husky install", + "format": "./gradlew spotlessApply", + "prepare": "husky" + } } diff --git a/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/UserAgentUtils.java b/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/UserAgentUtils.java index d60d9c0140e..54e393a393b 100644 --- a/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/UserAgentUtils.java +++ b/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/UserAgentUtils.java @@ -55,7 +55,10 @@ private static String getSolutionInfoString(List additionalSolutio public static String format(final SolutionInfo solutionInfo) { final StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append(solutionInfo.getName()).append("/").append(solutionInfo.getVersion()); + stringBuilder.append(solutionInfo.getName()); + if (isNotEmpty(solutionInfo.getVersion())) { + stringBuilder.append("/").append(solutionInfo.getVersion()); + } if (isNotEmpty(solutionInfo.getWebsite()) && isNotEmpty(solutionInfo.getEmergencyContact())) { stringBuilder.append(" ("); final String details = Stream.of(solutionInfo.getWebsite(), solutionInfo.getEmergencyContact()) diff --git a/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/VersionLoader.java b/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/VersionLoader.java new file mode 100644 index 00000000000..1968e42a5e4 --- /dev/null +++ b/rmf/rmf-java-base/src/main/java/io/vrap/rmf/base/client/VersionLoader.java @@ -0,0 +1,33 @@ + +package io.vrap.rmf.base.client; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Optional; +import java.util.Properties; + +public class VersionLoader { + + public static String loadVersionInfo(final String groupId, final String artifactId, final String versionFile, + final String versionProperty, final ClassLoader classLoader) { + Properties loadedProps = null; + try { + try (final InputStream is = classLoader + .getResourceAsStream("META-INF/maven/" + groupId + "/" + artifactId + "/" + versionFile)) { + if (is != null) { + final Properties props = new Properties(); + props.load(is); + loadedProps = props; + } + } + } + catch (final IOException ignored) { + } + + if (loadedProps != null) { + return Optional.ofNullable(loadedProps.get(versionProperty)).map(Object::toString).orElse(null); + } + + return null; + } +}