blob: c45267b556b907543089839c1b10c1fb5ddd3195 [file] [log] [blame]
ramverma3d025432018-07-19 18:45:16 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (C) 2018 Ericsson. All rights reserved.
liamfallonf0fd9642022-02-11 00:43:14 +00004 Modifications Copyright (C) 2020,2022 Nordix Foundation.
ramverma3d025432018-07-19 18:45:16 +01005 ================================================================================
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
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
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.
17
18 SPDX-License-Identifier: Apache-2.0
19 ============LICENSE_END=========================================================
20-->
liamfallon755eb9d2020-01-22 12:11:11 +000021<project
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010022 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>
26 <parent>
27 <groupId>org.onap.policy.apex-pdp.examples</groupId>
28 <artifactId>examples</artifactId>
liamfallona54acdf2022-12-15 16:19:41 +000029 <version>2.9.1-SNAPSHOT</version>
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010030 </parent>
ramverma3d025432018-07-19 18:45:16 +010031
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010032 <artifactId>examples-myfirstpolicy</artifactId>
33 <name>${project.artifactId}</name>
34 <description>Specific code for the Apex MyFirstPolicy Example</description>
ramverma3d025432018-07-19 18:45:16 +010035
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010036 <properties>
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>
41 </properties>
ramverma3d025432018-07-19 18:45:16 +010042
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010043 <dependencies>
44 <dependency>
45 <groupId>org.onap.policy.apex-pdp.model</groupId>
liamfallon85347562022-02-10 12:06:25 +000046 <artifactId>model</artifactId>
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010047 <version>${project.version}</version>
48 </dependency>
49 <dependency>
50 <groupId>org.onap.policy.apex-pdp.core</groupId>
liamfallonf0fd9642022-02-11 00:43:14 +000051 <artifactId>core</artifactId>
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010052 <version>${project.version}</version>
53 <scope>test</scope>
54 </dependency>
55 <dependency>
56 <groupId>org.onap.policy.apex-pdp.auth</groupId>
57 <artifactId>cli-editor</artifactId>
58 <version>${project.version}</version>
59 </dependency>
60 <dependency>
61 <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
62 <artifactId>plugins-executor-mvel</artifactId>
63 <version>${project.version}</version>
64 <scope>test</scope>
65 </dependency>
66 <dependency>
67 <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
68 <artifactId>plugins-executor-javascript</artifactId>
69 <version>${project.version}</version>
70 <scope>test</scope>
71 </dependency>
72 </dependencies>
ramverma3d025432018-07-19 18:45:16 +010073
aditya.puthuparambil42cd61a2020-04-01 13:20:53 +010074 <build>
75 <plugins>
76 <plugin>
77 <groupId>org.codehaus.mojo</groupId>
78 <artifactId>exec-maven-plugin</artifactId>
79 <executions>
80 <!-- Generate the APEX Policy JSON files from the APEX CLI command -->
81 <execution>
82 <id>generate-policy1m</id>
83 <phase>compile</phase>
84 <goals>
85 <goal>java</goal>
86 </goals>
87 <configuration>
88 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
89 <classpathScope>compile</classpathScope>
90 <arguments>
91 <argument>
92 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/1/${policymodel1m.name}.apex
93 </argument>
94 <argument>
95 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/1/${policymodel1m.name}.json
96 </argument>
97 <argument>
98 --log-file=${project.build.directory}/${policymodel1m.name}_policygeneration.log
99 </argument>
100 <argument>--working-dir=${project.basedir}</argument>
101 </arguments>
102 </configuration>
103 </execution>
104 <execution>
105 <id>generate-policy1j</id>
106 <phase>compile</phase>
107 <goals>
108 <goal>java</goal>
109 </goals>
110 <configuration>
111 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
112 <classpathScope>compile</classpathScope>
113 <arguments>
114 <argument>
115 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/1/${policymodel1j.name}.apex
116 </argument>
117 <argument>
118 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/1/${policymodel1j.name}.json
119 </argument>
120 <argument>
121 --log-file=${project.build.directory}/${policymodel1j.name}_policygeneration.log
122 </argument>
123 <argument>--working-dir=${project.basedir}</argument>
124 </arguments>
125 </configuration>
126 </execution>
127 <execution>
128 <id>generate-policy2</id>
129 <phase>compile</phase>
130 <goals>
131 <goal>java</goal>
132 </goals>
133 <configuration>
134 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
135 <classpathScope>compile</classpathScope>
136 <arguments>
137 <argument>
138 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/2/${policymodel2.name}.apex
139 </argument>
140 <argument>
141 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/2/${policymodel2.name}.json
142 </argument>
143 <argument>
144 --log-file=${project.build.directory}/${policymodel2.name}_policygeneration.log
145 </argument>
146 <argument>--working-dir=${project.basedir}</argument>
147 </arguments>
148 </configuration>
149 </execution>
150 <execution>
151 <id>generate-policy3</id>
152 <phase>compile</phase>
153 <goals>
154 <goal>java</goal>
155 </goals>
156 <configuration>
157 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
158 <classpathScope>compile</classpathScope>
159 <arguments>
160 <argument>
161 --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/3/${policymodel3.name}.apex
162 </argument>
163 <argument>
164 --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/3/${policymodel3.name}.json
165 </argument>
166 <argument>
167 --log-file=${project.build.directory}/${policymodel3.name}_policygeneration.log
168 </argument>
169 <argument>--working-dir=${project.basedir}</argument>
170 </arguments>
171 </configuration>
172 </execution>
173 </executions>
174 </plugin>
175 </plugins>
176 </build>
a.sreekumarf1f9a302020-03-25 23:01:06 +0000177</project>