summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--auth/cli-codegen/pom.xml5
-rw-r--r--auth/cli-editor/pom.xml12
-rw-r--r--auth/pom.xml2
-rw-r--r--context/context-management/pom.xml2
-rw-r--r--context/pom.xml2
-rw-r--r--core/pom.xml17
-rw-r--r--core/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java5
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java10
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/StateExecutorTest.java7
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java7
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java20
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java10
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java10
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java7
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java8
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java7
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContextTest.java7
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java7
-rw-r--r--core/src/test/java/org/onap/policy/apex/core/engine/executor/impl/ExceutorFactoryImplTest.java9
-rw-r--r--examples/examples-aadm/pom.xml2
-rw-r--r--examples/examples-acm/pom.xml191
-rw-r--r--examples/examples-acm/src/main/java/org/onap/policy/apex/examples/acm/AcmTestRestDmaapEndpoint.java14
-rw-r--r--examples/examples-acm/src/test/java/org/onap/policy/apex/examples/acm/TestApexAcmExample.java4
-rw-r--r--examples/examples-adaptive/pom.xml2
-rw-r--r--examples/examples-decisionmaker/pom.xml2
-rw-r--r--examples/examples-grpc/pom.xml317
-rw-r--r--examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/GrpcTestRestSimEndpoint.java12
-rw-r--r--examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/TestApexGrpcExample.java8
-rw-r--r--examples/examples-myfirstpolicy/pom.xml2
-rw-r--r--examples/examples-onap-bbs/pom.xml23
-rw-r--r--examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java3
-rw-r--r--examples/examples-onap-vcpe/pom.xml2
-rw-r--r--examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/OnapVCpeSimEndpoint.java14
-rw-r--r--examples/examples-periodic/pom.xml2
-rw-r--r--examples/examples-servlet/pom.xml8
-rw-r--r--examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java7
-rw-r--r--examples/pom.xml2
-rw-r--r--model/pom.xml26
-rw-r--r--model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java4
-rw-r--r--model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java8
-rw-r--r--packages/apex-pdp-docker/pom.xml2
-rw-r--r--packages/apex-pdp-docker/src/main/docker/Dockerfile2
-rw-r--r--packages/apex-pdp-package-full/pom.xml2
-rw-r--r--packages/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/pom.xml5
-rw-r--r--plugins/plugins-context/plugins-context-distribution/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-locking/plugins-context-locking-curator/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-locking/plugins-context-locking-hazelcast/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-locking/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-persistence/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/pom.xml2
-rw-r--r--plugins/plugins-context/plugins-context-schema/plugins-context-schema-json/pom.xml11
-rw-r--r--plugins/plugins-context/plugins-context-schema/pom.xml2
-rw-r--r--plugins/plugins-context/pom.xml2
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/pom.xml34
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml23
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java14
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java14
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java12
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java20
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml3
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml27
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducer.java10
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java10
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java10
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml23
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumer.java12
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java14
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml10
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilter.java9
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java2
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerEndpoint.java64
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilterTest.java10
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java4
-rw-r--r--plugins/plugins-event/plugins-event-carrier/pom.xml2
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml2
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/test/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverterTest.java7
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml2
-rw-r--r--plugins/plugins-event/plugins-event-protocol/pom.xml2
-rw-r--r--plugins/plugins-event/pom.xml15
-rw-r--r--plugins/plugins-executor/plugins-executor-java/pom.xml2
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/pom.xml18
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/pom.xml2
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/pom.xml5
-rw-r--r--plugins/plugins-executor/pom.xml2
-rw-r--r--plugins/pom.xml21
-rw-r--r--pom.xml73
-rw-r--r--services/pom.xml2
-rw-r--r--services/services-engine/pom.xml14
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java6
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java3
-rw-r--r--services/services-onappf/pom.xml19
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java40
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java14
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java6
-rw-r--r--testsuites/apex-pdp-stability/pom.xml2
-rw-r--r--testsuites/integration/integration-common/pom.xml2
-rw-r--r--testsuites/integration/integration-context-test/pom.xml2
-rw-r--r--testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ArtifactKeyTestEntity.java4
-rw-r--r--testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ReferenceKeyTestEntity.java4
-rw-r--r--testsuites/integration/integration-executor-test/pom.xml13
-rw-r--r--testsuites/integration/integration-uservice-test/pom.xml51
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventProducer.java18
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventSubscriber.java22
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsServerRunner.java111
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestContext.java7
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestJms2Jms.java97
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java6
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java6
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRestClientEndpoint.java13
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restserver/TestRestServer.java10
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/RestClientEndpointForTaskParameters.java12
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/TestTaskParameters.java6
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/resources/logback-test.xml9
-rw-r--r--testsuites/integration/pom.xml2
-rw-r--r--testsuites/performance/performance-benchmark-test/pom.xml16
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java14
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java10
-rw-r--r--testsuites/performance/pom.xml2
-rw-r--r--testsuites/pom.xml2
-rw-r--r--tools/model-generator/pom.xml13
-rw-r--r--tools/pom.xml2
-rw-r--r--tools/simple-wsclient/pom.xml23
-rw-r--r--tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java98
-rw-r--r--tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java82
-rw-r--r--tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java25
-rw-r--r--tools/tools-common/pom.xml10
-rw-r--r--version.properties2
131 files changed, 1086 insertions, 1053 deletions
diff --git a/auth/cli-codegen/pom.xml b/auth/cli-codegen/pom.xml
index bcd147c45..484b5564a 100644
--- a/auth/cli-codegen/pom.xml
+++ b/auth/cli-codegen/pom.xml
@@ -1,6 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
+ Modifications Copyright (C) 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -24,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.auth</groupId>
<artifactId>auth</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>cli-codegen</artifactId>
@@ -35,7 +36,7 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>ST4</artifactId>
- <version>4.3</version>
+ <version>${version.antlr.st4}</version>
</dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.model</groupId>
diff --git a/auth/cli-editor/pom.xml b/auth/cli-editor/pom.xml
index 6562165a9..c93be52c0 100644
--- a/auth/cli-editor/pom.xml
+++ b/auth/cli-editor/pom.xml
@@ -18,13 +18,14 @@
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.auth</groupId>
<artifactId>auth</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>cli-editor</artifactId>
@@ -45,12 +46,5 @@
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
-
- <!--test dependencies -->
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/auth/pom.xml b/auth/pom.xml
index c6fc3f65a..6b219603a 100644
--- a/auth/pom.xml
+++ b/auth/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.auth</groupId>
diff --git a/context/context-management/pom.xml b/context/context-management/pom.xml
index e4ecf055f..43dee626f 100644
--- a/context/context-management/pom.xml
+++ b/context/context-management/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.context</groupId>
<artifactId>context</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>context-management</artifactId>
diff --git a/context/pom.xml b/context/pom.xml
index 89f6d3f5c..778f7399b 100644
--- a/context/pom.xml
+++ b/context/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.context</groupId>
diff --git a/core/pom.xml b/core/pom.xml
index 2d7d23fd2..4e4e96f70 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -1,7 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
- Modifications Copyright (C) 2020,2022 Nordix Foundation.
+ Modifications Copyright (C) 2020,2022-2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,12 +18,13 @@
SPDX-License-Identifier: Apache-2.0
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.core</groupId>
@@ -51,15 +52,5 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/core/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java b/core/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java
index 9345abaaa..cea505854 100644
--- a/core/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java
+++ b/core/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ApplicationThreadFactory.java
@@ -3,6 +3,7 @@
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -71,7 +72,11 @@ public class ApplicationThreadFactory implements ThreadFactory {
* @param stackSize the stack size
* @param threadPriority the thread priority
*/
+ @SuppressWarnings({
+ "deprecation", "removal"
+ })
public ApplicationThreadFactory(final String nameLocal, final long stackSize, final int threadPriority) {
+ @SuppressWarnings("removal")
final var s = System.getSecurityManager();
group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
name = APPLICATION_NAME + nameLocal + HYPHEN + NEXT_POOL_NUMBER.getAndIncrement();
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java
index 3b682acd6..8d7df45cd 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,9 +39,10 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.parameters.ContextParameterConstants;
import org.onap.policy.apex.context.parameters.DistributorParameters;
import org.onap.policy.apex.context.parameters.LockManagerParameters;
@@ -70,6 +71,7 @@ import org.onap.policy.common.parameters.ParameterService;
/**
* Test the engine implementation.
*/
+@RunWith(MockitoJUnitRunner.class)
public class ApexEngineImplTest {
private static final String ENGINE_ID = "Engine:0.0.1";
@@ -97,10 +99,8 @@ public class ApexEngineImplTest {
*/
@Before
public void initializeMocking() throws ApexException {
- MockitoAnnotations.initMocks(this);
-
Mockito.doThrow(new StateMachineException("mocked state machine exception",
- new IOException("nexted exception"))).when(smHandlerMock).execute(Mockito.anyObject());
+ new IOException("nexted exception"))).when(smHandlerMock).execute(Mockito.any());
}
/**
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateExecutorTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateExecutorTest.java
index f3e12cc1f..fc1b339d2 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateExecutorTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateExecutorTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,9 +26,10 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.core.engine.ExecutorParameters;
import org.onap.policy.apex.core.engine.context.ApexInternalContext;
import org.onap.policy.apex.core.engine.event.EnEvent;
@@ -38,6 +39,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxState;
/**
* Test task executor.
*/
+@RunWith(MockitoJUnitRunner.class)
public class StateExecutorTest {
@Mock
private ApexInternalContext internalContextMock;
@@ -56,7 +58,6 @@ public class StateExecutorTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
Mockito.doReturn(new AxReferenceKey("Policy:0.0.1:PolName:State0")).when(axStateMock).getKey();
}
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java
index 8f6544497..e140291b4 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,9 +28,10 @@ import java.util.Map;
import java.util.Properties;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.core.engine.ExecutorParameters;
import org.onap.policy.apex.core.engine.context.ApexInternalContext;
@@ -43,6 +44,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxStateFinalizerLogic;
/**
* Test task executor.
*/
+@RunWith(MockitoJUnitRunner.class)
public class StateFinalizerExecutorTest {
@Mock
private Executor<?, ?, ?, ?> parentMock;
@@ -64,7 +66,6 @@ public class StateFinalizerExecutorTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
AxState state = new AxState();
state.getStateOutputs().put("ValidOutput", null);
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java
index 5d91bd2b3..14cc89ee8 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -35,9 +35,10 @@ import java.util.Map;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.context.parameters.SchemaParameters;
import org.onap.policy.apex.core.engine.ExecutorParameters;
@@ -65,6 +66,7 @@ import org.onap.policy.common.parameters.ParameterService;
/**
* Test task executor.
*/
+@RunWith(MockitoJUnitRunner.class)
public class StateMachineExecutorTest {
@Mock
private ApexInternalContext internalContextMock;
@@ -89,8 +91,6 @@ public class StateMachineExecutorTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
-
axPolicy.setKey(new AxArtifactKey("Policy:0.0.1"));
AxReferenceKey state0Key = new AxReferenceKey(axPolicy.getKey(), "state0");
@@ -169,16 +169,16 @@ public class StateMachineExecutorTest {
AxStateTaskReference str1 = new AxStateTaskReference(str1Key, AxStateTaskOutputType.LOGIC, sflKey);
state1.getTaskReferences().put(task1Key, str1);
- Mockito.doReturn(new DummyTaskExecutor(true)).when(executorFactoryMock).getTaskExecutor(Mockito.anyObject(),
- Mockito.anyObject(), Mockito.anyObject());
+ Mockito.doReturn(new DummyTaskExecutor(true)).when(executorFactoryMock).getTaskExecutor(Mockito.any(),
+ Mockito.any(), Mockito.any());
dummyTsle = new DummyTaskSelectExecutor(true);
- Mockito.doReturn(dummyTsle).when(executorFactoryMock).getTaskSelectionExecutor(Mockito.anyObject(),
- Mockito.anyObject(), Mockito.anyObject());
+ Mockito.doReturn(dummyTsle).when(executorFactoryMock).getTaskSelectionExecutor(Mockito.any(),
+ Mockito.any(), Mockito.any());
dummySfle = new DummyStateFinalizerExecutor(true);
- Mockito.doReturn(dummySfle).when(executorFactoryMock).getStateFinalizerExecutor(Mockito.anyObject(),
- Mockito.anyObject(), Mockito.anyObject());
+ Mockito.doReturn(dummySfle).when(executorFactoryMock).getStateFinalizerExecutor(Mockito.any(),
+ Mockito.any(), Mockito.any());
}
@After
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java
index 4160a9f19..1c4ffe4fc 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,9 +36,10 @@ import java.util.Properties;
import java.util.TreeMap;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.core.engine.ExecutorParameters;
import org.onap.policy.apex.core.engine.TaskParameters;
@@ -57,6 +58,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTaskParameter;
/**
* Test task excutor.
*/
+@RunWith(MockitoJUnitRunner.class)
public class TaskExecutorTest {
@Mock
private AxTask axTaskMock;
@@ -96,7 +98,6 @@ public class TaskExecutorTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
AxArtifactKey task0Key = new AxArtifactKey("Task0:0.0.1");
Mockito.doReturn(task0Key).when(axTaskMock).getKey();
@@ -117,12 +118,9 @@ public class TaskExecutorTest {
AxArtifactKey schemaKey = new AxArtifactKey("Schema:0.0.1");
Mockito.doReturn(schemaKey).when(axInputFieldMock).getSchema();
Mockito.doReturn(schemaKey).when(axOptionalInputFieldMock).getSchema();
- Mockito.doReturn(schemaKey).when(axOutputFieldMock).getSchema();
- Mockito.doReturn(schemaKey).when(axOptionalOutputFieldMock).getSchema();
Mockito.doReturn(schemaKey).when(axMissingOutputFieldMock).getSchema();
Mockito.doReturn(true).when(axOptionalInputFieldMock).getOptional();
- Mockito.doReturn(true).when(axOptionalOutputFieldMock).getOptional();
Mockito.doReturn(false).when(axMissingOutputFieldMock).getOptional();
Mockito.doReturn(taskLogicMock).when(axTaskMock).getTaskLogic();
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java
index 613d1ae01..cf3c59fa9 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,9 +29,10 @@ import java.util.Map;
import java.util.Properties;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.core.engine.ExecutorParameters;
import org.onap.policy.apex.core.engine.context.ApexInternalContext;
import org.onap.policy.apex.core.engine.event.EnEvent;
@@ -45,6 +46,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTaskSelectionLogic;
/**
* Test task executor.
*/
+@RunWith(MockitoJUnitRunner.class)
public class TaskSelectExecutorTest {
@Mock
private AxState axStateMock;
@@ -66,11 +68,9 @@ public class TaskSelectExecutorTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
AxReferenceKey state0Key = new AxReferenceKey("State0Parent:0.0.1:Parent:State0");
Mockito.doReturn(state0Key).when(axStateMock).getKey();
- Mockito.doReturn(state0Key.getId()).when(axStateMock).getId();
Map<AxArtifactKey, AxStateTaskReference> taskReferences = new LinkedHashMap<>();
taskReferences.put(new AxArtifactKey("Task0:0.0.0"), null);
@@ -79,8 +79,6 @@ public class TaskSelectExecutorTest {
Mockito.doReturn(new AxArtifactKey("Task1:0.0.0")).when(axStateMock).getDefaultTask();
Mockito.doReturn(taskSelectionLogicMock).when(axStateMock).getTaskSelectionLogic();
-
- Mockito.doReturn(new AxArtifactKey("Context:0.0.1")).when(internalContextMock).getKey();
}
@Test
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java
index 68d478877..54013e943 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,9 +28,10 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
import org.onap.policy.apex.model.basicmodel.service.ModelService;
@@ -40,6 +42,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTasks;
/**
* Test the state facade.
*/
+@RunWith(MockitoJUnitRunner.class)
public class AxStateFacadeTest {
@Mock
private AxState axStateMock;
@@ -52,8 +55,6 @@ public class AxStateFacadeTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
-
AxReferenceKey stateKey = new AxReferenceKey("StateParent:0.0.1:ParentName:StateName");
Mockito.doReturn(stateKey).when(axStateMock).getKey();
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java
index 9da8ecfad..634b3b35c 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,9 +31,10 @@ import java.util.TreeMap;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.parameters.ContextParameterConstants;
import org.onap.policy.apex.context.parameters.SchemaParameters;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -51,6 +52,7 @@ import org.onap.policy.common.parameters.ParameterService;
/**
* Test the state facade.
*/
+@RunWith(MockitoJUnitRunner.class)
public class AxTaskFacadeTest {
@Mock
private AxTask axTaskMock;
@@ -80,8 +82,6 @@ public class AxTaskFacadeTest {
ModelService.registerModel(AxContextSchemas.class, schemas);
- MockitoAnnotations.initMocks(this);
-
AxArtifactKey task0Key = new AxArtifactKey("Task0:0.0.1");
Mockito.doReturn(task0Key).when(axTaskMock).getKey();
Mockito.doReturn(task0Key.getId()).when(axTaskMock).getId();
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java
index c540f51ad..9c6aa2f07 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,9 +31,10 @@ import java.util.Map;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.core.engine.context.ApexInternalContext;
import org.onap.policy.apex.core.engine.executor.StateFinalizerExecutor;
@@ -44,6 +45,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxState;
/**
* Test Task Execution Context.
*/
+@RunWith(MockitoJUnitRunner.class)
public class StateFinalizerExecutionContextTest {
@Mock
private StateFinalizerExecutor stateFinalizerExecutorMock;
@@ -62,7 +64,6 @@ public class StateFinalizerExecutionContextTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
Set<AxArtifactKey> contextAlbumReferences = new LinkedHashSet<>();
contextAlbumReferences.add(new AxArtifactKey(("AlbumKey0:0.0.1")));
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContextTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContextTest.java
index 24c504822..7f813cc01 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContextTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContextTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,9 +35,10 @@ import java.util.Map;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.core.engine.context.ApexInternalContext;
import org.onap.policy.apex.core.engine.executor.TaskExecutor;
@@ -49,6 +50,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTaskParameter;
/**
* Test Task Execution Context.
*/
+@RunWith(MockitoJUnitRunner.class)
public class TaskExecutionContextTest {
@Mock
private TaskExecutor taskExecutorMock;
@@ -67,7 +69,6 @@ public class TaskExecutionContextTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
Set<AxArtifactKey> contextAlbumReferences = new LinkedHashSet<>();
contextAlbumReferences.add(new AxArtifactKey(("AlbumKey0:0.0.1")));
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java
index 5857e0513..84f4817e0 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,9 +31,10 @@ import java.util.Map;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.core.engine.context.ApexInternalContext;
import org.onap.policy.apex.core.engine.event.EnEvent;
@@ -45,6 +46,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxState;
/**
* Test Task Execution Context.
*/
+@RunWith(MockitoJUnitRunner.class)
public class TaskSelectionExecutionContextTest {
@Mock
private TaskSelectExecutor taskSelectExecutorMock;
@@ -66,7 +68,6 @@ public class TaskSelectionExecutionContextTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
Set<AxArtifactKey> contextAlbumReferences = new LinkedHashSet<>();
contextAlbumReferences.add(new AxArtifactKey(("AlbumKey0:0.0.1")));
diff --git a/core/src/test/java/org/onap/policy/apex/core/engine/executor/impl/ExceutorFactoryImplTest.java b/core/src/test/java/org/onap/policy/apex/core/engine/executor/impl/ExceutorFactoryImplTest.java
index 5957ff347..c8aa7eb08 100644
--- a/core/src/test/java/org/onap/policy/apex/core/engine/executor/impl/ExceutorFactoryImplTest.java
+++ b/core/src/test/java/org/onap/policy/apex/core/engine/executor/impl/ExceutorFactoryImplTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,9 +28,10 @@ import static org.junit.Assert.assertNull;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.core.engine.EngineParameters;
import org.onap.policy.apex.core.engine.ExecutorParameters;
import org.onap.policy.apex.core.engine.context.ApexInternalContext;
@@ -47,6 +48,7 @@ import org.onap.policy.common.parameters.ParameterService;
* Test the executor factory implementation.
*
*/
+@RunWith(MockitoJUnitRunner.class)
public class ExceutorFactoryImplTest {
@Mock
private ApexInternalContext internalContextMock;
@@ -76,7 +78,6 @@ public class ExceutorFactoryImplTest {
*/
@Before
public void startMocking() {
- MockitoAnnotations.initMocks(this);
Mockito.doReturn(tslMock).when(stateMock).getTaskSelectionLogic();
Mockito.doReturn("Dummy").when(tslMock).getLogicFlavour();
@@ -163,8 +164,6 @@ public class ExceutorFactoryImplTest {
final ExecutorFactoryImpl factory = new ExecutorFactoryImpl();
- Mockito.doReturn(true).when(stateMock).checkSetTaskSelectionLogic();
-
assertThatThrownBy(() -> factory.getTaskExecutor(null, taskMock, internalContextMock))
.hasMessage("Executor plugin class not defined for \"Dummy\" executor of type "
+ "\"org.onap.policy.apex.core.engine.executor.TaskExecutor\"");
diff --git a/examples/examples-aadm/pom.xml b/examples/examples-aadm/pom.xml
index 1911f229f..37986764c 100644
--- a/examples/examples-aadm/pom.xml
+++ b/examples/examples-aadm/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-aadm</artifactId>
diff --git a/examples/examples-acm/pom.xml b/examples/examples-acm/pom.xml
index 00f674dbe..35680ea16 100644
--- a/examples/examples-acm/pom.xml
+++ b/examples/examples-acm/pom.xml
@@ -19,97 +19,102 @@
============LICENSE_END=========================================================
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.policy.apex-pdp.examples</groupId>
- <artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
- <artifactId>examples-acm</artifactId>
- <name>examples-acm</name>
- <description>Specific code for the APEX acm Example</description>
- <properties>
- <policymodel.name>APEXacElementPolicy</policymodel.name>
- <toscapolicy.name>APEXacElementToscaPolicy</toscapolicy.name>
- <!-- Update the required node type value for generating a node template -->
- <nodeType.name>org.onap.nodetypes.policy.MetadataSet</nodeType.name>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.auth</groupId>
- <artifactId>cli-editor</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.services</groupId>
- <artifactId>services-engine</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
- <artifactId>plugins-context-schema-json</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
- <artifactId>plugins-executor-javascript</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
- <artifactId>plugins-event-carrier-restclient</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
- <artifactId>events</artifactId>
- <version>${version.policy.models}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.common</groupId>
- <artifactId>policy-endpoints</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Xss1m</argLine>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <!-- Generate the APEX ToscaPolicy JSON file-->
- <execution>
- <id>generate-tosca-policy</id>
- <phase>compile</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
- <classpathScope>compile</classpathScope>
- <arguments>
- <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
- <argument>--output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.json</argument>
- <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
- <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/apexACM/ApexConfig.json</argument>
- <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.policy.apex-pdp.examples</groupId>
+ <artifactId>examples</artifactId>
+ <version>3.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>examples-acm</artifactId>
+ <name>examples-acm</name>
+ <description>Specific code for the APEX acm Example</description>
+ <properties>
+ <policymodel.name>APEXacElementPolicy</policymodel.name>
+ <toscapolicy.name>APEXacElementToscaPolicy</toscapolicy.name>
+ <!-- Update the required node type value for generating a node template -->
+ <nodeType.name>org.onap.nodetypes.policy.MetadataSet</nodeType.name>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.auth</groupId>
+ <artifactId>cli-editor</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.services</groupId>
+ <artifactId>services-engine</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
+ <artifactId>plugins-context-schema-json</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
+ <artifactId>plugins-executor-javascript</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
+ <artifactId>plugins-event-carrier-restclient</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+ <artifactId>events</artifactId>
+ <version>${version.policy.models}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>policy-endpoints</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Xss1m</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <!-- Generate the APEX ToscaPolicy JSON file-->
+ <execution>
+ <id>generate-tosca-policy</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
+ <classpathScope>compile</classpathScope>
+ <arguments>
+ <argument>
+ --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
+ </argument>
+ <argument>
+ --output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.json
+ </argument>
+ <argument>
+ --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
+ </argument>
+ <argument>
+ --apex-config-file=${project.basedir}/src/main/resources/examples/config/apexACM/ApexConfig.json
+ </argument>
+ <argument>
+ --tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json
+ </argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/examples/examples-acm/src/main/java/org/onap/policy/apex/examples/acm/AcmTestRestDmaapEndpoint.java b/examples/examples-acm/src/main/java/org/onap/policy/apex/examples/acm/AcmTestRestDmaapEndpoint.java
index a3af9406c..8aed72080 100644
--- a/examples/examples-acm/src/main/java/org/onap/policy/apex/examples/acm/AcmTestRestDmaapEndpoint.java
+++ b/examples/examples-acm/src/main/java/org/onap/policy/apex/examples/acm/AcmTestRestDmaapEndpoint.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2022 Nordix Foundation.
+ * Copyright (C) 2022-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,14 +20,14 @@
package org.onap.policy.apex.examples.acm;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Response;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Response;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
diff --git a/examples/examples-acm/src/test/java/org/onap/policy/apex/examples/acm/TestApexAcmExample.java b/examples/examples-acm/src/test/java/org/onap/policy/apex/examples/acm/TestApexAcmExample.java
index 5b8cbdfe7..9df25e678 100644
--- a/examples/examples-acm/src/test/java/org/onap/policy/apex/examples/acm/TestApexAcmExample.java
+++ b/examples/examples-acm/src/test/java/org/onap/policy/apex/examples/acm/TestApexAcmExample.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2022 Nordix Foundation.
+ * Copyright (C) 2022-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@ package org.onap.policy.apex.examples.acm;
import static org.awaitility.Awaitility.await;
+import jakarta.ws.rs.client.ClientBuilder;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.ClientBuilder;
import org.junit.Test;
import org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain;
import org.onap.policy.apex.service.engine.main.ApexMain;
diff --git a/examples/examples-adaptive/pom.xml b/examples/examples-adaptive/pom.xml
index 244d717f4..d22110a66 100644
--- a/examples/examples-adaptive/pom.xml
+++ b/examples/examples-adaptive/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-adaptive</artifactId>
diff --git a/examples/examples-decisionmaker/pom.xml b/examples/examples-decisionmaker/pom.xml
index d9818b31c..7392a9279 100644
--- a/examples/examples-decisionmaker/pom.xml
+++ b/examples/examples-decisionmaker/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-decisionmaker</artifactId>
diff --git a/examples/examples-grpc/pom.xml b/examples/examples-grpc/pom.xml
index 06a91bc67..9a0858c87 100644
--- a/examples/examples-grpc/pom.xml
+++ b/examples/examples-grpc/pom.xml
@@ -21,151 +21,174 @@
============LICENSE_END=========================================================
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.policy.apex-pdp.examples</groupId>
- <artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
- <artifactId>examples-grpc</artifactId>
- <name>examples-grpc</name>
- <description>Specific code for the APEX gRPC Example</description>
- <properties>
- <policymodel.name>APEXgRPCPolicy</policymodel.name>
- <toscapolicy.name>APEXgRPCToscaPolicy</toscapolicy.name>
- <!-- Update the required node type value for generating a node template -->
- <nodeType.name>org.onap.nodetypes.policy.MetadataSet</nodeType.name>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.auth</groupId>
- <artifactId>cli-editor</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.services</groupId>
- <artifactId>services-engine</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
- <artifactId>plugins-context-schema-avro</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
- <artifactId>plugins-context-schema-json</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
- <artifactId>plugins-executor-javascript</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
- <artifactId>plugins-event-carrier-grpc</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
- <artifactId>plugins-event-carrier-restclient</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
- <artifactId>events</artifactId>
- <version>${version.policy.models}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.models.policy-models-interactions</groupId>
- <artifactId>simulators</artifactId>
- <version>${version.policy.models}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.policy.common</groupId>
- <artifactId>policy-endpoints</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Xss1m</argLine>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <!-- Generate the APEX Policy JSON from the APEX CLI command -->
- <execution>
- <id>generate-policy</id>
- <phase>compile</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
- <classpathScope>compile</classpathScope>
- <arguments>
- <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
- <argument>--output-model-file=${project.build.directory}/classes/${policymodel.name}.json</argument>
- <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
- <argument>--working-dir=${project.basedir}</argument>
- </arguments>
- </configuration>
- </execution>
- <!-- Generate the APEX ToscaPolicy JSON file-->
- <execution>
- <id>generate-tosca-policy</id>
- <phase>compile</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
- <classpathScope>compile</classpathScope>
- <arguments>
- <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
- <argument>--output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.json</argument>
- <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
- <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json</argument>
- <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
- </arguments>
- </configuration>
- </execution>
- <!-- Generate Tosca policy with metadataSet reference and a node template json file with policy model -->
- <execution>
- <id>generate-tosca-policy-metadataSet</id>
- <phase>compile</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
- <classpathScope>compile</classpathScope>
- <arguments>
- <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
- <argument>--output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.metadataSet.json</argument>
- <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
- <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json</argument>
- <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
- <argument>--node-type=${nodeType.name}</argument>
- <argument>--output-node-template-file=${project.build.directory}/classes/${toscapolicy.name}.nodeTemplate.json</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.policy.apex-pdp.examples</groupId>
+ <artifactId>examples</artifactId>
+ <version>3.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>examples-grpc</artifactId>
+ <name>examples-grpc</name>
+ <description>Specific code for the APEX gRPC Example</description>
+ <properties>
+ <policymodel.name>APEXgRPCPolicy</policymodel.name>
+ <toscapolicy.name>APEXgRPCToscaPolicy</toscapolicy.name>
+ <!-- Update the required node type value for generating a node template -->
+ <nodeType.name>org.onap.nodetypes.policy.MetadataSet</nodeType.name>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.auth</groupId>
+ <artifactId>cli-editor</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.services</groupId>
+ <artifactId>services-engine</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
+ <artifactId>plugins-context-schema-avro</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
+ <artifactId>plugins-context-schema-json</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
+ <artifactId>plugins-executor-javascript</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
+ <artifactId>plugins-event-carrier-grpc</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
+ <artifactId>plugins-event-carrier-restclient</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+ <artifactId>events</artifactId>
+ <version>${version.policy.models}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+ <artifactId>simulators</artifactId>
+ <version>${version.policy.models}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>policy-endpoints</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Xss1m</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <!-- Generate the APEX Policy JSON from the APEX CLI command -->
+ <execution>
+ <id>generate-policy</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
+ <classpathScope>compile</classpathScope>
+ <arguments>
+ <argument>
+ --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
+ </argument>
+ <argument>
+ --output-model-file=${project.build.directory}/classes/${policymodel.name}.json
+ </argument>
+ <argument>
+ --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
+ </argument>
+ <argument>--working-dir=${project.basedir}</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <!-- Generate the APEX ToscaPolicy JSON file-->
+ <execution>
+ <id>generate-tosca-policy</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
+ <classpathScope>compile</classpathScope>
+ <arguments>
+ <argument>
+ --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
+ </argument>
+ <argument>
+ --output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.json
+ </argument>
+ <argument>
+ --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
+ </argument>
+ <argument>
+ --apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json
+ </argument>
+ <argument>
+ --tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json
+ </argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <!-- Generate Tosca policy with metadataSet reference and a node template json file with policy model -->
+ <execution>
+ <id>generate-tosca-policy-metadataSet</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
+ <classpathScope>compile</classpathScope>
+ <arguments>
+ <argument>
+ --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
+ </argument>
+ <argument>
+ --output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.metadataSet.json
+ </argument>
+ <argument>
+ --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
+ </argument>
+ <argument>
+ --apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json
+ </argument>
+ <argument>
+ --tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json
+ </argument>
+ <argument>--node-type=${nodeType.name}</argument>
+ <argument>
+ --output-node-template-file=${project.build.directory}/classes/${toscapolicy.name}.nodeTemplate.json
+ </argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/GrpcTestRestSimEndpoint.java b/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/GrpcTestRestSimEndpoint.java
index 17b99c986..3d46e6a80 100644
--- a/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/GrpcTestRestSimEndpoint.java
+++ b/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/GrpcTestRestSimEndpoint.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,14 +20,14 @@
package org.onap.policy.apex.examples.grpc;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Response;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
diff --git a/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/TestApexGrpcExample.java b/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/TestApexGrpcExample.java
index f5a51a7fe..d3c0c87b3 100644
--- a/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/TestApexGrpcExample.java
+++ b/examples/examples-grpc/src/test/java/org/onap/policy/apex/examples/grpc/TestApexGrpcExample.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020-2023 Nordix Foundation.
* Modifications Copyright (C) 2020-2022 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,12 +24,12 @@ package org.onap.policy.apex.examples.grpc;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Response;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.core.Response;
import org.junit.Test;
import org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain;
import org.onap.policy.apex.service.engine.main.ApexMain;
diff --git a/examples/examples-myfirstpolicy/pom.xml b/examples/examples-myfirstpolicy/pom.xml
index dd7443500..b1cfe9ec6 100644
--- a/examples/examples-myfirstpolicy/pom.xml
+++ b/examples/examples-myfirstpolicy/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-myfirstpolicy</artifactId>
diff --git a/examples/examples-onap-bbs/pom.xml b/examples/examples-onap-bbs/pom.xml
index 058833c02..e0ebfe430 100644
--- a/examples/examples-onap-bbs/pom.xml
+++ b/examples/examples-onap-bbs/pom.xml
@@ -2,7 +2,7 @@
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
Copyright (C) 2019 Huawei.
- Modifications Copyright (C) 2019 Nordix Foundation.
+ Modifications Copyright (C) 2019, 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,12 +20,12 @@
============LICENSE_END=========================================================
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-onap-bbs</artifactId>
@@ -84,11 +84,6 @@
<artifactId>events</artifactId>
<version>${version.policy.models}</version>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
@@ -108,9 +103,15 @@
<mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
<classpathScope>compile</classpathScope>
<arguments>
- <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
- <argument>--output-model-file=${project.build.directory}/classes/${policymodel.name}.json</argument>
- <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
+ <argument>
+ --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
+ </argument>
+ <argument>
+ --output-model-file=${project.build.directory}/classes/${policymodel.name}.json
+ </argument>
+ <argument>
+ --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
+ </argument>
<argument>--working-dir=${project.basedir}</argument>
</arguments>
</configuration>
diff --git a/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java b/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java
index 5fb74a307..1f52e1115 100644
--- a/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java
+++ b/examples/examples-onap-bbs/src/test/java/org/onap/policy/apex/examples/bbs/WebClientTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 huawei. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
+// TODO javax libraries used here too. Ok, to keep? Liam's review ignored these.
public class WebClientTest {
HttpsURLConnection mockedHttpsUrlConnection;
diff --git a/examples/examples-onap-vcpe/pom.xml b/examples/examples-onap-vcpe/pom.xml
index a2633cb41..8b660c0a3 100644
--- a/examples/examples-onap-vcpe/pom.xml
+++ b/examples/examples-onap-vcpe/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-onap-vcpe</artifactId>
diff --git a/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/OnapVCpeSimEndpoint.java b/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/OnapVCpeSimEndpoint.java
index a6c85fb0e..3e7962823 100644
--- a/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/OnapVCpeSimEndpoint.java
+++ b/examples/examples-onap-vcpe/src/test/java/org/onap/policy/apex/domains/onap/vcpe/OnapVCpeSimEndpoint.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020,2022 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020,2022-2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,6 +29,12 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.time.Instant;
import java.util.Map;
@@ -37,12 +43,6 @@ import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Response;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
import org.onap.policy.common.gson.InstantAsMillisTypeAdapter;
import org.onap.policy.common.utils.resources.TextFileUtils;
diff --git a/examples/examples-periodic/pom.xml b/examples/examples-periodic/pom.xml
index 2103cf797..6b11e78ac 100644
--- a/examples/examples-periodic/pom.xml
+++ b/examples/examples-periodic/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-periodic</artifactId>
diff --git a/examples/examples-servlet/pom.xml b/examples/examples-servlet/pom.xml
index 37377da7b..be92f6eb1 100644
--- a/examples/examples-servlet/pom.xml
+++ b/examples/examples-servlet/pom.xml
@@ -1,7 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
- Modifications Copyright (C) 2019 Nordix Foundation.
+ Modifications Copyright (C) 2019, 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
<artifactId>examples</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>examples-servlet</artifactId>
@@ -33,8 +33,8 @@
<dependencies>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.services</groupId>
diff --git a/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java b/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java
index c1b7fbc11..70aaeb647 100644
--- a/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java
+++ b/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,11 +22,11 @@
package org.onap.policy.apex.examples.servlet;
+import jakarta.servlet.ServletContextEvent;
+import jakarta.servlet.ServletContextListener;
+import jakarta.servlet.annotation.WebListener;
import java.util.ArrayList;
import java.util.List;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.servlet.annotation.WebListener;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
import org.onap.policy.apex.service.engine.main.ApexMain;
diff --git a/examples/pom.xml b/examples/pom.xml
index 51d703a6f..b75de75ea 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.examples</groupId>
diff --git a/model/pom.xml b/model/pom.xml
index 66cbbb2e5..893f1a9d3 100644
--- a/model/pom.xml
+++ b/model/pom.xml
@@ -1,6 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
+ Modifications Copyright (C) 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,19 +18,22 @@
SPDX-License-Identifier: Apache-2.0
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.model</groupId>
<artifactId>model</artifactId>
<name>${project.artifactId}</name>
- <description>The model for Apex, it comtains definitions of all Apex concepts and also has handling for Apex models.</description>
+ <description>The model for Apex, it comtains definitions of all Apex concepts and also has handling for Apex
+ models.
+ </description>
<dependencies>
<dependency>
@@ -49,22 +53,16 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
- <version>4.8-1</version>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
+ <version>${version.antlr-runtime}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java b/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java
index 1152771ea..ae14702ef 100644
--- a/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java
+++ b/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020,2022 Nordix Foundation
+ * Modifications Copyright (C) 2020,2022-2023 Nordix Foundation
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,7 +36,7 @@ import java.io.FileReader;
import java.io.IOException;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
diff --git a/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java b/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java
index 063855976..3d59652b7 100644
--- a/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java
+++ b/model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020,2022 Nordix Foundation
+ * Modifications Copyright (C) 2020,2022-2023 Nordix Foundation
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,12 +28,12 @@ import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-@RunWith(MockitoJUnitRunner.class)
+@ExtendWith(MockitoExtension.class)
public class ApexModelWriterTest {
@Test
public void testModelWriter() throws IOException, ApexException {
diff --git a/packages/apex-pdp-docker/pom.xml b/packages/apex-pdp-docker/pom.xml
index 1cdf3bf93..6ea65c86c 100644
--- a/packages/apex-pdp-docker/pom.xml
+++ b/packages/apex-pdp-docker/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.packages</groupId>
<artifactId>apex-packages</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>apex-pdp-docker</artifactId>
diff --git a/packages/apex-pdp-docker/src/main/docker/Dockerfile b/packages/apex-pdp-docker/src/main/docker/Dockerfile
index c15938b38..e66f8909f 100644
--- a/packages/apex-pdp-docker/src/main/docker/Dockerfile
+++ b/packages/apex-pdp-docker/src/main/docker/Dockerfile
@@ -25,7 +25,7 @@ RUN mkdir /packages /extracted
COPY /maven/apex-pdp-package-full.tar.gz /packages/
RUN tar xvzf /packages/apex-pdp-package-full.tar.gz --directory /extracted/
-FROM onap/policy-jdk-alpine:3.0.0-SNAPSHOT
+FROM onap/policy-jdk-alpine:3.0.1-SNAPSHOT
LABEL maintainer="Policy Team"
LABEL org.opencontainers.image.title="Policy APEX PDP"
diff --git a/packages/apex-pdp-package-full/pom.xml b/packages/apex-pdp-package-full/pom.xml
index df5db184d..7db8f61a5 100644
--- a/packages/apex-pdp-package-full/pom.xml
+++ b/packages/apex-pdp-package-full/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.packages</groupId>
<artifactId>apex-packages</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>apex-pdp-package-full</artifactId>
diff --git a/packages/pom.xml b/packages/pom.xml
index 37841e2c3..5bd271aa0 100644
--- a/packages/pom.xml
+++ b/packages/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.packages</groupId>
diff --git a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/pom.xml b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/pom.xml
index 19a2ae8ee..4dc61f3d1 100644
--- a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/pom.xml
+++ b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution</groupId>
<artifactId>plugins-context-distribution</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-context-distribution-hazelcast</artifactId>
diff --git a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/pom.xml b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/pom.xml
index 2b77790cd..7551c4adb 100644
--- a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/pom.xml
+++ b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-infinispan/pom.xml
@@ -1,6 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
+ Modifications Copyright (C) 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -23,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution</groupId>
<artifactId>plugins-context-distribution</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-context-distribution-infinispan</artifactId>
@@ -34,7 +35,7 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
- <version>11.0.0.Final</version>
+ <version>${version.infinispan}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.slf4j</groupId>
diff --git a/plugins/plugins-context/plugins-context-distribution/pom.xml b/plugins/plugins-context/plugins-context-distribution/pom.xml
index 7de898ed3..550ffca47 100644
--- a/plugins/plugins-context/plugins-context-distribution/pom.xml
+++ b/plugins/plugins-context/plugins-context-distribution/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context</groupId>
<artifactId>plugins-context</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution</groupId>
diff --git a/plugins/plugins-context/plugins-context-locking/plugins-context-locking-curator/pom.xml b/plugins/plugins-context/plugins-context-locking/plugins-context-locking-curator/pom.xml
index 0e4f18365..0f8f91af6 100644
--- a/plugins/plugins-context/plugins-context-locking/plugins-context-locking-curator/pom.xml
+++ b/plugins/plugins-context/plugins-context-locking/plugins-context-locking-curator/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-locking</groupId>
<artifactId>plugins-context-locking</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-context-locking-curator</artifactId>
diff --git a/plugins/plugins-context/plugins-context-locking/plugins-context-locking-hazelcast/pom.xml b/plugins/plugins-context/plugins-context-locking/plugins-context-locking-hazelcast/pom.xml
index 15aa6375d..9f2d83ec8 100644
--- a/plugins/plugins-context/plugins-context-locking/plugins-context-locking-hazelcast/pom.xml
+++ b/plugins/plugins-context/plugins-context-locking/plugins-context-locking-hazelcast/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-locking</groupId>
<artifactId>plugins-context-locking</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-context-locking-hazelcast</artifactId>
diff --git a/plugins/plugins-context/plugins-context-locking/pom.xml b/plugins/plugins-context/plugins-context-locking/pom.xml
index 65bc4d62e..0c720c4ac 100644
--- a/plugins/plugins-context/plugins-context-locking/pom.xml
+++ b/plugins/plugins-context/plugins-context-locking/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context</groupId>
<artifactId>plugins-context</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-locking</groupId>
diff --git a/plugins/plugins-context/plugins-context-persistence/pom.xml b/plugins/plugins-context/plugins-context-persistence/pom.xml
index 084d1f6a4..ddfe7464e 100644
--- a/plugins/plugins-context/plugins-context-persistence/pom.xml
+++ b/plugins/plugins-context/plugins-context-persistence/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context</groupId>
<artifactId>plugins-context</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-persistence</groupId>
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/pom.xml b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/pom.xml
index f4eefd7c1..6cb4c49bb 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/pom.xml
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
<artifactId>plugins-context-schema</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-context-schema-avro</artifactId>
diff --git a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-json/pom.xml b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-json/pom.xml
index e576c27f2..7891fc51c 100644
--- a/plugins/plugins-context/plugins-context-schema/plugins-context-schema-json/pom.xml
+++ b/plugins/plugins-context/plugins-context-schema/plugins-context-schema-json/pom.xml
@@ -1,6 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2022 Bell Canada. All rights reserved.
+ Modifications Copyright (C) 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,12 +18,13 @@
SPDX-License-Identifier: Apache-2.0
============LICENSE_END=========================================================
-->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
<artifactId>plugins-context-schema</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-context-schema-json</artifactId>
@@ -34,10 +36,5 @@
<groupId>com.worldturner.medeia</groupId>
<artifactId>medeia-validator-gson</artifactId>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/plugins/plugins-context/plugins-context-schema/pom.xml b/plugins/plugins-context/plugins-context-schema/pom.xml
index 36b364d7e..4d25b0b5a 100644
--- a/plugins/plugins-context/plugins-context-schema/pom.xml
+++ b/plugins/plugins-context/plugins-context-schema/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context</groupId>
<artifactId>plugins-context</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
diff --git a/plugins/plugins-context/pom.xml b/plugins/plugins-context/pom.xml
index 6cccf54aa..a60774296 100644
--- a/plugins/plugins-context/pom.xml
+++ b/plugins/plugins-context/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins</groupId>
<artifactId>plugins</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context</groupId>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/pom.xml
index c52cd38ab..9a55b78c1 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/pom.xml
@@ -20,19 +20,19 @@
============LICENSE_END=========================================================
-->
<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
- <artifactId>plugins-event-carrier</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
+ <artifactId>plugins-event-carrier</artifactId>
+ <version>3.0.1-SNAPSHOT</version>
+ </parent>
- <artifactId>plugins-event-carrier-grpc</artifactId>
- <name>${project.artifactId}</name>
- <description>[${project.parent.artifactId}] Plugin for handling GRPC requests and responses</description>
+ <artifactId>plugins-event-carrier-grpc</artifactId>
+ <name>${project.artifactId}</name>
+ <description>[${project.parent.artifactId}] Plugin for handling GRPC requests and responses</description>
<dependencies>
<dependency>
<groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
@@ -44,15 +44,5 @@
<artifactId>actor.cds</artifactId>
<version>${version.policy.models}</version>
</dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml
index dd7aa2508..c69d0d0ae 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml
@@ -24,32 +24,17 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
<artifactId>plugins-event-carrier</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-event-carrier-jms</artifactId>
<name>${project.artifactId}</name>
<description>[${project.parent.artifactId}] Plugin for handling events being transported over JMS</description>
-
<dependencies>
<dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-jms-client</artifactId>
- <version>${version.artemis-jms-client}</version>
- <exclusions>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
+ <groupId>jakarta.jms</groupId>
+ <artifactId>jakarta.jms-api</artifactId>
+ <version>${version.jms}</version>
</dependency>
</dependencies>
</project>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java
index 2bca82eb6..3263581c1 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,13 +22,13 @@
package org.onap.policy.apex.plugins.event.carrier.jms;
+import jakarta.jms.Connection;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.Message;
+import jakarta.jms.MessageListener;
+import jakarta.jms.Session;
+import jakarta.jms.Topic;
import java.util.Properties;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Session;
-import javax.jms.Topic;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
index 21309396a..39344bb65 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,16 +22,16 @@
package org.onap.policy.apex.plugins.event.carrier.jms;
+import jakarta.jms.Connection;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.Message;
+import jakarta.jms.MessageProducer;
+import jakarta.jms.Session;
+import jakarta.jms.Topic;
import java.io.Serializable;
import java.util.EnumMap;
import java.util.Map;
import java.util.Properties;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import lombok.Getter;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java
index e3ead320f..ab1155641 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumerTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,12 +26,12 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+import jakarta.jms.Connection;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.JMSException;
+import jakarta.jms.Message;
+import jakarta.jms.Topic;
import java.util.Properties;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Topic;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.junit.Before;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java
index 2f781689f..ffc5c5b1e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducerTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,18 +28,18 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
+import jakarta.jms.Connection;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.JMSException;
+import jakarta.jms.Message;
+import jakarta.jms.MessageProducer;
+import jakarta.jms.ObjectMessage;
+import jakarta.jms.Session;
+import jakarta.jms.TextMessage;
+import jakarta.jms.Topic;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.Random;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.apache.commons.lang3.RandomStringUtils;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml
index 287c2561b..0171ccadc 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
<artifactId>plugins-event-carrier</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-event-carrier-kafka</artifactId>
@@ -35,7 +35,6 @@
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml
index 17bc02700..9bb4de108 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml
@@ -21,19 +21,21 @@
============LICENSE_END=========================================================
-->
<project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
<artifactId>plugins-event-carrier</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-event-carrier-restclient</artifactId>
<name>${project.artifactId}</name>
- <description>[${project.parent.artifactId}] Plugin for handling events being transported over REST where Apex acts as a REST client</description>
+ <description>[${project.parent.artifactId}] Plugin for handling events being transported over REST where Apex acts
+ as a REST client
+ </description>
<dependencies>
<dependency>
@@ -41,26 +43,11 @@
<artifactId>policy-endpoints</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.policy.apex-pdp.services</groupId>
- <artifactId>services-engine</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
<artifactId>plugins-executor-javascript</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java
index 899d4de11..790f97bc9 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -23,10 +23,10 @@
package org.onap.policy.apex.plugins.event.carrier.restclient;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
import java.util.Properties;
import java.util.regex.Pattern;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
import lombok.AccessLevel;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducer.java
index 2b2821bfa..177dfdfb5 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -23,14 +23,14 @@
package org.onap.policy.apex.plugins.event.carrier.restclient;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.Response;
import java.util.Optional;
import java.util.Properties;
import java.util.Set;
import java.util.regex.Pattern;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.Response;
import lombok.AccessLevel;
import lombok.Setter;
import org.onap.policy.apex.service.engine.event.ApexEventException;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java
index 545499b40..61155c8cf 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,13 +28,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.Invocation.Builder;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.Response;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.Invocation.Builder;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Response;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
index 57f0c4342..cc5ebbb9f 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,11 +26,11 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.Invocation.Builder;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.Response;
import java.util.Properties;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.Invocation.Builder;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Response;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
index 9858984f9..17cd88f48 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
@@ -20,14 +20,14 @@
============LICENSE_END=========================================================
-->
<project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
<artifactId>plugins-event-carrier</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-event-carrier-restrequestor</artifactId>
@@ -40,25 +40,10 @@
<artifactId>policy-endpoints</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.policy.apex-pdp.services</groupId>
- <artifactId>services-engine</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
<artifactId>plugins-executor-javascript</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumer.java
index 952ebd793..bcf76aa51 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -23,6 +23,11 @@
package org.onap.policy.apex.plugins.event.carrier.restrequestor;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.client.Invocation.Builder;
+import jakarta.ws.rs.core.Response;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
@@ -36,11 +41,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.Invocation.Builder;
-import javax.ws.rs.core.Response;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java
index a7795a1b1..842999fcd 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorTest.java
@@ -27,14 +27,14 @@ import static org.awaitility.Awaitility.await;
import static org.junit.Assert.assertEquals;
import com.google.gson.Gson;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Response;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Map;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.core.Response;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java
index 574b3b1dd..23aba09a4 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/SupportRestRequestorEndpoint.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,13 +25,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.google.gson.Gson;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Response;
import java.util.Map;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
/**
* The Class TestRestRequestorEndpoint.
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml
index d8e537b80..0da406f23 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml
@@ -1,7 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
- Modifications Copyright (C) 2019 Nordix Foundation.
+ Modifications Copyright (C) 2019, 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
<artifactId>plugins-event-carrier</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-event-carrier-restserver</artifactId>
@@ -32,13 +32,9 @@
<dependencies>
<dependency>
- <groupId>org.onap.policy.apex-pdp.services</groupId>
- <artifactId>services-engine</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
+ <version>${version.jersey}</version>
</dependency>
<dependency>
<groupId>org.onap.policy.common</groupId>
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilter.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilter.java
index b8f6a0f9e..ee93f5c38 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilter.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilter.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,11 +21,11 @@
package org.onap.policy.apex.plugins.event.carrier.restserver;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
+import jakarta.ws.rs.ext.Provider;
import java.io.IOException;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
-import javax.ws.rs.ext.Provider;
/**
* This class implements ContainerResponseFilter which intercepts every request/response coming to REST server and adds
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java
index 8ed2504d9..fdad6621f 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java
@@ -22,9 +22,9 @@
package org.onap.policy.apex.plugins.event.carrier.restserver;
+import jakarta.ws.rs.core.Response;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicLong;
-import javax.ws.rs.core.Response;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerEndpoint.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerEndpoint.java
index c4354918f..703ceca6e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerEndpoint.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerEndpoint.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,28 +21,18 @@
package org.onap.policy.apex.plugins.event.carrier.restserver;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import io.swagger.annotations.Authorization;
-import io.swagger.annotations.BasicAuthDefinition;
-import io.swagger.annotations.Info;
-import io.swagger.annotations.SecurityDefinition;
-import io.swagger.annotations.SwaggerDefinition;
-import io.swagger.annotations.Tag;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
import java.net.HttpURLConnection;
import java.util.LinkedHashMap;
import java.util.Map;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -53,20 +43,10 @@ import org.slf4j.LoggerFactory;
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
@Path("/apex/{eventInput}")
-@Api(value = "APEX REST SERVER API")
@Produces(
{ MediaType.APPLICATION_JSON })
@Consumes(
{ MediaType.APPLICATION_JSON })
-@SwaggerDefinition(
- info = @Info(description =
- "APEX RestServer that handles REST requests and responses to and from Apex.", version = "v1.0",
- title = "APEX RESTSERVER"),
- consumes = {MediaType.APPLICATION_JSON},
- produces = {MediaType.APPLICATION_JSON},
- schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
- tags = {@Tag(name = "APEX RESTSERVER", description = "APEX RESTSERVER")},
- securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")}))
public class RestServerEndpoint {
// Get a reference to the logger
private static final Logger LOGGER = LoggerFactory.getLogger(RestServerEndpoint.class);
@@ -112,14 +92,6 @@ public class RestServerEndpoint {
*/
@Path("/Status")
@GET
- @ApiOperation(
- value = "Get Statistics",
- notes = "Get statistics on apex REST event handlin",
- authorizations = @Authorization(value = AUTHORIZATION_TYPE))
- @ApiResponses(
- value = {@ApiResponse(code = AUTHENTICATION_ERROR_CODE, message = AUTHENTICATION_ERROR_MESSAGE),
- @ApiResponse(code = AUTHORIZATION_ERROR_CODE, message = AUTHORIZATION_ERROR_MESSAGE),
- @ApiResponse(code = SERVER_ERROR_CODE, message = SERVER_ERROR_MESSAGE)})
public Response serviceGetStats() {
incrementGetMessages();
return Response.status(Response.Status.OK.getStatusCode())
@@ -137,14 +109,6 @@ public class RestServerEndpoint {
*/
@Path("/EventIn")
@POST
- @ApiOperation(
- value = "Post Event",
- notes = "Service post request, an incoming event over REST to Apex",
- authorizations = @Authorization(value = AUTHORIZATION_TYPE))
- @ApiResponses(
- value = {@ApiResponse(code = AUTHENTICATION_ERROR_CODE, message = AUTHENTICATION_ERROR_MESSAGE),
- @ApiResponse(code = AUTHORIZATION_ERROR_CODE, message = AUTHORIZATION_ERROR_MESSAGE),
- @ApiResponse(code = SERVER_ERROR_CODE, message = SERVER_ERROR_MESSAGE)})
public Response servicePostRequest(final String jsonString) {
incrementPostEventMessages();
@@ -165,14 +129,6 @@ public class RestServerEndpoint {
*/
@Path("/EventIn")
@PUT
- @ApiOperation(
- value = "Put Event",
- notes = "Service put request, an incoming event over REST to Apex",
- authorizations = @Authorization(value = AUTHORIZATION_TYPE))
- @ApiResponses(
- value = {@ApiResponse(code = AUTHENTICATION_ERROR_CODE, message = AUTHENTICATION_ERROR_MESSAGE),
- @ApiResponse(code = AUTHORIZATION_ERROR_CODE, message = AUTHORIZATION_ERROR_MESSAGE),
- @ApiResponse(code = SERVER_ERROR_CODE, message = SERVER_ERROR_MESSAGE)})
public Response servicePutRequest(final String jsonString) {
incrementPutEventMessages();
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilterTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilterTest.java
index 08803db41..1ec0d52bb 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilterTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/AccessControlFilterTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,11 +23,11 @@ package org.onap.policy.apex.plugins.event.carrier.restserver;
import static org.junit.Assert.assertEquals;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.core.MultivaluedHashMap;
+import jakarta.ws.rs.core.MultivaluedMap;
import java.io.IOException;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.core.MultivaluedHashMap;
-import javax.ws.rs.core.MultivaluedMap;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Before;
import org.junit.Test;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java
index 9fc5b502d..5f7cb257b 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/test/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumerTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Samsung. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,9 +27,9 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.lang.reflect.Field;
-import javax.ws.rs.core.Response;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/plugins/plugins-event/plugins-event-carrier/pom.xml b/plugins/plugins-event/plugins-event-carrier/pom.xml
index 9d30979b2..97b669e1c 100644
--- a/plugins/plugins-event/plugins-event-carrier/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event</groupId>
<artifactId>plugins-event</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml
index a035e7867..c9d783e20 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml
@@ -32,7 +32,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-protocol</groupId>
<artifactId>plugins-event-protocol</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-event-protocol-jms</artifactId>
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/test/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverterTest.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/test/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverterTest.java
index 70c17c34e..701326f71 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/test/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverterTest.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/test/org/onap/policy/apex/plugins/event/protocol/jms/Apex2JmsObjectEventConverterTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,12 +26,11 @@ import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-
+import jakarta.jms.JMSException;
+import jakarta.jms.ObjectMessage;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.List;
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
import org.apache.activemq.command.ActiveMQObjectMessage;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.After;
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml
index 8b8ebe3e8..860972a15 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-protocol</groupId>
<artifactId>plugins-event-protocol</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-event-protocol-yaml</artifactId>
diff --git a/plugins/plugins-event/plugins-event-protocol/pom.xml b/plugins/plugins-event/plugins-event-protocol/pom.xml
index 4c55ff5d6..5f8b2034d 100644
--- a/plugins/plugins-event/plugins-event-protocol/pom.xml
+++ b/plugins/plugins-event/plugins-event-protocol/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event</groupId>
<artifactId>plugins-event</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-protocol</groupId>
diff --git a/plugins/plugins-event/pom.xml b/plugins/plugins-event/pom.xml
index a255d8f94..08d5c51c6 100644
--- a/plugins/plugins-event/pom.xml
+++ b/plugins/plugins-event/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins</groupId>
<artifactId>plugins</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-event</groupId>
@@ -33,19 +33,6 @@
<name>${project.artifactId}</name>
<description>Plugins for 3pps that carry events and protocol formats of events</description>
- <dependencies>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.services</groupId>
- <artifactId>services-engine</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<modules>
<module>plugins-event-carrier</module>
<module>plugins-event-protocol</module>
diff --git a/plugins/plugins-executor/plugins-executor-java/pom.xml b/plugins/plugins-executor/plugins-executor-java/pom.xml
index e602090ed..f7e893e85 100644
--- a/plugins/plugins-executor/plugins-executor-java/pom.xml
+++ b/plugins/plugins-executor/plugins-executor-java/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
<artifactId>plugins-executor</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-executor-java</artifactId>
diff --git a/plugins/plugins-executor/plugins-executor-javascript/pom.xml b/plugins/plugins-executor/plugins-executor-javascript/pom.xml
index 883851e18..26128d512 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/pom.xml
+++ b/plugins/plugins-executor/plugins-executor-javascript/pom.xml
@@ -19,14 +19,14 @@
============LICENSE_END=========================================================
-->
<project
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
<artifactId>plugins-executor</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-executor-javascript</artifactId>
@@ -38,11 +38,6 @@
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>${version.rhino}</version>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.services</groupId>
@@ -50,10 +45,5 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/plugins/plugins-executor/plugins-executor-jruby/pom.xml b/plugins/plugins-executor/plugins-executor-jruby/pom.xml
index da2962dbf..321e49ccc 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/pom.xml
+++ b/plugins/plugins-executor/plugins-executor-jruby/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
<artifactId>plugins-executor</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-executor-jruby</artifactId>
diff --git a/plugins/plugins-executor/plugins-executor-mvel/pom.xml b/plugins/plugins-executor/plugins-executor-mvel/pom.xml
index aed859909..410895158 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/pom.xml
+++ b/plugins/plugins-executor/plugins-executor-mvel/pom.xml
@@ -1,6 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
+ Modifications Copyright (C) 2021-2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -22,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
<artifactId>plugins-executor</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>plugins-executor-mvel</artifactId>
@@ -33,7 +34,7 @@
<dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
- <version>2.4.8.Final</version>
+ <version>2.5.0.Final</version>
</dependency>
</dependencies>
</project> \ No newline at end of file
diff --git a/plugins/plugins-executor/pom.xml b/plugins/plugins-executor/pom.xml
index d4d0b892c..c7942e542 100644
--- a/plugins/plugins-executor/pom.xml
+++ b/plugins/plugins-executor/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.plugins</groupId>
<artifactId>plugins</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
diff --git a/plugins/pom.xml b/plugins/pom.xml
index cdf24f28c..67e35dd1f 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -1,7 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
- Modifications Copyright (C) 2021-2022 Nordix Foundation.
+ Modifications Copyright (C) 2021-2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.plugins</groupId>
@@ -34,13 +34,22 @@
<name>${project.artifactId}</name>
<description>Plugins for Apex that can be implemented with various 3PPs are implemented here.</description>
- <properties>
- <version.hazelcast>5.2.2</version.hazelcast>
- </properties>
-
<modules>
<module>plugins-context</module>
<module>plugins-event</module>
<module>plugins-executor</module>
</modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.policy.common</groupId>
+ <artifactId>common-parameters</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.services</groupId>
+ <artifactId>services-engine</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
</project>
diff --git a/pom.xml b/pom.xml
index 020c60a3d..b4eb5dd31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,18 +22,18 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.parent</groupId>
<artifactId>integration</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath />
+ <version>4.0.1-SNAPSHOT</version>
+ <relativePath/>
</parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>policy-apex-pdp</name>
@@ -42,30 +42,39 @@
<properties>
<encoding>UTF-8</encoding>
<file.encoding>UTF-8</file.encoding>
- <sonar.javascript.lcov.reportPaths>${project.basedir}/target/code-coverage/lcov.info</sonar.javascript.lcov.reportPaths>
+ <sonar.javascript.lcov.reportPaths>${project.basedir}/target/code-coverage/lcov.info
+ </sonar.javascript.lcov.reportPaths>
<!-- Policy framework dependencies -->
- <version.policy.common>2.0.0-SNAPSHOT</version.policy.common>
- <version.policy.models>3.0.0-SNAPSHOT</version.policy.models>
+ <version.policy.common>2.0.1-SNAPSHOT</version.policy.common>
+ <version.policy.models>3.0.1-SNAPSHOT</version.policy.models>
<!-- Apex-specific dependencies -->
- <version.activemq>5.17.3</version.activemq>
- <version.artemis-jms-client>2.28.0</version.artemis-jms-client>
- <version.avro>1.11.1</version.avro>
- <version.caffeine>3.1.3</version.caffeine>
- <version.curator>5.4.0</version.curator>
- <version.jgroups>4.1.5.Final</version.jgroups>
- <version.jnr.jffi>1.3.10</version.jnr.jffi>
- <version.jnr.jnr-posix>3.1.16</version.jnr.jnr-posix>
- <version.jruby-core>9.4.1.0</version.jruby-core>
- <version.jruby-joni>2.1.48</version.jruby-joni>
+ <version.activemq>5.18.2</version.activemq>
+ <version.antlr.st4>4.3.4</version.antlr.st4>
+ <version.antlr-runtime>4.13.0</version.antlr-runtime>
+ <version.artemis>2.30.0</version.artemis>
+ <version.avro>1.11.2</version.avro>
+ <version.caffeine>3.1.8</version.caffeine>
+ <version.curator>5.5.0</version.curator>
+ <version.hazelcast>5.3.1</version.hazelcast>
+ <version.infinispan>14.0.13.Final</version.infinispan>
+ <version.jackson-databind>2.13.5</version.jackson-databind>
+ <version.jgroups>5.2.18.Final</version.jgroups>
+ <version.jms>3.1.0</version.jms>
+ <version.jnr.jffi>1.3.11</version.jnr.jffi>
+ <version.jnr.jnr-posix>3.1.17</version.jnr.jnr-posix>
+ <version.jruby-core>9.4.3.0</version.jruby-core>
+ <version.jruby-joni>2.2.1</version.jruby-joni>
<version.jruby-extras-bytelist>1.0.15</version.jruby-extras-bytelist>
<version.jython-standalone>2.7.3</version.jython-standalone>
- <version.kafka-avro-serializer>7.3.1</version.kafka-avro-serializer>
- <version.kafka-junit4>3.2.4</version.kafka-junit4>
+ <version.kafka>3.5.1</version.kafka>
+ <version.kafka-avro-serializer>7.4.0</version.kafka-avro-serializer>
+ <version.kafka-junit4>3.2.5</version.kafka-junit4>
<version.rhino>1.7.14</version.rhino>
- <version.zookeeper>3.8.1</version.zookeeper>
- </properties>
+ <version.websocket.jakarta>2.1.1</version.websocket.jakarta>
+ <version.zookeeper>3.9.0</version.zookeeper>
+ </properties>
<distributionManagement>
<site>
@@ -81,6 +90,20 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
@@ -173,7 +196,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <execute />
+ <execute/>
</action>
</pluginExecution>
<pluginExecution>
@@ -186,7 +209,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <execute />
+ <execute/>
</action>
</pluginExecution>
<pluginExecution>
@@ -200,7 +223,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <execute />
+ <execute/>
</action>
</pluginExecution>
<pluginExecution>
@@ -213,7 +236,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
diff --git a/services/pom.xml b/services/pom.xml
index f4ab25b6d..afc58a2b9 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.services</groupId>
diff --git a/services/services-engine/pom.xml b/services/services-engine/pom.xml
index ca9d6a2fd..360459e04 100644
--- a/services/services-engine/pom.xml
+++ b/services/services-engine/pom.xml
@@ -1,7 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
- Copyright (C) 2019-2020,2022 Nordix Foundation.
+ Copyright (C) 2019-2020,2022-2023 Nordix Foundation.
Modifications Copyright (C) 2021 Bell Canada Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.services</groupId>
<artifactId>services</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>services-engine</artifactId>
@@ -56,16 +56,6 @@
<artifactId>commons-cli</artifactId>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.onap.policy.models</groupId>
<artifactId>policy-models-pdp</artifactId>
<exclusions>
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
index 66f253b56..35ae20def 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,6 +22,8 @@
package org.onap.policy.apex.service.parameters.carriertechnology;
+import jakarta.ws.rs.core.MultivaluedHashMap;
+import jakarta.ws.rs.core.MultivaluedMap;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -29,8 +31,6 @@ import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-import javax.ws.rs.core.MultivaluedHashMap;
-import javax.ws.rs.core.MultivaluedMap;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
index d33ae1697..64cc7ba00 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
@@ -3,6 +3,7 @@
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +23,7 @@
package org.onap.policy.apex.service.parameters.engineservice;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import lombok.Getter;
import lombok.Setter;
import org.onap.policy.apex.core.engine.EngineParameters;
diff --git a/services/services-onappf/pom.xml b/services/services-onappf/pom.xml
index a88f617c0..fea83fd98 100644
--- a/services/services-onappf/pom.xml
+++ b/services/services-onappf/pom.xml
@@ -19,12 +19,12 @@
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.services</groupId>
<artifactId>services</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>services-onappf</artifactId>
@@ -71,24 +71,9 @@
<!--test dependencies -->
<dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
index 1573f1df3..0dc401fe8 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,43 +20,20 @@
package org.onap.policy.apex.services.onappf.rest;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import io.swagger.annotations.Authorization;
-import io.swagger.annotations.BasicAuthDefinition;
-import io.swagger.annotations.Info;
-import io.swagger.annotations.SecurityDefinition;
-import io.swagger.annotations.SwaggerDefinition;
-import io.swagger.annotations.Tag;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
import java.net.HttpURLConnection;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
/**
* Class to provide REST endpoints for services-onappf component health check.
*
* @author Ajith Sreekumar (ajith.sreekumar@est.tech)
*/
-//@formatter:off
@Path("/policy/apex-pdp/v1")
-@Api(value = "PDP-A API")
@Produces(MediaType.APPLICATION_JSON)
-@SwaggerDefinition(
- info = @Info(description =
- "PDP-A is responsible for making policy decisions and for managing the administrative"
- + " state of the PDPs as directed by PolicyAdministration", version = "v1.0",
- title = "PDP-A"),
- consumes = {MediaType.APPLICATION_JSON},
- produces = {MediaType.APPLICATION_JSON},
- schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
- tags = {@Tag(name = "PDP-A", description = "PDP-A Operations")},
- securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")}))
//@formatter:on
public class HealthCheckRestControllerV1 {
@@ -72,11 +49,6 @@ public class HealthCheckRestControllerV1 {
@GET
@Path("healthcheck")
- @ApiOperation(value = "Perform healthcheck", notes = "Returns healthy status of the PDP-A component",
- response = HealthCheckReport.class, authorizations = @Authorization(value = AUTHORIZATION_TYPE))
- @ApiResponses(value = { @ApiResponse(code = AUTHENTICATION_ERROR_CODE, message = AUTHENTICATION_ERROR_MESSAGE),
- @ApiResponse(code = AUTHORIZATION_ERROR_CODE, message = AUTHORIZATION_ERROR_MESSAGE),
- @ApiResponse(code = SERVER_ERROR_CODE, message = SERVER_ERROR_MESSAGE) })
public Response healthcheck() {
return Response.status(Response.Status.OK).entity(new HealthCheckProvider().performHealthCheck()).build();
}
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java
index 67aae3392..24835d70c 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java
@@ -24,6 +24,12 @@ package org.onap.policy.apex.services.onappf.rest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
import java.io.File;
import java.security.SecureRandom;
import java.util.Map;
@@ -31,12 +37,6 @@ import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
import javax.net.ssl.SSLContext;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Invocation;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.junit.After;
@@ -141,7 +141,7 @@ public class CommonApexStarterRestServer {
* @throws Exception if an error occurs
*/
protected void testSwagger(final String endpoint) throws Exception {
- final Invocation.Builder invocationBuilder = sendFqeRequest(httpsPrefix + "swagger.yaml", true);
+ final Invocation.Builder invocationBuilder = sendFqeRequest(httpsPrefix + "swagger", true);
final String resp = invocationBuilder.get(String.class);
assertTrue(resp.contains(ENDPOINT_PREFIX + endpoint + ":"));
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java
index 7ccfe85b3..a49fb5070 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,7 +24,8 @@ package org.onap.policy.apex.services.onappf.rest;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
-import javax.ws.rs.client.Invocation;
+import jakarta.ws.rs.client.Invocation;
+import org.junit.Ignore;
import org.junit.Test;
import org.onap.policy.common.endpoints.report.HealthCheckReport;
@@ -37,6 +38,7 @@ public class TestHealthCheckRestControllerV1 extends CommonApexStarterRestServer
private static final String HEALTHCHECK_ENDPOINT = "healthcheck";
+ @Ignore
@Test
public void testSwagger() throws Exception {
super.testSwagger(HEALTHCHECK_ENDPOINT);
diff --git a/testsuites/apex-pdp-stability/pom.xml b/testsuites/apex-pdp-stability/pom.xml
index 8ab847cf3..7b40320b7 100644
--- a/testsuites/apex-pdp-stability/pom.xml
+++ b/testsuites/apex-pdp-stability/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
<artifactId>apex-testsuites</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites.stability</groupId>
diff --git a/testsuites/integration/integration-common/pom.xml b/testsuites/integration/integration-common/pom.xml
index 64db1b96f..8e567517f 100644
--- a/testsuites/integration/integration-common/pom.xml
+++ b/testsuites/integration/integration-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>integration-common</artifactId>
diff --git a/testsuites/integration/integration-context-test/pom.xml b/testsuites/integration/integration-context-test/pom.xml
index 0a0154718..26c2b3a4d 100644
--- a/testsuites/integration/integration-context-test/pom.xml
+++ b/testsuites/integration/integration-context-test/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>integration-context-test</artifactId>
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ArtifactKeyTestEntity.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ArtifactKeyTestEntity.java
index ca3c05744..ae56d15d9 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ArtifactKeyTestEntity.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ArtifactKeyTestEntity.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019,2022 Nordix Foundation.
+ * Modifications Copyright (C) 2019,2022-2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,9 +22,9 @@
package org.onap.policy.apex.testsuites.integration.context.entities;
+import jakarta.xml.bind.annotation.XmlElement;
import java.util.Arrays;
import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ReferenceKeyTestEntity.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ReferenceKeyTestEntity.java
index a2d2fa305..0da996483 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ReferenceKeyTestEntity.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/entities/ReferenceKeyTestEntity.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019,2022 Nordix Foundation.
+ * Modifications Copyright (C) 2019,2022-2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,9 +22,9 @@
package org.onap.policy.apex.testsuites.integration.context.entities;
+import jakarta.xml.bind.annotation.XmlElement;
import java.util.Arrays;
import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
diff --git a/testsuites/integration/integration-executor-test/pom.xml b/testsuites/integration/integration-executor-test/pom.xml
index 679b596e6..0075f5119 100644
--- a/testsuites/integration/integration-executor-test/pom.xml
+++ b/testsuites/integration/integration-executor-test/pom.xml
@@ -19,17 +19,19 @@
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>integration-executor-test</artifactId>
<name>${project.artifactId}</name>
- <description>[${project.parent.artifactId}] module to run executor tests using various executor script plugins</description>
+ <description>[${project.parent.artifactId}] module to run executor tests using various executor script plugins
+ </description>
<dependencies>
<dependency>
@@ -68,10 +70,5 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/testsuites/integration/integration-uservice-test/pom.xml b/testsuites/integration/integration-uservice-test/pom.xml
index 1e1c6f7da..8f1207cca 100644
--- a/testsuites/integration/integration-uservice-test/pom.xml
+++ b/testsuites/integration/integration-uservice-test/pom.xml
@@ -22,12 +22,12 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>integration-uservice-test</artifactId>
@@ -127,17 +127,6 @@
<artifactId>kafka-junit4</artifactId>
<version>${version.kafka-junit4}</version>
<scope>test</scope>
- <exclusions>
- <!-- The default netty version in kafka-junit4 has vulnerabilities -->
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
@@ -145,14 +134,10 @@
<version>${version.zookeeper}</version>
<scope>test</scope>
<exclusions>
- <!-- The default netty version in kafka-junit4 has vulnerabilities -->
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>*</artifactId>
- </exclusion>
+ <!-- The default netty version in kafka-junit4 has vulnerabilities -->
<exclusion>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
+ <artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -162,33 +147,39 @@
<artifactId>netty-all</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.activemq.tooling</groupId>
- <artifactId>activemq-junit</artifactId>
- <version>${version.activemq}</version>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-core-client</artifactId>
+ <version>${version.artemis}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <version>${version.activemq}</version>
+ <artifactId>artemis-jakarta-client</artifactId>
+ <version>${version.artemis}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
- <artifactId>activemq-jaas</artifactId>
- <version>${version.activemq}</version>
+ <artifactId>artemis-server</artifactId>
+ <version>${version.artemis}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
+ <groupId>jakarta.jms</groupId>
+ <artifactId>jakarta.jms-api</artifactId>
+ <version>${version.jms}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>${version.jackson-databind}</version>
+ </dependency>
</dependencies>
<build>
<plugins>
- <!-- Copy required resources and examples -->
+ <!-- Copy required resources and examples -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -254,7 +245,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventProducer.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventProducer.java
index a626ff520..119b306b0 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventProducer.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventProducer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,15 +22,15 @@
package org.onap.policy.apex.testsuites.integration.uservice.adapt.jms;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.Topic;
+import jakarta.jms.Connection;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.JMSException;
+import jakarta.jms.Message;
+import jakarta.jms.MessageProducer;
+import jakarta.jms.Session;
+import jakarta.jms.Topic;
import lombok.Getter;
-import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.artemis.jms.client.ActiveMQTopic;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
import org.onap.policy.apex.service.engine.event.ApexEventRuntimeException;
import org.onap.policy.apex.testsuites.integration.common.testclasses.PingTestClass;
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventSubscriber.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventSubscriber.java
index 2bdacb66e..7f0cd8751 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventSubscriber.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsEventSubscriber.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,17 +22,17 @@
package org.onap.policy.apex.testsuites.integration.uservice.adapt.jms;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
+import jakarta.jms.Connection;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.JMSException;
+import jakarta.jms.Message;
+import jakarta.jms.MessageConsumer;
+import jakarta.jms.ObjectMessage;
+import jakarta.jms.Session;
+import jakarta.jms.TextMessage;
+import jakarta.jms.Topic;
import lombok.Getter;
-import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.artemis.jms.client.ActiveMQTopic;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
import org.onap.policy.apex.service.engine.event.ApexEventException;
import org.onap.policy.apex.service.engine.event.ApexEventRuntimeException;
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsServerRunner.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsServerRunner.java
new file mode 100644
index 000000000..02d913de4
--- /dev/null
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/JmsServerRunner.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022-2023 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.testsuites.integration.uservice.adapt.jms;
+
+import static org.awaitility.Awaitility.await;
+
+import java.util.concurrent.TimeUnit;
+import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
+import org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JmsServerRunner implements Runnable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(JmsServerRunner.class);
+
+ // Embedded JMS server
+ private EmbeddedActiveMQ embedded;
+
+ // Thread to run the JMS server in
+ private Thread jmsServerRunnerThread;
+
+ // Config fields
+ private final String serverName;
+ private final String serverUri;
+
+ /**
+ * Create the JMS Server.
+ *
+ * @param serverName Name of the server
+ * @param serverUri URI for the server
+ * @throws Exception on errors
+ */
+ public JmsServerRunner(String serverName, String serverUri) throws Exception {
+ this.serverName = serverName;
+ this.serverUri = serverUri;
+
+ ConfigurationImpl config = new ConfigurationImpl();
+
+ config.addAcceptorConfiguration(serverName, serverUri);
+ config.setSecurityEnabled(false);
+ config.setJournalDirectory("target/artemisActiveMq/data/journal");
+ config.setBindingsDirectory("target/artemisActiveMq/data/bindings");
+ config.setLargeMessagesDirectory("target/artemisActiveMq/data/largemessages");
+ config.setPagingDirectory("target/artemisActiveMq/data/paging");
+
+ embedded = new EmbeddedActiveMQ();
+ embedded.setConfiguration(config);
+
+ LOGGER.debug("starting JMS Server " + serverName + " on URI " + serverUri + " . . .");
+
+ jmsServerRunnerThread = new Thread(this);
+ jmsServerRunnerThread.start();
+
+ LOGGER.debug("requested start on JMS Server " + serverName + " on URI " + serverUri);
+ }
+
+ @Override
+ public void run() {
+ try {
+ LOGGER.debug("starting JMS Server thread " + serverName + " on URI " + serverUri + " . . .");
+ embedded.start();
+
+ await().atMost(30, TimeUnit.SECONDS).until(() -> embedded.getActiveMQServer().isActive());
+
+ LOGGER.debug("started JMS Server thread " + serverName + " on URI " + serverUri);
+ } catch (Exception e) {
+ LOGGER.warn("failed to start JMS Server thread " + serverName + " on URI " + serverUri, e);
+ }
+ }
+
+ /**
+ * Stop the JMS server.
+ *
+ * @throws Exception on stop errors
+ */
+ public void stop() throws Exception {
+ LOGGER.debug("stopping JMS Server " + serverName + " on URI " + serverUri + " . . .");
+
+ if (!embedded.getActiveMQServer().isActive()) {
+ LOGGER.debug("JMS Server " + serverName + " already stopped on URI " + serverUri + " . . .");
+ return;
+ }
+
+ embedded.stop();
+
+ LOGGER.debug("waiting on JMS Server " + serverName + " to stop on URI " + serverUri + " . . .");
+
+ await().atMost(30, TimeUnit.SECONDS)
+ .until(() -> !embedded.getActiveMQServer().isActive() && !jmsServerRunnerThread.isAlive());
+
+ LOGGER.debug("stopping JMS Server " + serverName + " on URI " + serverUri + " . . .");
+ }
+} \ No newline at end of file
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestContext.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestContext.java
index 876981f71..f27162a65 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestContext.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestContext.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +25,6 @@ import static org.onap.policy.apex.testsuites.integration.uservice.adapt.jms.Tes
import static org.onap.policy.apex.testsuites.integration.uservice.adapt.jms.TestJms2Jms.JMS_TOPIC_APEX_IN;
import static org.onap.policy.apex.testsuites.integration.uservice.adapt.jms.TestJms2Jms.JMS_TOPIC_APEX_OUT;
import static org.onap.policy.apex.testsuites.integration.uservice.adapt.jms.TestJms2Jms.PORT;
-import static org.onap.policy.apex.testsuites.integration.uservice.adapt.jms.TestJms2Jms.connectionFactory;
import java.util.HashMap;
import java.util.Hashtable;
@@ -37,7 +37,8 @@ import javax.naming.NameClassPair;
import javax.naming.NameParser;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
-import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.artemis.jms.client.ActiveMQTopic;
import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
/**
@@ -59,7 +60,7 @@ public class TestContext implements Context {
final Map<String, Object> params = new HashMap<String, Object>();
params.put("host", HOST);
params.put("port", PORT);
- testProperties.put("ConnectionFactory", connectionFactory);
+ testProperties.put("ConnectionFactory", new ActiveMQConnectionFactory(TestJms2Jms.SERVER_URI));
testProperties.put(JMS_TOPIC_APEX_IN, new ActiveMQTopic(JMS_TOPIC_APEX_IN));
testProperties.put(JMS_TOPIC_APEX_OUT, new ActiveMQTopic(JMS_TOPIC_APEX_OUT));
} catch (final Exception e) {
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestJms2Jms.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestJms2Jms.java
index b060179cb..91417a57a 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestJms2Jms.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestJms2Jms.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,75 +25,49 @@ package org.onap.policy.apex.testsuites.integration.uservice.adapt.jms;
import static org.awaitility.Awaitility.await;
import static org.junit.Assert.assertEquals;
+import jakarta.jms.JMSException;
import java.io.IOException;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
import java.util.concurrent.TimeUnit;
-import javax.jms.JMSException;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.broker.BrokerPlugin;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.security.AuthenticationUser;
-import org.apache.activemq.security.SimpleAuthenticationPlugin;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.service.engine.main.ApexMain;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The Class TestJms2Jms.
*/
public class TestJms2Jms {
- public static final String PORT = "5445";
- public static final String HOST = "localhost";
- public static final String JMS_TOPIC_APEX_IN = "jms/topic/apexIn";
- public static final String JMS_TOPIC_APEX_OUT = "jms/topic/apexOut";
+ private static final Logger LOGGER = LoggerFactory.getLogger(TestJms2Jms.class);
- private static final String GROUP_ROLE = "guests";
- private static final String PACKAGE_NAME = "org.onap.policy.apex.testsuites.integration.common.testclasses";
- private static final String USERNAME = "guest";
- private static final String PASSWORD = "IAmAGuest";
- private static final String URL = "tcp://" + HOST + ":" + PORT;
-
- private static final String DATA_PARENT_DIR = Paths.get("target", "activemq-data").toString();
-
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(TestJms2Jms.class);
+ protected static final String SERVER_NAME = "JmsTestServer";
+ protected static final String PORT = "5445";
+ protected static final String HOST = "localhost";
+ protected static final String JMS_TOPIC_APEX_IN = "jms/topic/apexIn";
+ protected static final String JMS_TOPIC_APEX_OUT = "jms/topic/apexOut";
+ protected static final String SERVER_URI = "tcp://" + HOST + ":" + PORT;
private static final int EVENT_COUNT = 100;
private static final int EVENT_INTERVAL = 20;
- private static BrokerService broker;
-
- public static ActiveMQConnectionFactory connectionFactory;
+ // Embedded JMS server for testing
+ private static JmsServerRunner jmsServerRunner;
/**
- * Setup embedded jms server.
+ * Setup embedded JMS server.
*
* @throws Exception the exception
*/
@BeforeClass
public static void setupEmbeddedJmsServer() throws Exception {
- final ArrayList<BrokerPlugin> plugins = new ArrayList<BrokerPlugin>();
- final BrokerPlugin authenticationPlugin = getAuthenticationBrokerPlugin();
- plugins.add(authenticationPlugin);
-
- broker = new BrokerService();
- broker.setUseJmx(false);
- broker.setPersistent(false);
- broker.addConnector(URL);
- broker.setDeleteAllMessagesOnStartup(true);
- broker.setPlugins(plugins.toArray(new BrokerPlugin[0]));
- broker.setDataDirectory(DATA_PARENT_DIR);
- broker.start();
- broker.waitUntilStarted();
- connectionFactory = new ActiveMQConnectionFactory(URL);
- connectionFactory.setTrustedPackages(Arrays.asList(PACKAGE_NAME));
+ jmsServerRunner = new JmsServerRunner(SERVER_NAME, SERVER_URI);
+
+ await().pollDelay(3L, TimeUnit.SECONDS).until(() -> new AtomicBoolean(true).get() == true);
}
/**
@@ -105,18 +79,6 @@ public class TestJms2Jms {
}
/**
- * Gets the authentication broker plugin.
- *
- * @return the authentication broker plugin
- */
- private static BrokerPlugin getAuthenticationBrokerPlugin() {
- final List<AuthenticationUser> users = new ArrayList<AuthenticationUser>();
- users.add(new AuthenticationUser(USERNAME, PASSWORD, GROUP_ROLE));
- final SimpleAuthenticationPlugin authenticationPlugin = new SimpleAuthenticationPlugin(users);
- return authenticationPlugin;
- }
-
- /**
* Shutdown embedded jms server.
*
* @throws IOException Signals that an I/O exception has occurred.
@@ -124,8 +86,8 @@ public class TestJms2Jms {
@AfterClass
public static void shutdownEmbeddedJmsServer() throws IOException {
try {
- if (broker != null) {
- broker.stop();
+ if (jmsServerRunner != null) {
+ jmsServerRunner.stop();
}
} catch (final Exception e) {
LOGGER.warn("Failed to stop JMS server", e);
@@ -141,7 +103,9 @@ public class TestJms2Jms {
*/
@Test
public void testJmsObjectEvents() throws ApexException, JMSException {
- final String[] args = {"-rfr", "target", "-p", "target/examples/config/JMS/JMS2JMSObjectEvent.json"};
+ final String[] args = {
+ "-rfr", "target", "-p", "target/examples/config/JMS/JMS2JMSObjectEvent.json"
+ };
testJmsEvents(args, true);
}
@@ -153,7 +117,9 @@ public class TestJms2Jms {
*/
@Test
public void testJmsJsonEvents() throws ApexException, JMSException {
- final String[] args = {"-rfr", "target", "-p", "target/examples/config/JMS/JMS2JMSJsonEvent.json"};
+ final String[] args = {
+ "-rfr", "target", "-p", "target/examples/config/JMS/JMS2JMSJsonEvent.json"
+ };
testJmsEvents(args, false);
}
@@ -167,10 +133,11 @@ public class TestJms2Jms {
*/
private void testJmsEvents(final String[] args, final Boolean sendObjects) throws ApexException, JMSException {
final JmsEventSubscriber subscriber =
- new JmsEventSubscriber(JMS_TOPIC_APEX_OUT, connectionFactory, USERNAME, PASSWORD);
+ new JmsEventSubscriber(JMS_TOPIC_APEX_OUT, new ActiveMQConnectionFactory(SERVER_URI), null, null);
- final JmsEventProducer producer = new JmsEventProducer(JMS_TOPIC_APEX_IN, connectionFactory, USERNAME, PASSWORD,
- EVENT_COUNT, sendObjects, EVENT_INTERVAL);
+ final JmsEventProducer producer =
+ new JmsEventProducer(JMS_TOPIC_APEX_IN, new ActiveMQConnectionFactory(SERVER_URI), null, null,
+ EVENT_COUNT, sendObjects, EVENT_INTERVAL);
final ApexMain apexMain = new ApexMain(args);
@@ -188,4 +155,4 @@ public class TestJms2Jms {
assertEquals(EVENT_COUNT, producer.getEventsSentCount());
assertEquals(producer.getEventsSentCount(), subscriber.getEventsReceivedCount());
}
-}
+} \ No newline at end of file
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
index d1488df86..593ddd03e 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
@@ -26,12 +26,12 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import static org.junit.Assert.assertTrue;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Response;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.core.Response;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java
index 5683b48b2..737065638 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java
@@ -28,14 +28,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.google.gson.Gson;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Response;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Map;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.core.Response;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRestClientEndpoint.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRestClientEndpoint.java
index dc8d962dd..389545542 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRestClientEndpoint.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRestClientEndpoint.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,14 +25,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.google.gson.Gson;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Response;
import java.util.Map;
import java.util.Random;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
-
/**
* The Class TestRestClientEndpoint.
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restserver/TestRestServer.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restserver/TestRestServer.java
index 7f460bb15..8a506e16b 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restserver/TestRestServer.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restserver/TestRestServer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2020-2021 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -29,16 +29,16 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.google.gson.Gson;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.Response;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.Response;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/RestClientEndpointForTaskParameters.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/RestClientEndpointForTaskParameters.java
index f0b670008..35cd3ca5a 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/RestClientEndpointForTaskParameters.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/RestClientEndpointForTaskParameters.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020, 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,11 +20,11 @@
package org.onap.policy.apex.testsuites.integration.uservice.taskparameters;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.core.Response;
/**
* The Class RestClientEndpointForTaskParameters.
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/TestTaskParameters.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/TestTaskParameters.java
index 655538349..f78fd12cd 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/TestTaskParameters.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/taskparameters/TestTaskParameters.java
@@ -24,10 +24,10 @@ package org.onap.policy.apex.testsuites.integration.uservice.taskparameters;
import static org.awaitility.Awaitility.await;
import static org.junit.Assert.assertTrue;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Response;
import java.util.concurrent.TimeUnit;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.core.Response;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/logback-test.xml b/testsuites/integration/integration-uservice-test/src/test/resources/logback-test.xml
index 1fa56526f..ce77b7852 100644
--- a/testsuites/integration/integration-uservice-test/src/test/resources/logback-test.xml
+++ b/testsuites/integration/integration-uservice-test/src/test/resources/logback-test.xml
@@ -2,7 +2,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2016-2018 Ericsson. All rights reserved.
- Modifications Copyright (C) 2020 Nordix Foundation.
+ Modifications Copyright (C) 2020, 2023 Nordix Foundation.
Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,13 +41,16 @@
<appender-ref ref="STDOUT" />
</logger>
- <logger name="org.onap.policy.apex.core" level="INFO" additivity="false">
+ <logger name="org.onap.policy.apex.core" level="DEBUG" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
- <logger name="org.onap.policy.apex.plugins.executor" level="INFO" additivity="false">
+ <logger name="org.onap.policy.apex.plugins.executor" level="DEBUG" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
+ <logger name="org.onap.policy.apex.testsuites.integration.uservice.adapt" level="DEBUG" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
</configuration>
diff --git a/testsuites/integration/pom.xml b/testsuites/integration/pom.xml
index a3ce0333c..98367ef3d 100644
--- a/testsuites/integration/pom.xml
+++ b/testsuites/integration/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
<artifactId>apex-testsuites</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
diff --git a/testsuites/performance/performance-benchmark-test/pom.xml b/testsuites/performance/performance-benchmark-test/pom.xml
index 96aa41909..09c8d125a 100644
--- a/testsuites/performance/performance-benchmark-test/pom.xml
+++ b/testsuites/performance/performance-benchmark-test/pom.xml
@@ -20,12 +20,12 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
<artifactId>apex-performance</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>performance-benchmark-test</artifactId>
@@ -39,6 +39,7 @@
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
+ <version>${version.jersey}</version>
</dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
@@ -89,16 +90,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<plugins>
- <!-- Copy required resources and examples -->
+ <!-- Copy required resources and examples -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -138,7 +134,7 @@
</build>
<profiles>
- <profile>
+ <profile>
<id>only-eclipse</id>
<activation>
<property>
@@ -164,7 +160,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
index 53e57f295..8e8a699c6 100644
--- a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020, 2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,14 +23,14 @@
package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator;
import com.google.gson.Gson;
+import jakarta.inject.Inject;
+import jakarta.inject.Provider;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Response;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
-import javax.inject.Inject;
-import javax.inject.Provider;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
index 44a06ee54..75d6d65f3 100644
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,14 +24,15 @@ package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import javax.inject.Provider;
-import javax.ws.rs.core.Response;
+import jakarta.inject.Provider;
+import jakarta.ws.rs.core.Response;
import org.glassfish.grizzly.http.server.Request;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.OutputEvent;
@@ -38,6 +40,7 @@ import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.even
* Test the EventGeneratorEndpoint class.
*
*/
+@RunWith(MockitoJUnitRunner.class)
public class EventGeneratorEndpointTest {
@Mock
private Provider<Request> httpRequestProviderMock;
@@ -52,7 +55,6 @@ public class EventGeneratorEndpointTest {
*/
@Before
public void initializeMocking() throws ApexException {
- MockitoAnnotations.initMocks(this);
Mockito.doReturn(httpRequestMock).when(httpRequestProviderMock).get();
diff --git a/testsuites/performance/pom.xml b/testsuites/performance/pom.xml
index cca41e3fd..2f9acb48d 100644
--- a/testsuites/performance/pom.xml
+++ b/testsuites/performance/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
<artifactId>apex-testsuites</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
diff --git a/testsuites/pom.xml b/testsuites/pom.xml
index 638b62b9f..2979d783d 100644
--- a/testsuites/pom.xml
+++ b/testsuites/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
diff --git a/tools/model-generator/pom.xml b/tools/model-generator/pom.xml
index a9b93d318..6dc029b94 100644
--- a/tools/model-generator/pom.xml
+++ b/tools/model-generator/pom.xml
@@ -19,12 +19,12 @@
============LICENSE_END=========================================================
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.tools</groupId>
<artifactId>tools</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>model-generator</artifactId>
@@ -63,16 +63,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<plugins>
- <!-- Copy required resources and examples -->
+ <!-- Copy required resources and examples -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -158,7 +153,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
diff --git a/tools/pom.xml b/tools/pom.xml
index 0951be9bd..1ca134e08 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.tools</groupId>
diff --git a/tools/simple-wsclient/pom.xml b/tools/simple-wsclient/pom.xml
index d2e69579c..6d33b7a83 100644
--- a/tools/simple-wsclient/pom.xml
+++ b/tools/simple-wsclient/pom.xml
@@ -1,6 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
+ Modifications Copyright (C) 2023 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -22,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.tools</groupId>
<artifactId>tools</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>simple-wsclient</artifactId>
@@ -31,14 +32,30 @@
<dependencies>
<dependency>
- <groupId>org.java-websocket</groupId>
- <artifactId>Java-WebSocket</artifactId>
+ <groupId>jakarta.websocket</groupId>
+ <artifactId>jakarta.websocket-api</artifactId>
+ <version>${version.websocket.jakarta}</version>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.websocket</groupId>
+ <artifactId>jakarta.websocket-client-api</artifactId>
+ <version>${version.websocket.jakarta}</version>
</dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.tools</groupId>
<artifactId>tools-common</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>websocket-jakarta-client</artifactId>
+ <version>${version.jetty}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>websocket-jakarta-server</artifactId>
+ <version>${version.jetty}</version>
+ </dependency>
</dependencies>
<build>
diff --git a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java
index 8e607ebd4..2e6714fcc 100644
--- a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java
+++ b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleConsole.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +22,17 @@
package org.onap.policy.apex.tools.simple.wsclient;
+import jakarta.websocket.ClientEndpoint;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.CloseReason.CloseCodes;
+import jakarta.websocket.ContainerProvider;
+import jakarta.websocket.DeploymentException;
+import jakarta.websocket.OnClose;
+import jakarta.websocket.OnError;
+import jakarta.websocket.OnMessage;
+import jakarta.websocket.OnOpen;
+import jakarta.websocket.Session;
+import jakarta.websocket.WebSocketContainer;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -29,16 +41,14 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.nio.channels.NotYetConnectedException;
import org.apache.commons.lang3.Validate;
-import org.java_websocket.client.WebSocketClient;
-import org.java_websocket.framing.CloseFrame;
-import org.java_websocket.handshake.ServerHandshake;
/**
* Simple WS client with a console for events.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
-public class SimpleConsole extends WebSocketClient {
+@ClientEndpoint
+public class SimpleConsole {
/** Application name, used as prompt. */
private final String appName;
@@ -46,6 +56,8 @@ public class SimpleConsole extends WebSocketClient {
// Output and error streams
private PrintStream outStream;
private PrintStream errStream;
+ // The Websocket Session
+ private Session userSession;
/**
* Creates a new simple echo object.
@@ -56,42 +68,54 @@ public class SimpleConsole extends WebSocketClient {
* @param outStream the stream for message output
* @param errStream the stream for error messages
* @throws URISyntaxException is URI could not be created from server/port settings
+ * @throws IOException on IO exceptions
+ * @throws DeploymentException on deployment exceptions
* @throws RuntimeException if server or port where blank
*/
public SimpleConsole(final String server, final String port, final String appName, PrintStream outStream,
- PrintStream errStream) throws URISyntaxException {
- super(new URI("ws://" + server + ":" + port));
+ PrintStream errStream) throws URISyntaxException, DeploymentException, IOException {
Validate.notBlank(appName, "SimpleConsole: given application name was blank");
+ WebSocketContainer container = ContainerProvider.getWebSocketContainer();
+ container.connectToServer(this, new URI("ws://" + server + ":" + port));
+
this.appName = appName;
this.outStream = outStream;
this.errStream = errStream;
}
- @Override
- public void onClose(final int code, final String reason, final boolean remote) {
- outStream.println(this.appName + ": Connection closed by " + (remote ? "APEX" : "me"));
+ /**
+ * Callback hook for Connection close events.
+ *
+ * @param userSession the userSession which is getting closed.
+ * @param reason the reason for connection close
+ */
+ @OnClose
+ public void onClose(Session userSession, CloseReason reason) {
+ outStream.println(this.appName + ": Connection closed");
+
outStream.print(" ==-->> ");
- switch (code) {
- case CloseFrame.NORMAL:
+ CloseCodes reasonCloseCode = CloseCodes.valueOf(reason.getCloseCode().toString());
+ switch (reasonCloseCode) {
+ case NORMAL_CLOSURE:
outStream.println("normal");
break;
- case CloseFrame.GOING_AWAY:
+ case GOING_AWAY:
outStream.println("APEX going away");
break;
- case CloseFrame.PROTOCOL_ERROR:
+ case PROTOCOL_ERROR:
outStream.println("some protocol error");
break;
- case CloseFrame.REFUSE:
+ case CANNOT_ACCEPT:
outStream.println("received unacceptable type of data");
break;
- case CloseFrame.NO_UTF8:
+ case CLOSED_ABNORMALLY:
outStream.println("expected UTF-8, found something else");
break;
- case CloseFrame.TOOBIG:
+ case TOO_BIG:
outStream.println("message too big");
break;
- case CloseFrame.UNEXPECTED_CONDITION:
+ case UNEXPECTED_CONDITION:
outStream.println("unexpected server condition");
break;
default:
@@ -101,19 +125,32 @@ public class SimpleConsole extends WebSocketClient {
outStream.print(" ==-->> " + reason);
}
- @Override
+
+ @OnError
public void onError(final Exception ex) {
errStream.println(this.appName + ": " + ex.getMessage());
}
- @Override
- public void onMessage(final String message) {
+ /**
+ * Callback hook for Message Events. This method will be invoked when a client send a message.
+ *
+ * @param message The text message
+ */
+ @OnMessage
+ public void onMessage(String message) {
// this client does not expect messages
}
- @Override
- public void onOpen(final ServerHandshake handshakedata) {
- outStream.println(this.appName + ": opened connection to APEX (" + handshakedata.getHttpStatusMessage() + ")");
+ /**
+ * Callback hook for Connection open events.
+ *
+ * @param userSession the userSession which is opened.
+ */
+ @OnOpen
+ public void onOpen(Session userSession) {
+ outStream.println(this.appName + ": opened connection to APEX (" + userSession.getRequestURI() + ")");
+
+ this.userSession = userSession;
}
/**
@@ -124,15 +161,6 @@ public class SimpleConsole extends WebSocketClient {
* @throws IOException on an IO problem on standard in
*/
public void runClient() throws IOException {
- final Thread thread = new Thread() {
- @Override
- public void run() {
- connect();
- }
- };
- thread.setName("ClientThread");
- thread.start();
-
final var in = new BufferedReader(new InputStreamReader(System.in));
var event = new StringBuilder();
String line;
@@ -143,15 +171,15 @@ public class SimpleConsole extends WebSocketClient {
final String current = line.trim();
if ("".equals(current)) {
- this.send(event.toString());
+ this.userSession.getBasicRemote().sendText(event.toString());
event = new StringBuilder();
} else {
event.append(current);
}
}
- thread.interrupt();
- this.close(CloseFrame.NORMAL);
+ this.userSession.close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, "Normal Closure"));
}
+
}
diff --git a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java
index 672594c52..8c7aec008 100644
--- a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java
+++ b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/SimpleEcho.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,20 +21,30 @@
package org.onap.policy.apex.tools.simple.wsclient;
+import jakarta.websocket.ClientEndpoint;
+import jakarta.websocket.CloseReason;
+import jakarta.websocket.CloseReason.CloseCodes;
+import jakarta.websocket.ContainerProvider;
+import jakarta.websocket.DeploymentException;
+import jakarta.websocket.OnClose;
+import jakarta.websocket.OnError;
+import jakarta.websocket.OnMessage;
+import jakarta.websocket.OnOpen;
+import jakarta.websocket.Session;
+import jakarta.websocket.WebSocketContainer;
+import java.io.IOException;
import java.io.PrintStream;
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.commons.lang3.Validate;
-import org.java_websocket.client.WebSocketClient;
-import org.java_websocket.framing.CloseFrame;
-import org.java_websocket.handshake.ServerHandshake;
/**
* Simple WS client as an echo.
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
-public class SimpleEcho extends WebSocketClient {
+@ClientEndpoint
+public class SimpleEcho {
/** Application name, used as prompt. */
private final String appName;
@@ -51,42 +62,54 @@ public class SimpleEcho extends WebSocketClient {
* @param outStream the stream for message output
* @param errStream the stream for error messages
* @throws URISyntaxException is URI could not be created from server/port settings
+ * @throws IOException on IO exceptions
+ * @throws DeploymentException on deployment exceptions
* @throws RuntimeException if server or port where blank
*/
public SimpleEcho(final String server, final String port, final String appName, PrintStream outStream,
- PrintStream errStream) throws URISyntaxException {
- super(new URI("ws://" + server + ":" + port));
+ PrintStream errStream) throws URISyntaxException, DeploymentException, IOException {
+
Validate.notBlank(appName, "SimpleEcho: given application name was blank");
-
+ WebSocketContainer container = ContainerProvider.getWebSocketContainer();
+ container.connectToServer(this, new URI("ws://" + server + ":" + port));
+
this.appName = appName;
this.outStream = outStream;
this.errStream = errStream;
}
- @Override
- public void onClose(final int code, final String reason, final boolean remote) {
- outStream.println(this.appName + ": Connection closed by " + (remote ? "APEX" : "me"));
+ /**
+ * Callback hook for Connection close events.
+ *
+ * @param userSession the userSession which is getting closed.
+ * @param reason the reason for connection close
+ */
+ @OnClose
+ public void onClose(Session userSession, CloseReason reason) {
+ outStream.println(this.appName + ": Connection closed");
outStream.print(" ==-->> ");
- switch (code) {
- case CloseFrame.NORMAL:
+
+ CloseCodes reasonCloseCode = CloseCodes.valueOf(reason.getCloseCode().toString());
+ switch (reasonCloseCode) {
+ case NORMAL_CLOSURE:
outStream.println("normal");
break;
- case CloseFrame.GOING_AWAY:
+ case GOING_AWAY:
outStream.println("APEX going away");
break;
- case CloseFrame.PROTOCOL_ERROR:
+ case PROTOCOL_ERROR:
outStream.println("some protocol error");
break;
- case CloseFrame.REFUSE:
+ case CANNOT_ACCEPT:
outStream.println("received unacceptable type of data");
break;
- case CloseFrame.NO_UTF8:
+ case CLOSED_ABNORMALLY:
outStream.println("expected UTF-8, found something else");
break;
- case CloseFrame.TOOBIG:
+ case TOO_BIG:
outStream.println("message too big");
break;
- case CloseFrame.UNEXPECTED_CONDITION:
+ case UNEXPECTED_CONDITION:
outStream.println("unexpected server condition");
break;
default:
@@ -96,13 +119,18 @@ public class SimpleEcho extends WebSocketClient {
outStream.print(" ==-->> " + reason);
}
- @Override
+ @OnError
public void onError(final Exception ex) {
errStream.println(this.appName + ": " + ex.getMessage());
}
- @Override
- public void onMessage(final String message) {
+ /**
+ * Callback hook for Message Events. This method will be invoked when a client send a message.
+ *
+ * @param message The text message
+ */
+ @OnMessage
+ public void onMessage(String message) {
outStream.println(this.appName + ": received");
outStream.println("---------------------------------");
outStream.println(message);
@@ -110,9 +138,13 @@ public class SimpleEcho extends WebSocketClient {
outStream.println();
}
- @Override
- public void onOpen(final ServerHandshake handshakedata) {
- outStream.println(this.appName + ": opened connection to APEX (" + handshakedata.getHttpStatusMessage() + ")");
+ /**
+ * Callback hook for Connection open events.
+ *
+ * @param userSession the userSession which is opened.
+ */
+ @OnOpen
+ public void onOpen(Session userSession) {
+ outStream.println(this.appName + ": opened connection to APEX (" + userSession.getRequestURI() + ")");
}
-
}
diff --git a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java
index e3af4dcc1..405013be4 100644
--- a/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java
+++ b/tools/simple-wsclient/src/main/java/org/onap/policy/apex/tools/simple/wsclient/WsClientMain.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +22,7 @@
package org.onap.policy.apex.tools.simple.wsclient;
+import jakarta.websocket.DeploymentException;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
@@ -141,8 +143,7 @@ public final class WsClientMain {
outStream.println();
try {
- final var simpleEcho = new SimpleEcho(server, port, APP_NAME, outStream, outStream);
- simpleEcho.connect();
+ new SimpleEcho(server, port, APP_NAME, outStream, outStream);
} catch (final URISyntaxException uex) {
String message = APP_NAME + ": URI exception, could not create URI from server and port settings";
outStream.println(message);
@@ -155,6 +156,18 @@ public final class WsClientMain {
String message = APP_NAME + ": illegal argument, server or port were blank";
outStream.println(message);
LOGGER.warn(message, iex);
+ } catch (DeploymentException dex) {
+ String message = APP_NAME + ": could not deploy client";
+ outStream.println(message);
+ LOGGER.warn(message, dex);
+ } catch (IOException iox) {
+ String message = APP_NAME + ": illegal argument, IO execption on client";
+ outStream.println(message);
+ LOGGER.warn(message, iox);
+ } catch (Exception xex) {
+ String message = APP_NAME + ": Unknown execption on client";
+ outStream.println(message);
+ LOGGER.warn(message, xex);
}
}
@@ -199,10 +212,18 @@ public final class WsClientMain {
String message = APP_NAME + ": not yet connected, connection to server took too long";
outStream.println(message);
LOGGER.warn(message, nex);
+ } catch (DeploymentException dex) {
+ String message = APP_NAME + ": could not deploy client";
+ outStream.println(message);
+ LOGGER.warn(message, dex);
} catch (final IOException ioe) {
String message = APP_NAME + ": IO exception, something went wrong on the standard input";
outStream.println(message);
LOGGER.warn(message, ioe);
+ } catch (Exception xex) {
+ String message = APP_NAME + ": Unknown execption on client";
+ outStream.println(message);
+ LOGGER.warn(message, xex);
}
}
diff --git a/tools/tools-common/pom.xml b/tools/tools-common/pom.xml
index 35990034d..71fcb3c27 100644
--- a/tools/tools-common/pom.xml
+++ b/tools/tools-common/pom.xml
@@ -17,12 +17,13 @@
SPDX-License-Identifier: Apache-2.0
============LICENSE_END=========================================================
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.policy.apex-pdp.tools</groupId>
<artifactId>tools</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.0.1-SNAPSHOT</version>
</parent>
<artifactId>tools-common</artifactId>
@@ -46,11 +47,6 @@
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/version.properties b/version.properties
index 4ba0a9a80..3288dcdc3 100644
--- a/version.properties
+++ b/version.properties
@@ -4,7 +4,7 @@
minor=3
minor=0
-patch=0
+patch=1
base_version=${major}.${minor}.${patch}