Fix context clearing on model upgrade
[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.1.0-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.glassfish.jersey.containers</groupId>
53             <artifactId>jersey-container-grizzly2-http</artifactId>
54             <version>${version.jersey}</version>
55             <scope>test</scope>
56         </dependency>
57          <dependency>
58             <groupId>org.glassfish.jersey.inject</groupId>
59             <artifactId>jersey-hk2</artifactId>
60             <version>${version.jersey}</version>
61             <scope>test</scope>
62         </dependency>
63         <dependency>
64             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
65             <artifactId>plugins-context-schema-avro</artifactId>
66             <version>${project.version}</version>
67         </dependency>
68         <dependency>
69             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
70             <artifactId>plugins-executor-javascript</artifactId>
71             <version>${project.version}</version>
72         </dependency>
73         <dependency>
74             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
75             <artifactId>plugins-event-carrier-restserver</artifactId>
76             <version>${project.version}</version>
77         </dependency>
78     </dependencies>
79
80     <build>
81         <plugins>
82             <!-- Generate the APEX Policy JSON from the APEX CLI command -->
83             <plugin>
84                 <groupId>org.codehaus.mojo</groupId>
85                 <artifactId>exec-maven-plugin</artifactId>
86                 <executions>
87                     <execution>
88                         <id>generate-decisionmaker-policy</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>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.decisionmaker.name}.apex</argument>
98                                 <argument>--output-model-file=${project.build.directory}/classes/${policymodel.decisionmaker.name}.json</argument>
99                                 <argument>--log-file=${project.build.directory}/${policymodel.decisionmaker.name}_policygeneration.log</argument>
100                                 <argument>--working-dir=${project.basedir}</argument>
101                             </arguments>
102                         </configuration>
103                     </execution>
104                     <execution>
105                         <id>generate-healthcheck-policy</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>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.healthcheck.name}.apex</argument>
115                                 <argument>--output-model-file=${project.build.directory}/classes/${policymodel.healthcheck.name}.json</argument>
116                                 <argument>--log-file=${project.build.directory}/${policymodel.healthcheck.name}_policygeneration.log</argument>
117                                 <argument>--working-dir=${project.basedir}</argument>
118                             </arguments>
119                         </configuration>
120                     </execution>
121                 </executions>
122             </plugin>
123         </plugins>
124     </build>
125
126     <profiles>
127         <profile>
128             <id>apexSite</id>
129             <activation>
130                 <property>
131                     <name>apexSite</name>
132                 </property>
133             </activation>
134             <properties>
135                 <adsite-examples-decisionmaker-dir>${project.basedir}/src</adsite-examples-decisionmaker-dir>
136             </properties>
137             <distributionManagement>
138                 <site>
139                     <id>${project.artifactId}-site</id>
140                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
141                 </site>
142             </distributionManagement>
143         </profile>
144     </profiles>
145 </project>