Merge "ApexPDP: Adding support to omit the (context) albums entry in an apex policy...
[policy/apex-pdp.git] / examples / examples-myfirstpolicy / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2018 Ericsson. All rights reserved.
4   ================================================================================
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16
17   SPDX-License-Identifier: Apache-2.0
18   ============LICENSE_END=========================================================
19 -->
20 <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">
21     <modelVersion>4.0.0</modelVersion>
22     <parent>
23         <groupId>org.onap.policy.apex-pdp.examples</groupId>
24         <artifactId>examples</artifactId>
25         <version>2.2.1-SNAPSHOT</version>
26     </parent>
27
28     <artifactId>examples-myfirstpolicy</artifactId>
29     <name>${project.artifactId}</name>
30     <description>Specific code for the Apex MyFirstPolicy Example</description>
31
32     <properties>
33         <apex-domains-myfirstpolicy-dir>${project.basedir}/src</apex-domains-myfirstpolicy-dir>
34     </properties>
35
36     <dependencies>
37         <dependency>
38             <groupId>org.onap.policy.apex-pdp.model</groupId>
39             <artifactId>policy-model</artifactId>
40             <version>${project.version}</version>
41         </dependency>
42         <dependency>
43             <groupId>org.onap.policy.apex-pdp.core</groupId>
44             <artifactId>core-engine</artifactId>
45             <version>${project.version}</version>
46             <scope>test</scope>
47         </dependency>
48         <dependency>
49             <groupId>org.onap.policy.apex-pdp.core</groupId>
50             <artifactId>core-infrastructure</artifactId>
51             <version>${project.version}</version>
52             <scope>test</scope>
53         </dependency>
54         <dependency>
55             <groupId>org.onap.policy.apex-pdp.auth</groupId>
56             <artifactId>cli-editor</artifactId>
57             <version>${project.version}</version>
58             <scope>test</scope>
59         </dependency>
60         <dependency>
61             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
62             <artifactId>plugins-executor-mvel</artifactId>
63             <version>${project.version}</version>
64             <scope>test</scope>
65         </dependency>
66         <dependency>
67             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
68             <artifactId>plugins-executor-javascript</artifactId>
69             <version>${project.version}</version>
70             <scope>test</scope>
71         </dependency>
72     </dependencies>
73
74     <build>
75         <plugins>
76             <plugin>
77                 <groupId>org.codehaus.mojo</groupId>
78                 <artifactId>exec-maven-plugin</artifactId>
79                 <executions>
80                     <execution>
81                         <id>generate-models</id>
82                         <phase>process-classes</phase>
83                         <goals>
84                             <goal>exec</goal>
85                         </goals>
86                         <configuration>
87                             <executable>java</executable>
88                             <arguments>
89                                 <argument>-classpath</argument>
90                                 <!-- automatically creates the classpath using all project dependencies, 
91                                     also adding the project build directory -->
92                                 <classpath />
93                                 <argument>org.onap.policy.apex.examples.myfirstpolicy.model.MfpDomainModelSaver</argument>
94                                 <argument>${project.build.directory}/classes/examples/models/MyFirstPolicy</argument>
95                             </arguments>
96                         </configuration>
97                     </execution>
98                 </executions>
99             </plugin>
100         </plugins>
101     </build>
102
103     <profiles>
104         <profile>
105             <id>apexSite</id>
106             <activation>
107                 <property>
108                     <name>apexSite</name>
109                 </property>
110             </activation>
111             <properties>
112                 <adsite-examples-myfirstpolicy-dir>${project.basedir}/src</adsite-examples-myfirstpolicy-dir>
113             </properties>
114             <distributionManagement>
115                 <site>
116                     <id>${project.artifactId}-site</id>
117                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
118                 </site>
119             </distributionManagement>
120             <build>
121                 <plugins>
122                     <plugin>
123                         <groupId>org.apache.maven.plugins</groupId>
124                         <artifactId>maven-resources-plugin</artifactId>
125                         <version>3.0.2</version>
126                         <executions>
127                             <execution>
128                                 <id>copy-domain-mfp-images</id>
129                                 <phase>initialize</phase>
130                                 <goals>
131                                     <goal>copy-resources</goal>
132                                 </goals>
133                                 <configuration>
134                                     <resources>
135                                         <resource>
136                                             <directory>${project.basedir}/src/site-docs/adoc/resources/images</directory>
137                                             <includes>
138                                                 <include>**/*.jpg</include>
139                                                 <include>**/*.png</include>
140                                             </includes>
141                                         </resource>
142                                     </resources>
143                                     <outputDirectory>${project.build.directory}/site/images</outputDirectory>
144                                 </configuration>
145                             </execution>
146                         </executions>
147                     </plugin>
148                 </plugins>
149             </build>
150         </profile>
151     </profiles>
152 </project>