2 ============LICENSE_START=======================================================
3 Copyright (C) 2018 Ericsson. All rights reserved.
4 Modifications Copyright (C) 2020,2022 Nordix Foundation.
5 ================================================================================
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
18 SPDX-License-Identifier: Apache-2.0
19 ============LICENSE_END=========================================================
22 xmlns="http://maven.apache.org/POM/4.0.0"
23 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>2.9.3-SNAPSHOT</version>
32 <artifactId>examples-myfirstpolicy</artifactId>
33 <name>${project.artifactId}</name>
34 <description>Specific code for the Apex MyFirstPolicy Example</description>
37 <policymodel1m.name>MyFirstPolicyModelMvel_0.0.1</policymodel1m.name>
38 <policymodel1j.name>MyFirstPolicyModelJavascript_0.0.1</policymodel1j.name>
39 <policymodel2.name>MyFirstPolicyModel_0.0.1</policymodel2.name>
40 <policymodel3.name>MyFirstPolicyModelSFL_0.0.1</policymodel3.name>
45 <groupId>org.onap.policy.apex-pdp.model</groupId>
46 <artifactId>model</artifactId>
47 <version>${project.version}</version>
50 <groupId>org.onap.policy.apex-pdp.core</groupId>
51 <artifactId>core</artifactId>
52 <version>${project.version}</version>
56 <groupId>org.onap.policy.apex-pdp.auth</groupId>
57 <artifactId>cli-editor</artifactId>
58 <version>${project.version}</version>
61 <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
62 <artifactId>plugins-executor-mvel</artifactId>
63 <version>${project.version}</version>
67 <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
68 <artifactId>plugins-executor-javascript</artifactId>
69 <version>${project.version}</version>
77 <groupId>org.codehaus.mojo</groupId>
78 <artifactId>exec-maven-plugin</artifactId>
80 <!-- Generate the APEX Policy JSON files from the APEX CLI command -->
82 <id>generate-policy1m</id>
83 <phase>compile</phase>
88 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
89 <classpathScope>compile</classpathScope>
92 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/1/${policymodel1m.name}.apex
95 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/1/${policymodel1m.name}.json
98 --log-file=${project.build.directory}/${policymodel1m.name}_policygeneration.log
100 <argument>--working-dir=${project.basedir}</argument>
105 <id>generate-policy1j</id>
106 <phase>compile</phase>
111 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
112 <classpathScope>compile</classpathScope>
115 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/1/${policymodel1j.name}.apex
118 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/1/${policymodel1j.name}.json
121 --log-file=${project.build.directory}/${policymodel1j.name}_policygeneration.log
123 <argument>--working-dir=${project.basedir}</argument>
128 <id>generate-policy2</id>
129 <phase>compile</phase>
134 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
135 <classpathScope>compile</classpathScope>
138 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/2/${policymodel2.name}.apex
141 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/2/${policymodel2.name}.json
144 --log-file=${project.build.directory}/${policymodel2.name}_policygeneration.log
146 <argument>--working-dir=${project.basedir}</argument>
151 <id>generate-policy3</id>
152 <phase>compile</phase>
157 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
158 <classpathScope>compile</classpathScope>
161 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/3/${policymodel3.name}.apex
164 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/3/${policymodel3.name}.json
167 --log-file=${project.build.directory}/${policymodel3.name}_policygeneration.log
169 <argument>--working-dir=${project.basedir}</argument>