blob: 64b7e6f5eb033461e42c8ecc467a7055f43c32eb [file] [log] [blame]
ramvermad524ced2018-07-24 17:36:53 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (C) 2018 Ericsson. All rights reserved.
liamfalloncff079a2019-01-09 14:30:23 +01004 Copyright (C) 2019 Nordix Foundation.
ramvermad524ced2018-07-24 17:36:53 +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-->
liamfallon3aa7cbe2018-10-31 16:35:54 +000021<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">
ramvermad524ced2018-07-24 17:36:53 +010022 <modelVersion>4.0.0</modelVersion>
23 <parent>
24 <groupId>org.onap.policy.apex-pdp.examples</groupId>
25 <artifactId>examples</artifactId>
liamfallon3aa7cbe2018-10-31 16:35:54 +000026 <version>2.1.0-SNAPSHOT</version>
ramvermad524ced2018-07-24 17:36:53 +010027 </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>
liamfallon1dff5eb2018-12-19 17:48:47 +000034 <policymodel.decisionmaker.name>DecisionMakerPolicyModel</policymodel.decisionmaker.name>
35 <policymodel.healthcheck.name>HealthCheckPolicyModel</policymodel.healthcheck.name>
ramvermad524ced2018-07-24 17:36:53 +010036 <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>
liamfalloncff079a2019-01-09 14:30:23 +010045 <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>
ramvermad524ced2018-07-24 17:36:53 +010078 </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>
liamfallon1dff5eb2018-12-19 17:48:47 +000088 <id>generate-decisionmaker-policy</id>
ramvermad524ced2018-07-24 17:36:53 +010089 <phase>compile</phase>
90 <goals>
91 <goal>java</goal>
92 </goals>
93 <configuration>
liamfallon4cfa2e22018-09-13 15:25:32 +010094 <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
ramvermad524ced2018-07-24 17:36:53 +010095 <classpathScope>compile</classpathScope>
96 <arguments>
liamfallon1dff5eb2018-12-19 17:48:47 +000097 <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>
ramvermad524ced2018-07-24 17:36:53 +0100117 <argument>--working-dir=${project.basedir}</argument>
118 </arguments>
119 </configuration>
120 </execution>
121 </executions>
122 </plugin>
123 </plugins>
124 </build>
Dinh Danh Le6a2abc82018-08-23 00:41:47 +0100125
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>
ramvermad524ced2018-07-24 17:36:53 +0100145</project>