Sonar/Checkstyle in service/plugins
[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"
21     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.0.0-SNAPSHOT</version>
27     </parent>
28
29     <artifactId>examples-myfirstpolicy</artifactId>
30     <name>${project.artifactId}</name>
31     <description>Specific code for the Apex MyFirstPolicy Example</description>
32
33     <properties>
34         <apex-domains-myfirstpolicy-dir>${project.basedir}/src</apex-domains-myfirstpolicy-dir>
35     </properties>
36
37     <dependencies>
38         <dependency>
39             <groupId>org.onap.policy.apex-pdp.model</groupId>
40             <artifactId>policy-model</artifactId>
41             <version>${project.version}</version>
42         </dependency>
43         <dependency>
44             <groupId>org.onap.policy.apex-pdp.core</groupId>
45             <artifactId>core-engine</artifactId>
46             <version>${project.version}</version>
47             <scope>test</scope>
48         </dependency>
49         <dependency>
50             <groupId>org.onap.policy.apex-pdp.core</groupId>
51             <artifactId>core-infrastructure</artifactId>
52             <version>${project.version}</version>
53             <scope>test</scope>
54         </dependency>
55         <dependency>
56             <groupId>org.onap.policy.apex-pdp.auth</groupId>
57             <artifactId>cli-editor</artifactId>
58             <version>${project.version}</version>
59             <scope>test</scope>
60         </dependency>
61         <dependency>
62             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
63             <artifactId>plugins-executor-mvel</artifactId>
64             <version>${project.version}</version>
65             <scope>test</scope>
66         </dependency>
67         <dependency>
68             <groupId>org.onap.policy.apex-pdp.plugins.plugins-executor</groupId>
69             <artifactId>plugins-executor-javascript</artifactId>
70             <version>${project.version}</version>
71             <scope>test</scope>
72         </dependency>
73         <dependency>
74             <groupId>org.apache.derby</groupId>
75             <artifactId>derby</artifactId>
76             <version>${version.derby}</version>
77             <scope>test</scope>
78         </dependency>
79     </dependencies>
80
81     <build>
82         <plugins>
83             <plugin>
84                 <groupId>org.codehaus.mojo</groupId>
85                 <artifactId>exec-maven-plugin</artifactId>
86                 <executions>
87                     <execution>
88                         <id>generate-models</id>
89                         <phase>process-classes</phase>
90                         <goals>
91                             <goal>exec</goal>
92                         </goals>
93                         <configuration>
94                             <executable>java</executable>
95                             <arguments>
96                                 <argument>-classpath</argument>
97                                 <!-- automatically creates the classpath using all project dependencies, 
98                                     also adding the project build directory -->
99                                 <classpath />
100                                 <argument>org.onap.policy.apex.examples.myfirstpolicy.model.MfpDomainModelSaver</argument>
101                                 <argument>${project.build.directory}/classes/examples/models/MyFirstPolicy</argument>
102                             </arguments>
103                         </configuration>
104                     </execution>
105                 </executions>
106             </plugin>
107         </plugins>
108     </build>
109
110     <profiles>
111         <profile>
112             <id>apexSite</id>
113             <activation>
114                 <property>
115                     <name>apexSite</name>
116                 </property>
117             </activation>
118             <properties>
119                 <adsite-examples-myfirstpolicy-dir>${project.basedir}/src</adsite-examples-myfirstpolicy-dir>
120             </properties>
121             <distributionManagement>
122                 <site>
123                     <id>${project.artifactId}-site</id>
124                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
125                 </site>
126             </distributionManagement>
127             <build>
128                 <plugins>
129                     <plugin>
130                         <groupId>org.apache.maven.plugins</groupId>
131                         <artifactId>maven-resources-plugin</artifactId>
132                         <version>3.0.2</version>
133                         <executions>
134                             <execution>
135                                 <id>copy-domain-mfp-images</id>
136                                 <phase>initialize</phase>
137                                 <goals>
138                                     <goal>copy-resources</goal>
139                                 </goals>
140                                 <configuration>
141                                     <resources>
142                                         <resource>
143                                             <directory>${project.basedir}/src/site-docs/adoc/resources/images</directory>
144                                             <includes>
145                                                 <include>**/*.jpg</include>
146                                                 <include>**/*.png</include>
147                                             </includes>
148                                         </resource>
149                                     </resources>
150                                     <outputDirectory>${project.build.directory}/site/images</outputDirectory>
151                                 </configuration>
152                             </execution>
153                         </executions>
154                     </plugin>
155                 </plugins>
156             </build>
157         </profile>
158     </profiles>
159 </project>