diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml
new file mode 100644
index 00000000..739a9fbc
--- /dev/null
+++ b/.github/workflows/auto-merge.yml
@@ -0,0 +1,28 @@
+name: Automatic Branch Merging
+
+on:
+ pull_request:
+ types:
+ - closed
+
+permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+
+jobs:
+ merge:
+ name: Cascading Auto Merge
+ runs-on: ubuntu-latest
+
+ if: |
+ github.event.pull_request.merged == true &&
+ startsWith(github.base_ref, 'release/')
+
+ steps:
+ - name: Automatic Merge
+ uses: ActionsDesk/cascading-downstream-merge@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ prefixes: release/
+ ref_branch: develop
\ No newline at end of file
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 09182902..488bea4d 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -5,9 +5,9 @@ name: Build
on:
push:
- branches: [ develop ]
+ branches: [ release/2.14 ]
pull_request:
- branches: [ develop ]
+ branches: [ release/2.14 ]
jobs:
build:
@@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - name: Set up JDK 21
- uses: actions/setup-java@v3
+ - uses: actions/checkout@v6
+ - name: Set up JDK 25
+ uses: actions/setup-java@v5
with:
distribution: 'temurin'
- java-version: '21'
+ java-version: '25'
- name: Build
run: |
mvn install --batch-mode --no-transfer-progress \
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 427a64f3..75384a61 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,16 +1,18 @@
name: Release
+run-name: Release ${{ inputs.releaseVersion }}.${{ inputs.releaseBuild }} by @${{ github.actor }}
+
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version'
required: true
- default: '2.9'
+ default: '2.14'
releaseBuild:
- description: 'Release build'
+ description: 'Release build (e.g. 8)'
required: true
- default: ''
+ default: '0'
jobs:
release:
@@ -18,15 +20,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v6
- - name: Set up JDK 21
- uses: actions/setup-java@v3
+ - name: Set up JDK 25
+ uses: actions/setup-java@v5
with:
distribution: 'temurin'
- java-version: '21'
- server-id: ossrh
- server-username: MAVEN_USERNAME
+ java-version: '25'
+ server-id: central
+ server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
@@ -49,11 +51,9 @@ jobs:
TAG: release/${{ github.event.inputs.releaseVersion }}/${{ github.event.inputs.releaseVersion }}.${{ github.event.inputs.releaseBuild }}
# Suppress logging during release prep/perform
LOGGING: org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
- MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
+ MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
+ MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- # This is to work around https://issues.sonatype.org/browse/NEXUS-27902 on JDK17
- JDK_JAVA_OPTIONS: "--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED"
run: |
echo "::group::Prepare"
mvn --batch-mode --no-transfer-progress release:prepare -DreleaseVersion=${{ env.RELEASE }} \
diff --git a/odata_api/pom.xml b/odata_api/pom.xml
index 36262501..26b93e57 100644
--- a/odata_api/pom.xml
+++ b/odata_api/pom.xml
@@ -1,7 +1,7 @@
-
-
- odata
- com.sdl
- 2.14-SNAPSHOT
-
- 4.0.0
-
- odata_client_tracing
- OData Tracing
- Tridion OData Tracing module contains EndpointCaller implementation with brave tracing into zipkin
-
- jar
-
-
- ${project.basedir}/../src/license/sdl_license/header.txt
-
-
-
-
-
- com.sdl
- odata_client_api
-
-
- com.sdl
- odata_client
- test-jar
- test
-
-
-
-
- org.apache.httpcomponents
- httpclient
-
-
- io.zipkin.brave
- brave-apache-http-interceptors
-
-
- io.zipkin.brave
- brave-spancollector-http
-
-
- io.zipkin.reporter
- zipkin-sender-urlconnection
-
-
-
-
- org.springframework.boot
- spring-boot
- test
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
- test
-
-
- org.springframework.boot
- spring-boot-autoconfigure
- test
-
-
- org.springframework
- spring-webmvc
- test
-
-
-
diff --git a/odata_client_tracing/src/main/java/com/sdl/odata/client/caller/TracingEndpointCaller.java b/odata_client_tracing/src/main/java/com/sdl/odata/client/caller/TracingEndpointCaller.java
deleted file mode 100644
index 8c00324c..00000000
--- a/odata_client_tracing/src/main/java/com/sdl/odata/client/caller/TracingEndpointCaller.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/**
- * Copyright (c) 2014-2025 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.sdl.odata.client.caller;
-
-import com.github.kristofa.brave.Brave;
-import com.github.kristofa.brave.Sampler;
-import com.github.kristofa.brave.httpclient.BraveHttpRequestInterceptor;
-import com.github.kristofa.brave.httpclient.BraveHttpResponseInterceptor;
-import com.sdl.odata.api.service.HeaderNames;
-import com.sdl.odata.api.service.MediaType;
-import com.sdl.odata.api.service.ODataRequest;
-import com.sdl.odata.client.api.caller.EndpointCaller;
-import com.sdl.odata.client.api.exception.ODataClientException;
-import com.sdl.odata.client.api.exception.ODataClientRuntimeException;
-import org.apache.http.HttpHost;
-import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.RequestBuilder;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import zipkin.reporter.AsyncReporter;
-import zipkin.reporter.urlconnection.URLConnectionSender;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-
-import static com.sdl.odata.api.service.MediaType.ATOM_XML;
-import static com.sdl.odata.api.service.MediaType.XML;
-import static com.sdl.odata.client.ODataClientConstants.DefaultValues.CLIENT_PROXY_PORT_DEFAULT;
-import static com.sdl.odata.client.ODataClientConstants.DefaultValues.CLIENT_TIMEOUT_DEFAULT;
-import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_CONNECTION_TIMEOUT;
-import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_HOST_NAME;
-import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_PORT;
-import static com.sdl.odata.client.property.PropertyUtils.getIntegerProperty;
-import static com.sdl.odata.client.property.PropertyUtils.getStringProperty;
-import static com.sdl.odata.client.util.ODataClientUtils.buildException;
-import static com.sdl.odata.client.util.ODataClientUtils.closeIfNecessary;
-import static com.sdl.odata.client.util.ODataClientUtils.populateRequestProperties;
-import static java.net.HttpURLConnection.HTTP_BAD_REQUEST;
-import static org.apache.http.util.TextUtils.isBlank;
-import static org.slf4j.LoggerFactory.getLogger;
-
-/**
- * Tracing implementation of {@link com.sdl.odata.client.api.caller.EndpointCaller}.
- * Using brave to generate and send spans into zipkin.
- */
-public class TracingEndpointCaller implements EndpointCaller {
-
- private static final Logger LOG = getLogger(TracingEndpointCaller.class);
-
- private static final String WRONG_URL_MESSAGE = "The URL syntax is wrong";
- private static final String REQUEST_FAILED_MESSAGE = "Cannot make a request to URL: ";
- private static final String APPLICATION_PROPERTIES_FILE_NAME = "/config/application.properties";
- private static final String DEFAULT_ZIPKIN_HOSTNAME = "http://localhost:9411";
-
- private CloseableHttpClient closeableHttpClient;
-
- public TracingEndpointCaller(Properties properties) {
- Integer timeout = getIntegerProperty(properties, CLIENT_CONNECTION_TIMEOUT, CLIENT_TIMEOUT_DEFAULT);
-
- String proxyServerHostName = getStringProperty(properties, CLIENT_SERVICE_PROXY_HOST_NAME);
- Integer proxyPort = getIntegerProperty(properties, CLIENT_SERVICE_PROXY_PORT);
- Integer proxyServerPort = proxyPort == null ? CLIENT_PROXY_PORT_DEFAULT : proxyPort;
-
- RequestConfig config = RequestConfig.custom()
- .setConnectTimeout(timeout)
- .setConnectionRequestTimeout(timeout)
- .setSocketTimeout(timeout)
- .build();
-
- HttpClientBuilder httpClientBuilder = HttpClients.custom()
- .setConnectionManager(new PoolingHttpClientConnectionManager())
- .setDefaultRequestConfig(config);
- if (!isBlank(proxyServerHostName) && proxyServerPort > 0) {
- httpClientBuilder.setProxy(new HttpHost(proxyServerHostName, proxyServerPort));
- }
-
- // load application.properties to know zipkin host, service name and how often to collect spans
- Properties applicationProperties = new Properties();
- try (InputStream stream = this.getClass().getResourceAsStream(APPLICATION_PROPERTIES_FILE_NAME)) {
- if (stream != null) {
- applicationProperties.load(stream);
- }
- } catch (IOException e) {
- LOG.warn("'{}' file is not available in the classpath", APPLICATION_PROPERTIES_FILE_NAME);
- }
-
- Brave brave = new Brave.Builder(applicationProperties.getProperty("spring.application.name", "cil-call"))
- .traceSampler(Sampler.create(
- Float.valueOf(applicationProperties.getProperty("spring.sleuth.sampler.percentage", "1.0"))))
- .reporter(AsyncReporter.builder(URLConnectionSender.builder().endpoint(
- applicationProperties.getProperty("spring.zipkin.baseUrl", DEFAULT_ZIPKIN_HOSTNAME)).build())
- .build()).build();
-
- closeableHttpClient = httpClientBuilder
- .addInterceptorFirst(BraveHttpRequestInterceptor.builder(brave).build())
- //new BraveHttpRequestInterceptor(brave.clientRequestInterceptor(),
- //new DefaultSpanNameProvider()))
- .addInterceptorFirst(BraveHttpResponseInterceptor.builder(brave).build())
- //new BraveHttpResponseInterceptor(brave.clientResponseInterceptor()))
- .build();
- }
-
- @Override
- public String callEndpoint(Map requestProperties, URL url) throws ODataClientException {
- LOG.debug("Preparing the call endpoint for given url: {}", url);
-
- CloseableHttpResponse closeableResponse = null;
- try {
- RequestBuilder requestBuilder = RequestBuilder.get()
- .setUri(url.toURI());
- getRequestHeaders(requestProperties, -1, null, XML).entrySet().stream()
- .forEach(entry -> requestBuilder.addHeader(entry.getKey(), entry.getValue()));
- closeableResponse = closeableHttpClient.execute(requestBuilder.build());
- String response = EntityUtils.toString(closeableResponse.getEntity(), "UTF-8");
-
- if (closeableResponse.getStatusLine().getStatusCode() >= HTTP_BAD_REQUEST) {
- throw buildException(response, closeableResponse.getStatusLine().getStatusCode());
- }
- return response;
- } catch (URISyntaxException e) {
- throw new ODataClientException(WRONG_URL_MESSAGE, e);
- } catch (IOException e) {
- throw new ODataClientRuntimeException(REQUEST_FAILED_MESSAGE + url, e);
- } finally {
- closeIfNecessary(closeableResponse);
- }
- }
-
- @Override
- public InputStream getInputStream(Map requestProperties, URL url) throws ODataClientException {
- LOG.debug("Preparing for getting an input stream by calling endpoint for given url: {}", url);
-
- try {
- RequestBuilder requestBuilder = RequestBuilder.get().setUri(url.toURI());
- requestProperties.entrySet().stream()
- .forEach(entry -> requestBuilder.addHeader(entry.getKey(), entry.getValue()));
- CloseableHttpResponse closeableResponse = closeableHttpClient.execute(requestBuilder.build());
-
- if (closeableResponse.getStatusLine().getStatusCode() >= HTTP_BAD_REQUEST) {
- throw buildException(EntityUtils.toString(closeableResponse.getEntity(), "UTF-8"),
- closeableResponse.getStatusLine().getStatusCode());
- }
- return closeableResponse.getEntity().getContent();
- } catch (URISyntaxException e) {
- throw new ODataClientException(WRONG_URL_MESSAGE + url, e);
- } catch (IOException e) {
- throw new ODataClientRuntimeException(REQUEST_FAILED_MESSAGE + url, e);
- }
- }
-
- @Override
- public String doPostEntity(Map requestProperties, URL url, String body,
- MediaType contentType, MediaType acceptType) throws ODataClientException {
- return sendRequest(getRequestHeaders(requestProperties, body.length(), contentType, acceptType),
- url, body, ODataRequest.Method.POST.name());
- }
-
- @Override
- public String doPutEntity(Map requestProperties, URL url, String body, MediaType type)
- throws ODataClientException {
- return sendRequest(getRequestHeaders(requestProperties, body.length(), type, type),
- url, body, ODataRequest.Method.PUT.name());
- }
-
- @Override
- public void doDeleteEntity(Map requestProperties, URL url) throws ODataClientException {
- sendRequest(getRequestHeaders(requestProperties, 0, ATOM_XML, ATOM_XML), url, "",
- ODataRequest.Method.DELETE.name());
- }
-
- private Map getRequestHeaders(
- Map requestProperties, int bodyLength, MediaType contentType, MediaType acceptType) {
- Map headers = populateRequestProperties(requestProperties, bodyLength, contentType, acceptType);
- headers.remove(HeaderNames.CONTENT_LENGTH);
- return headers;
- }
-
- private String sendRequest(Map properties, URL url, String body, String requestMethod)
- throws ODataClientException {
- LOG.debug("Preparing to make a {} request for given url: {}", requestMethod, url);
-
- CloseableHttpResponse closeableResponse = null;
- try {
- RequestBuilder requestBuilder = RequestBuilder.create(requestMethod)
- .setUri(url.toURI())
- .setEntity(new StringEntity(body));
- properties.entrySet().stream()
- .forEach(entry -> requestBuilder.addHeader(entry.getKey(), entry.getValue()));
- closeableResponse = closeableHttpClient.execute(requestBuilder.build());
- String response = EntityUtils.toString(closeableResponse.getEntity(), "UTF-8");
-
- if (closeableResponse.getStatusLine().getStatusCode() >= HTTP_BAD_REQUEST) {
- throw buildException(response, closeableResponse.getStatusLine().getStatusCode());
- }
- return response;
- } catch (URISyntaxException e) {
- throw new ODataClientException(WRONG_URL_MESSAGE + url, e);
- } catch (IOException e) {
- throw new ODataClientRuntimeException(REQUEST_FAILED_MESSAGE + url, e);
- } finally {
- closeIfNecessary(closeableResponse);
- }
- }
-}
diff --git a/odata_client_tracing/src/test/java/com/sdl/odata/client/caller/TracingEndpointCallerTest.java b/odata_client_tracing/src/test/java/com/sdl/odata/client/caller/TracingEndpointCallerTest.java
deleted file mode 100644
index b2b14b9c..00000000
--- a/odata_client_tracing/src/test/java/com/sdl/odata/client/caller/TracingEndpointCallerTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * Copyright (c) 2014-2025 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.sdl.odata.client.caller;
-
-import com.sdl.odata.client.URLTestUtils;
-import com.sdl.odata.client.api.caller.EndpointCaller;
-import com.sdl.odata.client.api.exception.ODataClientException;
-import com.sdl.odata.client.api.exception.ODataClientHttpError;
-import com.sdl.odata.client.api.exception.ODataClientNotAuthorized;
-import com.sdl.odata.client.api.exception.ODataClientRuntimeException;
-import com.sdl.odata.client.api.exception.ODataClientTimeout;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.test.context.junit.jupiter.SpringExtension;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Properties;
-
-import static com.sdl.odata.api.service.MediaType.JSON;
-import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_HOST_NAME;
-import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_PORT;
-import static java.net.HttpURLConnection.HTTP_CLIENT_TIMEOUT;
-import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
-import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
-import static java.util.Collections.emptyMap;
-import static java.util.Collections.singletonMap;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
-
-/**
- * Integration test for {@link TracingEndpointCaller}.
- */
-@Disabled
-@ExtendWith(SpringExtension.class)
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = TestConfiguration.class)
-@DirtiesContext
-public class TracingEndpointCallerTest {
-
- private static final String RESPONSE = "/response.xml";
-
- private final EndpointCaller caller = new TracingEndpointCaller(new Properties());
-
- @Value("${local.server.port}")
- private int port;
-
- private String basePath;
-
- @BeforeEach
- public void init() {
- basePath = "http://127.0.0.1:" + port;
- }
-
- @Test
- public void callEndpoint() throws ODataClientException, MalformedURLException {
- String response = caller.callEndpoint(singletonMap("Accept", APPLICATION_JSON_VALUE),
- new URL(basePath + RESPONSE));
- String expected = URLTestUtils.loadTextFile(RESPONSE);
- response = response.replace("\n", "").replace("\r", "");
- expected = expected.replace("\n", "").replace("\r", "");
- assertEquals(expected, response);
- }
-
- @Test
- public void callEndpointWithoutResponse() {
- assertThrows(ODataClientHttpError.class, () ->
- caller.callEndpoint(singletonMap("Accept", APPLICATION_JSON_VALUE), new URL(basePath))
- );
- }
-
- @Test
- public void getInputStream() throws ODataClientException, IOException {
- InputStream stream = caller.getInputStream(
- singletonMap("Accept", APPLICATION_JSON_VALUE), new URL(basePath + RESPONSE));
- StringBuilder sb = new StringBuilder();
- try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {
- String line;
- while ((line = reader.readLine()) != null) {
- sb.append(line).append(System.lineSeparator());
- }
- }
- assertEquals(URLTestUtils.loadTextFile(RESPONSE), sb.toString());
- }
-
- @Test
- public void testEmptyProxyPortNumber() throws ODataClientException, MalformedURLException {
- Properties properties = new Properties();
- properties.setProperty(CLIENT_SERVICE_PROXY_PORT, "");
-
- EndpointCaller proxifiedCaller = new TracingEndpointCaller(properties);
- String response = proxifiedCaller.callEndpoint(emptyMap(), new URL(basePath + RESPONSE));
- String result = URLTestUtils.loadTextFile(RESPONSE);
-
- response = response.replace("\n", "").replace("\r", "");
- result = result.replace("\n", "").replace("\r", "");
- assertEquals(result, response);
- }
-
- @Test
- public void unauthorizedPostEntity() {
- assertThrows(ODataClientNotAuthorized.class, () ->
- caller.doPostEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN), "", JSON, JSON)
- );
- }
-
- @Test
- public void forbiddenPostEntity() {
- assertThrows(ODataClientHttpError.class, () ->
- caller.doPostEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN), "", JSON, JSON)
- );
- }
-
- @Test
- public void timeoutPostEntity() {
- assertThrows(ODataClientTimeout.class, () ->
- caller.doPostEntity(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT), "", JSON, JSON)
- );
- }
-
- @Test
- public void okPutEntity() throws MalformedURLException, ODataClientException {
- String body = URLTestUtils.loadTextFile(RESPONSE);
- String result = caller.doPutEntity(emptyMap(), new URL(basePath + RESPONSE), body, JSON);
- body = body.replace("\n", "").replace("\r", "");
- result = result.replace("\n", "").replace("\r", "");
- assertEquals(result, body);
- }
-
- @Test
- public void unauthorizedPutEntity() {
- assertThrows(ODataClientNotAuthorized.class, () ->
- caller.doPutEntity(emptyMap(), buildUrlToCall(HTTP_UNAUTHORIZED), "", JSON)
- );
- }
-
- @Test
- public void forbiddenPutEntity() {
- assertThrows(ODataClientHttpError.class, () ->
- caller.doPutEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN), "", JSON)
- );
- }
-
- @Test
- public void timeoutPutEntity() {
- assertThrows(ODataClientTimeout.class, () ->
- caller.doPutEntity(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT), "", JSON)
- );
- }
-
- @Test
- public void unauthorizedDeleteEntity() {
- assertThrows(ODataClientNotAuthorized.class, () ->
- caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_UNAUTHORIZED))
- );
- }
-
- @Test
- public void forbiddenDeleteEntity() {
- assertThrows(ODataClientHttpError.class, () ->
- caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN))
- );
- }
-
- @Test
- public void timeoutDeleteEntity() {
- assertThrows(ODataClientTimeout.class, () ->
- caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT))
- );
- }
-
- @Test
- public void unauthorizedGet() {
- assertThrows(ODataClientNotAuthorized.class, () ->
- caller.callEndpoint(emptyMap(), buildUrlToCall(HTTP_UNAUTHORIZED))
- );
- }
-
- @Test
- public void forbiddenGet() {
- assertThrows(ODataClientHttpError.class, () ->
- caller.callEndpoint(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN))
- );
- }
-
- @Test
- public void timeoutGet() {
- assertThrows(ODataClientTimeout.class, () ->
- caller.callEndpoint(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT))
- );
- }
-
- @Test
- public void timeoutInputStream() {
- assertThrows(ODataClientTimeout.class, () ->
- caller.getInputStream(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT))
- );
- }
-
- @Test
- public void testIOExceptionOnOpenConnection() throws IOException {
- URL ioExceptionOnConnectUrl = URLTestUtils.getIOExceptionThrowingUrl(true);
- Properties properties = new Properties();
- properties.setProperty(CLIENT_SERVICE_PROXY_HOST_NAME, "localhost");
- properties.setProperty(CLIENT_SERVICE_PROXY_PORT, "9999");
- EndpointCaller proxifiedCaller = new TracingEndpointCaller(properties);
-
- assertThrows(ODataClientRuntimeException.class, () ->
- proxifiedCaller.callEndpoint(emptyMap(), ioExceptionOnConnectUrl)
- );
- }
-
- private URL buildUrlToCall(int code) throws MalformedURLException {
- return new URL(basePath + "/" + code);
- }
-}
diff --git a/odata_client_tracing/src/test/resources/application.properties b/odata_client_tracing/src/test/resources/application.properties
deleted file mode 100644
index 37edf157..00000000
--- a/odata_client_tracing/src/test/resources/application.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-spring.zipkin.baseUrl=http://localhost:9411
-spring.sleuth.sampler.percentage=1.0
-spring.application.name=your-service-name
diff --git a/odata_client_tracing/src/test/resources/response.xml b/odata_client_tracing/src/test/resources/response.xml
deleted file mode 100644
index 307569af..00000000
--- a/odata_client_tracing/src/test/resources/response.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- http://localhost:8080/odata.svc/$metadata#Article('artid')
-
-
- 2014-08-11T10:00:00Z
-
-
-
-
-
-
-
- artid
- article1_name
-
-
-
\ No newline at end of file
diff --git a/odata_common/pom.xml b/odata_common/pom.xml
index 0fff3621..6901dd31 100644
--- a/odata_common/pom.xml
+++ b/odata_common/pom.xml
@@ -1,7 +1,7 @@
+ xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
+ version="6.0">
OData v4 WAR module
diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml
index f6352959..00756ec0 100644
--- a/odata_webservice/pom.xml
+++ b/odata_webservice/pom.xml
@@ -1,7 +1,7 @@
- 4.13.6
- 33.2.0-jre
- 4.5.14
+ 33.5.0-jre
+ 5.6
2.17.3
- 0.8.12
+ 0.8.14
3.0.0
6.1.0
5.9.2
- 1.5.17
- 4.5.1
- 1.0.3
+ 1.5.32
+ 5.23.0
+ 1.4.0
0.19
2.1.1
2.12.19
3.1.4
- 2.0.13
- 3.3.9
- 6.1.18
- 10.1.39
+ 2.0.17
+ 3.5.11
+ 6.2.17
+ 10.1.52
1.4.3
2.12.2
- 1.1.2
@@ -167,9 +164,9 @@
${xerces.version}
- org.apache.httpcomponents
- httpclient
- ${httpcomponents.version}
+ org.apache.httpcomponents.client5
+ httpclient5
+ ${httpclient5.version}
jakarta.annotation
@@ -336,23 +333,6 @@
${tomcat.version}
-
-
- io.zipkin.brave
- brave-apache-http-interceptors
- ${brave.version}
-
-
- io.zipkin.brave
- brave-spancollector-http
- ${brave.version}
-
-
- io.zipkin.reporter
- zipkin-sender-urlconnection
- ${zipkin-sender.version}
-
-
com.sdl
@@ -453,24 +433,24 @@
com.mycila
license-maven-plugin
- 4.6
+ 5.0.0
net.alchim31.maven
scala-maven-plugin
- 4.5.6
+ 4.9.10
org.apache.maven.plugins
maven-antrun-plugin
- 3.1.0
+ 3.2.0
org.apache.ant
ant
- 1.10.11
+ 1.10.15
@@ -489,17 +469,17 @@
org.apache.maven.plugins
maven-clean-plugin
- 3.4.1
+ 3.5.0
org.apache.maven.plugins
maven-compiler-plugin
- 3.14.0
+ 3.15.0
org.apache.maven.plugins
maven-dependency-plugin
- 3.8.1
+ 3.10.0
org.apache.maven.plugins
@@ -509,12 +489,12 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.5.0
+ 3.6.2
org.apache.maven.plugins
maven-gpg-plugin
- 3.2.7
+ 3.2.8
org.apache.maven.plugins
@@ -524,7 +504,7 @@
org.apache.maven.plugins
maven-jar-plugin
- 3.4.2
+ 3.5.0
false
@@ -546,12 +526,12 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.11.2
+ 3.12.0
org.apache.maven.plugins
maven-release-plugin
- 3.1.1
+ 3.3.1
true
release
@@ -560,12 +540,12 @@
org.apache.maven.plugins
maven-resources-plugin
- 3.3.1
+ 3.5.0
org.apache.maven.plugins
maven-source-plugin
- 3.3.1
+ 3.4.0
org.apache.maven.plugins
@@ -575,28 +555,28 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.5.2
+ 3.5.5
org.apache.maven.plugins
maven-war-plugin
- 3.4.0
+ 3.5.1
org.codehaus.mojo
build-helper-maven-plugin
- 3.6.0
+ 3.6.1
org.codehaus.mojo
flatten-maven-plugin
- 1.7.0
+ 1.7.3
org.codehaus.mojo
versions-maven-plugin
- 2.18.0
+ 2.21.0
com.sdl:*
@@ -629,9 +609,9 @@
- org.sonatype.plugins
- nexus-staging-maven-plugin
- 1.7.0
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.10.0
@@ -697,8 +677,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- ${java.version}
- ${java.version}
+ ${java.version}
@@ -721,7 +700,7 @@
- [${java.version},22]
+ [${java.version},26]
3.8.6
@@ -901,13 +880,13 @@
- org.sonatype.plugins
- nexus-staging-maven-plugin
+ org.sonatype.central
+ central-publishing-maven-plugin
true
- ossrh
- https://s01.oss.sonatype.org/
- true
+ central
+ true
+ published