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