ceddf0eb740b107b4c9137ce397910b03849903c
[policy/models.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4    Copyright (C) 2018 Ericsson. All rights reserved.
5    Copyright (C) 2019 Nordix Foundation.
6    Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
7   ================================================================================
8   Licensed under the Apache License, Version 2.0 (the "License");
9   you may not use this file except in compliance with the License.
10   You may obtain a copy of the License at
11
12        http://www.apache.org/licenses/LICENSE-2.0
13
14   Unless required by applicable law or agreed to in writing, software
15   distributed under the License is distributed on an "AS IS" BASIS,
16   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   See the License for the specific language governing permissions and
18   limitations under the License.
19
20   SPDX-License-Identifier: Apache-2.0
21   ============LICENSE_END=========================================================
22 --><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">
23     <modelVersion>4.0.0</modelVersion>
24     <parent>
25         <groupId>org.onap.policy.parent</groupId>
26         <artifactId>integration</artifactId>
27         <version>2.1.0-SNAPSHOT</version>
28         <relativePath/>
29     </parent>
30
31     <groupId>org.onap.policy.models</groupId>
32     <artifactId>policy-models</artifactId>
33     <version>2.0.0-SNAPSHOT</version>
34
35     <packaging>pom</packaging>
36     <name>policy-models</name>
37     <description>This repo holds model code agnostic to PDP engines</description>
38
39     <properties>
40         <derby.version>10.13.1.1</derby.version>
41         <javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
42         <policy.common.version>1.4.0-SNAPSHOT</policy.common.version>
43         <policy.drools-applications.version>1.4.0-SNAPSHOT</policy.drools-applications.version>
44         <policy.drools-pdp.version>1.4.0-SNAPSHOT</policy.drools-pdp.version>
45
46         <!-- sonar/jacoco overrides -->
47         <!-- Overriding oparent default sonar/jacoco settings Combine all our reports into one file shared across sub-modules -->
48         <sonar.jacoco.reportPath>${project.basedir}/../target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
49         <sonar.jacoco.itReportPath>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
50         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
51     </properties>
52
53     <modules>
54         <module>models-base</module>
55         <module>models-dao</module>
56         <module>models-tosca</module>
57         <module>models-pap</module>
58         <module>models-pdp</module>
59         <module>models-errors</module>
60         <module>models-decisions</module>
61         <module>models-provider</module>
62         <module>models-examples</module>
63         <module>models-interactions</module>
64     </modules>
65
66     <distributionManagement>
67         <site>
68             <id>ecomp-site</id>
69             <url>dav:${nexusproxy}${sitePath}</url>
70         </site>
71     </distributionManagement>
72
73     <dependencies>
74         <dependency>
75             <groupId>org.onap.policy.common</groupId>
76             <artifactId>utils</artifactId>
77         </dependency>
78
79         <dependency>
80             <groupId>org.slf4j</groupId>
81             <artifactId>slf4j-api</artifactId>
82         </dependency>
83
84         <dependency>
85             <groupId>ch.qos.logback</groupId>
86             <artifactId>logback-core</artifactId>
87         </dependency>
88         <dependency>
89             <groupId>ch.qos.logback</groupId>
90             <artifactId>logback-classic</artifactId>
91         </dependency>
92
93         <dependency>
94             <groupId>org.projectlombok</groupId>
95             <artifactId>lombok</artifactId>
96             <scope>provided</scope>
97         </dependency>
98
99         <dependency>
100             <groupId>com.google.code.gson</groupId>
101             <artifactId>gson</artifactId>
102         </dependency>
103
104         <dependency>
105             <groupId>org.yaml</groupId>
106             <artifactId>snakeyaml</artifactId>
107             <version>1.18</version>
108         </dependency>
109
110         <dependency>
111             <groupId>javax.ws.rs</groupId>
112             <artifactId>javax.ws.rs-api</artifactId>
113             <version>${javax.ws.rs-api.version}</version>
114         </dependency>
115
116         <dependency>
117             <groupId>junit</groupId>
118             <artifactId>junit</artifactId>
119             <scope>test</scope>
120         </dependency>
121
122         <dependency>
123             <groupId>org.assertj</groupId>
124             <artifactId>assertj-core</artifactId>
125             <scope>test</scope>
126         </dependency>
127
128         <dependency>
129             <groupId>org.eclipse.persistence</groupId>
130             <artifactId>eclipselink</artifactId>
131         </dependency>
132     </dependencies>
133
134     <dependencyManagement>
135         <dependencies>
136             <dependency>
137                 <groupId>org.onap.policy.common</groupId>
138                 <artifactId>utils</artifactId>
139                 <version>${policy.common.version}</version>
140             </dependency>
141         </dependencies>
142     </dependencyManagement>
143
144     <build>
145         <plugins>
146             <plugin>
147                 <groupId>org.jacoco</groupId>
148                 <artifactId>jacoco-maven-plugin</artifactId>
149                 <executions>
150                     <execution>
151                         <id>pre-unit-test</id>
152                         <goals>
153                             <goal>prepare-agent</goal>
154                         </goals>
155                         <configuration>
156                             <destFile>${sonar.jacoco.reportPath}</destFile>
157                             <append>true</append>
158                         </configuration>
159                     </execution>
160                     <execution>
161                         <id>post-unit-test</id>
162                         <phase>test</phase>
163                         <goals>
164                             <goal>report</goal>
165                         </goals>
166                         <configuration>
167                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
168                         </configuration>
169                     </execution>
170                 </executions>
171             </plugin>
172             <plugin>
173                 <artifactId>maven-checkstyle-plugin</artifactId>
174                 <executions>
175                     <execution>
176                         <id>onap-java-style</id>
177                         <goals>
178                             <goal>check</goal>
179                         </goals>
180                         <phase>process-sources</phase>
181                         <configuration>
182                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml 
183                                 with minor changes -->
184                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
185                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
186                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
187                             <includeResources>true</includeResources>
188                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
189                             <includeTestResources>true</includeTestResources>
190                             <excludes>
191                             </excludes>
192                             <consoleOutput>true</consoleOutput>
193                             <failOnViolation>true</failOnViolation>
194                             <violationSeverity>warning</violationSeverity>
195                         </configuration>
196                     </execution>
197                 </executions>
198                 <dependencies>
199                     <dependency>
200                         <groupId>org.onap.oparent</groupId>
201                         <artifactId>checkstyle</artifactId>
202                         <version>${oparent.version}</version>
203                         <scope>compile</scope>
204                     </dependency>
205                 </dependencies>
206             </plugin>
207         </plugins>
208         <pluginManagement>
209             <plugins>
210                 <plugin>
211                     <groupId>org.jacoco</groupId>
212                     <artifactId>jacoco-maven-plugin</artifactId>
213                     <version>${jacoco.version}</version>
214                     <configuration>
215                         <!-- Note: This exclusion list should match <sonar.exclusions> property above -->
216                         <excludes>
217                             <exclude>**/gen/**</exclude>
218                             <exclude>**/generated-sources/**</exclude>
219                             <exclude>**/yang-gen/**</exclude>
220                             <exclude>**/pax/**</exclude>
221                         </excludes>
222                     </configuration>
223                     <executions>
224                         <!-- Prepares the property pointing to the JaCoCo runtime agent which is passed as VM argument when 
225                             Maven the Surefire plugin is executed. -->
226                         <execution>
227                             <id>pre-unit-test</id>
228                             <goals>
229                                 <goal>prepare-agent</goal>
230                             </goals>
231                             <configuration>
232                                 <destFile>${sonar.jacoco.reportPath}</destFile>
233                             </configuration>
234                         </execution>
235                         <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
236                         <execution>
237                             <id>post-unit-test</id>
238                             <phase>test</phase>
239                             <goals>
240                                 <goal>report</goal>
241                             </goals>
242                             <configuration>
243                                 <dataFile>${sonar.jacoco.reportPath}</dataFile>
244                             </configuration>
245                         </execution>
246                     </executions>
247                 </plugin>
248                 <plugin>
249                     <groupId>org.eclipse.m2e</groupId>
250                     <artifactId>lifecycle-mapping</artifactId>
251                     <version>1.0.0</version>
252                     <configuration>
253                         <lifecycleMappingMetadata>
254                             <pluginExecutions>
255                                 <pluginExecution>
256                                     <pluginExecutionFilter>
257                                         <groupId>org.apache.maven.plugins</groupId>
258                                         <artifactId>maven-checkstyle-plugin</artifactId>
259                                         <versionRange>2.17,)</versionRange>
260                                         <goals>
261                                             <goal>check</goal>
262                                         </goals>
263                                     </pluginExecutionFilter>
264                                     <action>
265                                         <ignore/>
266                                     </action>
267                                 </pluginExecution>
268                             </pluginExecutions>
269                         </lifecycleMappingMetadata>
270                     </configuration>
271                 </plugin>
272             </plugins>
273         </pluginManagement>
274     </build>
275 </project>