05b6ecfe3559ecfc3e756550bd394b59215c8ef8
[policy/apex-pdp.git] / examples / examples-decisionmaker / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2018 Ericsson. All rights reserved.
4    Copyright (C) 2019 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22     <modelVersion>4.0.0</modelVersion>
23     <parent>
24         <groupId>org.onap.policy.apex-pdp.examples</groupId>
25         <artifactId>examples</artifactId>
26         <version>2.9.1-SNAPSHOT</version>
27     </parent>
28
29     <artifactId>examples-decisionmaker</artifactId>
30     <name>${project.artifactId}</name>
31     <description>Specific code for the APEX Decision Maker Example</description>
32
33     <properties>
34         <policymodel.decisionmaker.name>DecisionMakerPolicyModel</policymodel.decisionmaker.name>
35         <policymodel.healthcheck.name>HealthCheckPolicyModel</policymodel.healthcheck.name>
36         <apex-domains-decisionmaker-dir>${project.basedir}/src</apex-domains-decisionmaker-dir>
37     </properties>
38
39     <dependencies>
40         <dependency>
41             <groupId>org.onap.policy.apex-pdp.auth</groupId>
42             <artifactId>cli-editor</artifactId>
43             <version>${project.version}</version>
44         </dependency>
45         <dependency>
46             <groupId>org.onap.policy.apex-pdp.services</groupId>
47             <artifactId>services-engine</artifactId>
48             <version>${project.version}</version>
49             <scope>test</scope>
50         </dependency>
51         <dependency>
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>
55         </dependency>
56         <dependency>
57             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
58             <artifactId>plugins-executor-javascript</artifactId>
59             <version>${project.version}</version>
60         </dependency>
61         <dependency>
62             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
63             <artifactId>plugins-event-carrier-restserver</artifactId>
64             <version>${project.version}</version>
65         </dependency>
66     </dependencies>
67
68     <build>
69         <plugins>
70             <!-- Generate the APEX Policy JSON from the APEX CLI command -->
71             <plugin>
72                 <groupId>org.codehaus.mojo</groupId>
73                 <artifactId>exec-maven-plugin</artifactId>
74                 <executions>
75                     <execution>
76                         <id>generate-decisionmaker-policy</id>
77                         <phase>compile</phase>
78                         <goals>
79                             <goal>java</goal>
80                         </goals>
81                         <configuration>
82                             <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
83                             <classpathScope>compile</classpathScope>
84                             <arguments>
85                                 <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.decisionmaker.name}.apex</argument>
86                                 <argument>--output-model-file=${project.build.directory}/classes/${policymodel.decisionmaker.name}.json</argument>
87                                 <argument>--log-file=${project.build.directory}/${policymodel.decisionmaker.name}_policygeneration.log</argument>
88                                 <argument>--working-dir=${project.basedir}</argument>
89                             </arguments>
90                         </configuration>
91                     </execution>
92                     <execution>
93                         <id>generate-healthcheck-policy</id>
94                         <phase>compile</phase>
95                         <goals>
96                             <goal>java</goal>
97                         </goals>
98                         <configuration>
99                             <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
100                             <classpathScope>compile</classpathScope>
101                             <arguments>
102                                 <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.healthcheck.name}.apex</argument>
103                                 <argument>--output-model-file=${project.build.directory}/classes/${policymodel.healthcheck.name}.json</argument>
104                                 <argument>--log-file=${project.build.directory}/${policymodel.healthcheck.name}_policygeneration.log</argument>
105                                 <argument>--working-dir=${project.basedir}</argument>
106                             </arguments>
107                         </configuration>
108                     </execution>
109                 </executions>
110             </plugin>
111         </plugins>
112     </build>
113 </project>