Update snapshot and/or references of policy/apex-pdp to latest snapshots
[policy/apex-pdp.git] / examples / examples-myfirstpolicy / pom.xml
1 <!--
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
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 -->
21 <project
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>
26   <parent>
27     <groupId>org.onap.policy.apex-pdp.examples</groupId>
28     <artifactId>examples</artifactId>
29     <version>3.1.3-SNAPSHOT</version>
30   </parent>
31
32   <artifactId>examples-myfirstpolicy</artifactId>
33   <name>${project.artifactId}</name>
34   <description>Specific code for the Apex MyFirstPolicy Example</description>
35
36   <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     <policymodel4.name>MyFirstPolicyModelAvro_0.0.1</policymodel4.name>
42   </properties>
43
44   <dependencies>
45     <dependency>
46       <groupId>org.onap.policy.apex-pdp.model</groupId>
47       <artifactId>model</artifactId>
48       <version>${project.version}</version>
49     </dependency>
50     <dependency>
51       <groupId>org.onap.policy.apex-pdp.core</groupId>
52       <artifactId>core</artifactId>
53       <version>${project.version}</version>
54       <scope>test</scope>
55     </dependency>
56     <dependency>
57       <groupId>org.onap.policy.apex-pdp.auth</groupId>
58       <artifactId>cli-editor</artifactId>
59       <version>${project.version}</version>
60     </dependency>
61     <dependency>
62       <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
63       <artifactId>plugins-executor-mvel</artifactId>
64       <version>${project.version}</version>
65       <scope>test</scope>
66     </dependency>
67     <dependency>
68       <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
69       <artifactId>plugins-executor-javascript</artifactId>
70       <version>${project.version}</version>
71       <scope>test</scope>
72     </dependency>
73   </dependencies>
74
75   <build>
76     <plugins>
77       <plugin>
78         <groupId>org.codehaus.mojo</groupId>
79         <artifactId>exec-maven-plugin</artifactId>
80         <executions>
81           <!-- Generate the APEX Policy JSON files from the APEX CLI command -->
82           <execution>
83             <id>generate-policy1m</id>
84             <phase>compile</phase>
85             <goals>
86               <goal>java</goal>
87             </goals>
88             <configuration>
89               <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
90               <classpathScope>compile</classpathScope>
91               <arguments>
92                 <argument>
93                   --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/1/${policymodel1m.name}.apex
94                 </argument>
95                 <argument>
96                   --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/1/${policymodel1m.name}.json
97                 </argument>
98                 <argument>
99                   --log-file=${project.build.directory}/${policymodel1m.name}_policygeneration.log
100                 </argument>
101                 <argument>--working-dir=${project.basedir}</argument>
102               </arguments>
103             </configuration>
104           </execution>
105           <execution>
106             <id>generate-policy1j</id>
107             <phase>compile</phase>
108             <goals>
109               <goal>java</goal>
110             </goals>
111             <configuration>
112               <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
113               <classpathScope>compile</classpathScope>
114               <arguments>
115                 <argument>
116                   --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/1/${policymodel1j.name}.apex
117                 </argument>
118                 <argument>
119                   --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/1/${policymodel1j.name}.json
120                 </argument>
121                 <argument>
122                   --log-file=${project.build.directory}/${policymodel1j.name}_policygeneration.log
123                 </argument>
124                 <argument>--working-dir=${project.basedir}</argument>
125               </arguments>
126             </configuration>
127           </execution>
128           <execution>
129             <id>generate-policy2</id>
130             <phase>compile</phase>
131             <goals>
132               <goal>java</goal>
133             </goals>
134             <configuration>
135               <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
136               <classpathScope>compile</classpathScope>
137               <arguments>
138                 <argument>
139                   --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/2/${policymodel2.name}.apex
140                 </argument>
141                 <argument>
142                   --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/2/${policymodel2.name}.json
143                 </argument>
144                 <argument>
145                   --log-file=${project.build.directory}/${policymodel2.name}_policygeneration.log
146                 </argument>
147                 <argument>--working-dir=${project.basedir}</argument>
148               </arguments>
149             </configuration>
150           </execution>
151           <execution>
152             <id>generate-policy3</id>
153             <phase>compile</phase>
154             <goals>
155               <goal>java</goal>
156             </goals>
157             <configuration>
158               <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
159               <classpathScope>compile</classpathScope>
160               <arguments>
161                 <argument>
162                   --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/3/${policymodel3.name}.apex
163                 </argument>
164                 <argument>
165                   --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/3/${policymodel3.name}.json
166                 </argument>
167                 <argument>
168                   --log-file=${project.build.directory}/${policymodel3.name}_policygeneration.log
169                 </argument>
170                 <argument>--working-dir=${project.basedir}</argument>
171               </arguments>
172             </configuration>
173           </execution>
174           <execution>
175             <id>generate-policy4</id>
176             <phase>compile</phase>
177             <goals>
178               <goal>java</goal>
179             </goals>
180             <configuration>
181               <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
182               <classpathScope>compile</classpathScope>
183               <arguments>
184                 <argument>
185                   --command-file=${project.basedir}/src/main/resources/examples/models/MyFirstPolicy/4/${policymodel4.name}.apex
186                 </argument>
187                 <argument>
188                   --output-model-file=${project.build.directory}/classes/examples/models/MyFirstPolicy/4/${policymodel4.name}.json
189                 </argument>
190                 <argument>
191                   --log-file=${project.build.directory}/${policymodel4.name}_policygeneration.log
192                 </argument>
193                 <argument>--working-dir=${project.basedir}</argument>
194               </arguments>
195             </configuration>
196           </execution>
197         </executions>
198       </plugin>
199     </plugins>
200   </build>
201 </project>