summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-08-10 16:58:48 +0100
committeradheli.tavares <adheli.tavares@est.tech>2023-09-22 16:01:00 +0100
commita3a032d5b902c3e125dccd2bc2b41f22861decc1 (patch)
tree481b0faa916f39da096fe5c935c630b1598f0f7d /examples
parent097618956f681eee12a23d7d9dc4f4f22f5347cc (diff)
Java 17 Upgrade
Updated dependencies to latest versions Made Java 17 changes Moved apex dependencies versions to main apex pom Issue-ID: POLICY-4675 Change-Id: Ia5cd5670a1f024f5402cbd7371162ce3313930ef Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'examples')
-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
18 files changed, 323 insertions, 292 deletions
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>