1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
4 Copyright (C) 2020 Nordix Foundation.
5 Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
6 Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
20 SPDX-License-Identifier: Apache-2.0
21 ============LICENSE_END=========================================================
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25 <modelVersion>4.0.0</modelVersion>
27 <groupId>org.onap.policy.apex-pdp.examples</groupId>
28 <artifactId>examples</artifactId>
29 <version>3.0.2-SNAPSHOT</version>
31 <artifactId>examples-grpc</artifactId>
32 <name>examples-grpc</name>
33 <description>Specific code for the APEX gRPC Example</description>
35 <policymodel.name>APEXgRPCPolicy</policymodel.name>
36 <toscapolicy.name>APEXgRPCToscaPolicy</toscapolicy.name>
37 <!-- Update the required node type value for generating a node template -->
38 <nodeType.name>org.onap.nodetypes.policy.MetadataSet</nodeType.name>
42 <groupId>org.onap.policy.apex-pdp.auth</groupId>
43 <artifactId>cli-editor</artifactId>
44 <version>${project.version}</version>
47 <groupId>org.onap.policy.apex-pdp.services</groupId>
48 <artifactId>services-engine</artifactId>
49 <version>${project.version}</version>
52 <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
53 <artifactId>plugins-context-schema-avro</artifactId>
54 <version>${project.version}</version>
57 <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
58 <artifactId>plugins-context-schema-json</artifactId>
59 <version>${project.version}</version>
62 <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
63 <artifactId>plugins-executor-javascript</artifactId>
64 <version>${project.version}</version>
67 <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
68 <artifactId>plugins-event-carrier-grpc</artifactId>
69 <version>${project.version}</version>
72 <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
73 <artifactId>plugins-event-carrier-restclient</artifactId>
74 <version>${project.version}</version>
77 <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
78 <artifactId>events</artifactId>
79 <version>${version.policy.models}</version>
82 <groupId>org.onap.policy.models.policy-models-interactions</groupId>
83 <artifactId>simulators</artifactId>
84 <version>${version.policy.models}</version>
87 <groupId>org.onap.policy.common</groupId>
88 <artifactId>policy-endpoints</artifactId>
94 <groupId>org.apache.maven.plugins</groupId>
95 <artifactId>maven-surefire-plugin</artifactId>
97 <argLine>-Xss1m</argLine>
101 <groupId>org.codehaus.mojo</groupId>
102 <artifactId>exec-maven-plugin</artifactId>
104 <!-- Generate the APEX Policy JSON from the APEX CLI command -->
106 <id>generate-policy</id>
107 <phase>compile</phase>
112 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
113 <classpathScope>compile</classpathScope>
116 --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
119 --output-model-file=${project.build.directory}/classes/${policymodel.name}.json
122 --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
124 <argument>--working-dir=${project.basedir}</argument>
128 <!-- Generate the APEX ToscaPolicy JSON file-->
130 <id>generate-tosca-policy</id>
131 <phase>compile</phase>
136 <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
137 <classpathScope>compile</classpathScope>
140 --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
143 --output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.json
146 --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
149 --apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json
152 --tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json
157 <!-- Generate Tosca policy with metadataSet reference and a node template json file with policy model -->
159 <id>generate-tosca-policy-metadataSet</id>
160 <phase>compile</phase>
165 <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
166 <classpathScope>compile</classpathScope>
169 --command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex
172 --output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.metadataSet.json
175 --log-file=${project.build.directory}/${policymodel.name}_policygeneration.log
178 --apex-config-file=${project.basedir}/src/main/resources/examples/config/APEXgRPC/ApexConfig.json
181 --tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json
183 <argument>--node-type=${nodeType.name}</argument>
185 --output-node-template-file=${project.build.directory}/classes/${toscapolicy.name}.nodeTemplate.json