From: Fiete Ostkamp Date: Wed, 11 Mar 2026 06:58:24 +0000 (+0100) Subject: Clean up dependencies X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=43b2d9b998635073cb520b157bbe3c85ae26301f;p=ccsdk%2Fcds.git Clean up dependencies - declare deps closer to where they are used - remove unused dependencies - if deps were declared to override their version, do so in dependencyManagement section instead of declaring them as direct dependencies Issue-ID: CCSDK-4185 Change-Id: Iec95a1af1fb2b0807686111f04713dd329c5602c Signed-off-by: Fiete Ostkamp --- diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index 677e06018..ad174c508 100755 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -49,11 +49,6 @@ - - org.springframework.security - spring-security-core - 6.4.6 - org.eclipse.jetty.http2 http2-common @@ -141,11 +136,6 @@ com.h2database h2 - - org.powermock - powermock-api-mockito2 - test - org.springframework.boot spring-boot-starter-test @@ -236,16 +226,6 @@ spring-kafka ${spring-kafka.version} - - org.bitbucket.b_c - jose4j - 0.9.4 - - - org.apache.zookeeper - zookeeper - 3.9.3 - diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt index 0e32cf2d4..1909d0335 100644 --- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt +++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt @@ -25,6 +25,8 @@ import com.nhaarman.mockitokotlin2.any import com.nhaarman.mockitokotlin2.argThat import com.nhaarman.mockitokotlin2.atLeast import com.nhaarman.mockitokotlin2.atMost +import com.nhaarman.mockitokotlin2.doAnswer +import com.nhaarman.mockitokotlin2.doReturn import com.nhaarman.mockitokotlin2.eq import com.nhaarman.mockitokotlin2.mock import com.nhaarman.mockitokotlin2.times @@ -201,39 +203,42 @@ open class UatExecutor( ) // Delegates to overloaded exchangeResource(String, String, String, Map) - whenever(restClient.exchangeResource(any(), any(), any())) - .thenAnswer { invocation -> - val method = invocation.arguments[0] as String - val path = invocation.arguments[1] as String - val request = invocation.arguments[2] as String - restClient.exchangeResource(method, path, request, emptyMap()) - } + // Use doAnswer/doReturn to avoid WrongTypeOfReturnValue caused by MockInvocationLogger + // calling toString() on the SmartNull return value during Mockito's stubbing-recording phase + doAnswer { invocation -> + val method = invocation.arguments[0] as String + val path = invocation.arguments[1] as String + val request = invocation.arguments[2] as String + restClient.exchangeResource(method, path, request, emptyMap()) + }.whenever(restClient).exchangeResource(any(), any(), any()) for (expectation in restExpectations) { if (expectation.request.requestType == EXCHANGE_RESOURCE) { - var stubbing = whenever( - restClient.exchangeResource( - eq(expectation.request.method), - eq(expectation.request.path), - argThat(JsonMatcher(expectation.request.body.toString())), - any() - ) - ) - for (response in expectation.responses) { - stubbing = stubbing.thenReturn(WebClientResponse(response.status, response.body.toString())) + val responses = expectation.responses + .map { response -> WebClientResponse(response.status, response.body.toString()) } + if (responses.isNotEmpty()) { + doReturn(responses[0], *responses.drop(1).toTypedArray()) + .whenever(restClient) + .exchangeResource( + eq(expectation.request.method), + eq(expectation.request.path), + argThat(JsonMatcher(expectation.request.body.toString())), + any() + ) } } } for (expectation in restExpectations) { if (expectation.request.requestType == UPLOAD_BINARY_FILE) { - var stubbing = whenever( - restClient.uploadBinaryFile( - eq(expectation.request.path), - any() - ) - ) - for (response in expectation.responses) { - stubbing = stubbing.thenReturn(WebClientResponse(response.status, response.body.toString())) + val responses = expectation.responses + .map { response -> WebClientResponse(response.status, response.body.toString()) } + if (responses.isNotEmpty()) { + doReturn(responses[0], *responses.drop(1).toTypedArray()) + .whenever(restClient) + .uploadBinaryFile( + eq(expectation.request.path), + any() + ) } } } diff --git a/ms/blueprintsprocessor/functions/blueprint-audit-status/pom.xml b/ms/blueprintsprocessor/functions/blueprint-audit-status/pom.xml index 4aa5a0fe0..a804d4067 100644 --- a/ms/blueprintsprocessor/functions/blueprint-audit-status/pom.xml +++ b/ms/blueprintsprocessor/functions/blueprint-audit-status/pom.xml @@ -55,9 +55,8 @@ mariadb-java-client - org.hibernate + org.hibernate.orm hibernate-testing - 6.2.7.Final test diff --git a/ms/blueprintsprocessor/functions/config-snapshots/pom.xml b/ms/blueprintsprocessor/functions/config-snapshots/pom.xml index a54cc90d7..42fc6b4a4 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/pom.xml +++ b/ms/blueprintsprocessor/functions/config-snapshots/pom.xml @@ -52,9 +52,8 @@ xmlunit-core - org.hibernate + org.hibernate.orm hibernate-testing - 6.2.7.Final test diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml index 600426f17..0d640004d 100755 --- a/ms/blueprintsprocessor/functions/pom.xml +++ b/ms/blueprintsprocessor/functions/pom.xml @@ -77,11 +77,6 @@ spring-kafka ${spring-kafka.version} - - org.powermock - powermock-api-mockito2 - test - org.mockito.kotlin mockito-kotlin diff --git a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml index c5cd42553..9c2721662 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml +++ b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml @@ -55,9 +55,8 @@ mariadb-java-client - org.hibernate + org.hibernate.orm hibernate-testing - 6.2.7.Final test diff --git a/ms/blueprintsprocessor/functions/restful-executor/pom.xml b/ms/blueprintsprocessor/functions/restful-executor/pom.xml index ecefcc0d5..e44f76dc6 100644 --- a/ms/blueprintsprocessor/functions/restful-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/restful-executor/pom.xml @@ -47,7 +47,6 @@ org.springframework spring-web - 6.2.8 org.springframework diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/pom.xml b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/pom.xml index d8a1b5af6..65b6f7e6a 100644 --- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/pom.xml +++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/pom.xml @@ -82,6 +82,16 @@ org.apache.commons commons-compress + + com.jayway.jsonpath + json-path + + + org.slf4j + slf4j-api + + + org.junit.vintage @@ -91,7 +101,6 @@ net.bytebuddy byte-buddy - ${bytebuddy.version} test diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/pom.xml b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/pom.xml index dce6a130f..ed5635f99 100644 --- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/pom.xml +++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/pom.xml @@ -35,7 +35,6 @@ org.springframework spring-core - 6.0.0 org.springframework @@ -59,7 +58,6 @@ net.bytebuddy byte-buddy - ${bytebuddy.version} test diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index 3a40e4918..0694bb594 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -67,9 +67,8 @@ mariadb-java-client - org.hibernate + org.hibernate.orm hibernate-testing - 6.2.7.Final test diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index db6390660..95838f854 100755 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -58,11 +58,6 @@ mockk-jvm test - - org.powermock - powermock-api-mockito2 - test - org.springframework.boot spring-boot-starter-test @@ -83,11 +78,6 @@ spring-kafka ${spring-kafka.version} - - org.bitbucket.b_c - jose4j - 0.9.4 - org.jetbrains.kotlinx kotlinx-coroutines-test diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml index 77f30e937..3b2b8b200 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml @@ -53,7 +53,6 @@ org.springframework spring-web - 6.2.8 org.springframework.boot @@ -68,7 +67,6 @@ org.springframework.security spring-security-core - 6.4.6 org.springframework diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml index 9fe4f6163..a07f5aea0 100644 --- a/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/pom.xml @@ -43,16 +43,6 @@ org.apache.sshd sshd-core - - org.bitbucket.b_c - jose4j - 0.9.4 - - - org.apache.zookeeper - zookeeper - 3.9.3 - org.scala-lang scala-library diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml index e72afa1bf..18e908c38 100644 --- a/ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/pom.xml @@ -38,7 +38,6 @@ org.springframework.security spring-security-core - 6.4.6 org.onap.ccsdk.cds.blueprintsprocessor.modules diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index 9d33898e1..5e847197a 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -44,7 +44,6 @@ org.springframework.security spring-security-core - 6.4.6 org.onap.ccsdk.cds.blueprintsprocessor.modules @@ -66,11 +65,6 @@ mockk-jvm test - - org.powermock - powermock-api-mockito2 - test - org.springframework.boot spring-boot-starter-test diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index 2bf42bdc6..0bf94757e 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -34,7 +34,6 @@ org.springframework.security spring-security-core - 6.4.6 org.onap.ccsdk.cds.blueprintsprocessor.modules diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml index fbfbcb611..cb6609a95 100755 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml @@ -71,16 +71,6 @@ - - org.bitbucket.b_c - jose4j - 0.9.4 - - - org.apache.zookeeper - zookeeper - 3.9.3 - org.scala-lang scala-library @@ -97,18 +87,6 @@ 1.11.0 - - - org.apache.kafka - kafka_2.13 - - - org.slf4j - slf4j-log4j12 - - - - io.micrometer micrometer-core diff --git a/ms/blueprintsprocessor/modules/inbounds/workflow-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/workflow-api/pom.xml index a32d3a7bb..bea48a506 100644 --- a/ms/blueprintsprocessor/modules/inbounds/workflow-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/workflow-api/pom.xml @@ -34,7 +34,6 @@ org.springframework.security spring-security-core - 6.4.6 org.onap.ccsdk.cds.blueprintsprocessor.modules diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml index be41eea98..d25429ed4 100755 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -49,11 +49,6 @@ mockk-jvm test - - org.powermock - powermock-api-mockito2 - test - org.springframework.boot spring-boot-starter-test diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index 2f1efd914..95bba5a6d 100755 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -73,6 +73,16 @@ spring-kafka ${spring-kafka.version} + + org.apache.kafka + kafka-clients + 3.9.1 + + + org.apache.kafka + kafka-streams + ${kafka.version} + @@ -118,22 +128,11 @@ guava ${guava.version} - - net.javacrumbs.json-unit - json-unit-json-path - ${json.unit.version} - compile - org.python jython-standalone ${jython.version} - - net.minidev - json-smart - ${json-smart.version} - @@ -167,6 +166,8 @@ org.jetbrains.kotlin kotlin-script-util + 1.8.22 @@ -214,12 +215,6 @@ ${hazelcast.version} - - org.springframework.security - spring-security-core - 6.4.6 - - org.apache.sshd @@ -238,14 +233,9 @@ ${jsch.version} - org.apache.kafka - kafka-clients - 3.9.1 - - - org.apache.kafka - kafka-streams - ${kafka.version} + ch.qos.logback + logback-core + 1.5.18 @@ -527,12 +517,6 @@ ${mockkserver.version} test - - org.powermock - powermock-api-mockito2 - ${powermock.version} - test - com.nhaarman.mockitokotlin2 mockito-kotlin @@ -567,6 +551,12 @@ byte-buddy-agent ${bytebuddy.version} + + org.hibernate + hibernate-testing + ${hibernate.version} + test + @@ -590,7 +580,6 @@ commons-io commons-io - 2.14.0 com.jayway.jsonpath @@ -606,10 +595,6 @@ net.minidev json-smart - - net.javacrumbs.json-unit - json-unit-json-path - com.google.guava guava @@ -739,28 +724,6 @@ - - spring-libs-milestone - Spring Milestone Maven Repository - http://oss.jfrog.org/artifactory/oss-release-local/ - - true - - - false - - - - spring-libs-milestone-snapshot - Spring Milestone Maven Repository - snapshots - http://oss.jfrog.org/artifactory/oss-snapshot-local/ - - false - - - true - - diff --git a/ms/sdclistener/parent/pom.xml b/ms/sdclistener/parent/pom.xml index 83475a3a0..10795567d 100755 --- a/ms/sdclistener/parent/pom.xml +++ b/ms/sdclistener/parent/pom.xml @@ -80,7 +80,6 @@ org.springframework.security spring-security-core - 6.4.6 com.google.guava diff --git a/pom.xml b/pom.xml index 45ddefdb2..1fe35584f 100644 --- a/pom.xml +++ b/pom.xml @@ -103,31 +103,11 @@ limitations under the License. logstash-logback-encoder 7.4 - - com.squareup.okio - okio - 3.4.0 - org.yaml snakeyaml 2.0 - - org.xerial.snappy - snappy-java - 1.1.10.4 - - - org.apache.kafka - kafka-clients - 3.9.1 - - - org.jsoup - jsoup - 1.15.3 -