Use updated APPC model code in apex vcpe example
[policy/apex-pdp.git] / examples / examples-onap-vcpe / 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"
22     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24     <parent>
25         <groupId>org.onap.policy.apex-pdp.examples</groupId>
26         <artifactId>examples</artifactId>
27         <version>2.3.0-SNAPSHOT</version>
28     </parent>
29
30     <artifactId>examples-onap-vcpe</artifactId>
31     <name>${project.artifactId}</name>
32     <description>Specific code for the APEX ONAP vCPE Example</description>
33
34     <properties>
35         <policymodel.name>ONAPvCPEPolicyModel</policymodel.name>
36         <toscapolicy.name>ONAPvCPEToscaPolicy</toscapolicy.name>
37         <apex-domains-onap-vcpe-dir>${project.basedir}/src</apex-domains-onap-vcpe-dir>
38     </properties>
39
40     <dependencies>
41         <dependency>
42             <groupId>org.onap.policy.apex-pdp.auth</groupId>
43             <artifactId>cli-editor</artifactId>
44             <version>${project.version}</version>
45         </dependency>
46         <dependency>
47             <groupId>org.onap.policy.apex-pdp.services</groupId>
48             <artifactId>services-engine</artifactId>
49             <version>${project.version}</version>
50             <scope>test</scope>
51         </dependency>
52         <dependency>
53             <groupId>org.glassfish.jersey.inject</groupId>
54             <artifactId>jersey-hk2</artifactId>
55             <version>${version.jersey}</version>
56             <scope>test</scope>
57         </dependency>
58         <dependency>
59             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
60             <artifactId>plugins-context-schema-avro</artifactId>
61             <version>${project.version}</version>
62         </dependency>
63         <dependency>
64             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
65             <artifactId>plugins-executor-javascript</artifactId>
66             <version>${project.version}</version>
67         </dependency>
68         <dependency>
69             <groupId>org.onap.policy.apex-pdp.plugins.plugins-event.plugins-event-carrier</groupId>
70             <artifactId>plugins-event-carrier-restrequestor</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-restclient</artifactId>
76             <version>${project.version}</version>
77         </dependency>
78         <dependency>
79             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
80             <artifactId>aai</artifactId>
81             <version>${version.policy.models}</version>
82         </dependency>
83         <dependency>
84             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
85             <artifactId>appclcm</artifactId>
86             <version>${version.policy.models}</version>
87         </dependency>
88         <dependency>
89             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
90             <artifactId>events</artifactId>
91             <version>${version.policy.models}</version>
92         </dependency>
93         <dependency>
94             <groupId>org.onap.policy.common</groupId>
95             <artifactId>policy-endpoints</artifactId>
96             <scope>test</scope>
97         </dependency>
98     </dependencies>
99
100     <build>
101         <plugins>
102             <!-- Generate the APEX Policy JSON from the APEX CLI command -->
103             <plugin>
104                 <groupId>org.codehaus.mojo</groupId>
105                 <artifactId>exec-maven-plugin</artifactId>
106                 <executions>
107                     <execution>
108                         <id>generate-policy</id>
109                         <phase>compile</phase>
110                         <goals>
111                             <goal>java</goal>
112                         </goals>
113                         <configuration>
114                             <mainClass>org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain</mainClass>
115                             <classpathScope>compile</classpathScope>
116                             <arguments>
117                                 <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
118                                 <argument>--output-model-file=${project.build.directory}/classes/${policymodel.name}.json</argument>
119                                 <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
120                                 <argument>--working-dir=${project.basedir}</argument>
121                             </arguments>
122                         </configuration>
123                     </execution>
124                 </executions>
125             </plugin>
126             <!-- Generate the APEX ToscaPolicy JSON file-->
127             <plugin>
128                 <groupId>org.codehaus.mojo</groupId>
129                 <artifactId>exec-maven-plugin</artifactId>
130                 <executions>
131                     <execution>
132                         <id>generate-tosca-policy</id>
133                         <phase>compile</phase>
134                         <goals>
135                             <goal>java</goal>
136                         </goals>
137                         <configuration>
138                             <mainClass>org.onap.policy.apex.auth.clieditor.tosca.ApexCliToscaEditorMain</mainClass>
139                             <classpathScope>compile</classpathScope>
140                             <arguments>
141                                 <argument>--command-file=${project.basedir}/src/main/resources/policy/${policymodel.name}.apex</argument>
142                                 <argument>--output-tosca-file=${project.build.directory}/classes/${toscapolicy.name}.json</argument>
143                                 <argument>--log-file=${project.build.directory}/${policymodel.name}_policygeneration.log</argument>
144                                 <argument>--apex-config-file=${project.basedir}/src/main/resources/examples/config/ONAPvCPE/ApexConfig.json</argument>
145                                 <argument>--tosca-template-file=${project.basedir}/src/main/resources/tosca/ToscaTemplate.json</argument>
146                             </arguments>
147                         </configuration>
148                     </execution>
149                 </executions>
150             </plugin>
151         </plugins>
152     </build>
153
154     <profiles>
155         <profile>
156             <id>apexSite</id>
157             <activation>
158                 <property>
159                     <name>apexSite</name>
160                 </property>
161             </activation>
162             <properties>
163                 <adsite-examples-onap-vcpe-dir>${project.basedir}/src</adsite-examples-onap-vcpe-dir>
164             </properties>
165             <distributionManagement>
166                 <site>
167                     <id>${project.artifactId}-site</id>
168                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
169                 </site>
170             </distributionManagement>
171         </profile>
172     </profiles>
173 </project>