6c462914b173f1f7db53816fe0f02555d408857e
[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 -->
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26     <parent>
27         <groupId>org.onap.policy.parent</groupId>
28         <artifactId>integration</artifactId>
29         <version>3.0.0</version>
30         <relativePath />
31     </parent>
32
33     <groupId>org.onap.policy.models</groupId>
34     <artifactId>policy-models</artifactId>
35     <version>2.1.2-SNAPSHOT</version>
36
37     <packaging>pom</packaging>
38     <name>policy-models</name>
39     <description>This repo holds model code agnostic to PDP engines</description>
40
41     <properties>
42         <derby.version>10.13.1.1</derby.version>
43         <javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
44
45         <!-- sonar/jacoco overrides -->
46         <!-- Overriding oparent default sonar/jacoco settings Combine all our reports into one file shared across sub-modules -->
47         <sonar.jacoco.reportPath>${project.basedir}/../target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
48         <sonar.jacoco.itReportPath>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
49         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
50
51         <policy.common.version>1.5.1</policy.common.version>
52     </properties>
53
54     <modules>
55         <module>models-base</module>
56         <module>models-dao</module>
57         <module>models-tosca</module>
58         <module>models-pap</module>
59         <module>models-pdp</module>
60         <module>models-errors</module>
61         <module>models-decisions</module>
62         <module>models-provider</module>
63         <module>models-examples</module>
64         <module>models-interactions</module>
65         <module>models-sim</module>
66     </modules>
67
68     <distributionManagement>
69         <site>
70             <id>ecomp-site</id>
71             <url>dav:${nexusproxy}${sitePath}</url>
72         </site>
73     </distributionManagement>
74
75     <dependencies>
76         <dependency>
77             <groupId>org.onap.policy.common</groupId>
78             <artifactId>utils</artifactId>
79         </dependency>
80
81         <dependency>
82             <groupId>org.slf4j</groupId>
83             <artifactId>slf4j-api</artifactId>
84         </dependency>
85
86         <dependency>
87             <groupId>ch.qos.logback</groupId>
88             <artifactId>logback-core</artifactId>
89         </dependency>
90         <dependency>
91             <groupId>ch.qos.logback</groupId>
92             <artifactId>logback-classic</artifactId>
93         </dependency>
94
95         <dependency>
96             <groupId>org.projectlombok</groupId>
97             <artifactId>lombok</artifactId>
98             <scope>provided</scope>
99         </dependency>
100
101         <dependency>
102             <groupId>com.google.code.gson</groupId>
103             <artifactId>gson</artifactId>
104         </dependency>
105
106         <dependency>
107             <groupId>org.yaml</groupId>
108             <artifactId>snakeyaml</artifactId>
109             <version>1.18</version>
110         </dependency>
111
112         <dependency>
113             <groupId>javax.ws.rs</groupId>
114             <artifactId>javax.ws.rs-api</artifactId>
115             <version>${javax.ws.rs-api.version}</version>
116         </dependency>
117
118         <dependency>
119             <groupId>org.mariadb.jdbc</groupId>
120             <artifactId>mariadb-java-client</artifactId>
121         </dependency>
122
123         <dependency>
124             <groupId>junit</groupId>
125             <artifactId>junit</artifactId>
126             <scope>test</scope>
127         </dependency>
128
129         <dependency>
130             <groupId>org.assertj</groupId>
131             <artifactId>assertj-core</artifactId>
132             <scope>test</scope>
133         </dependency>
134
135         <dependency>
136             <groupId>org.eclipse.persistence</groupId>
137             <artifactId>eclipselink</artifactId>
138         </dependency>
139         <dependency>
140             <groupId>org.onap.policy.common</groupId>
141             <artifactId>utils-test</artifactId>
142             <version>${policy.common.version}</version>
143             <scope>test</scope>
144         </dependency>
145     </dependencies>
146
147     <dependencyManagement>
148         <dependencies>
149             <dependency>
150                 <groupId>org.onap.policy.common</groupId>
151                 <artifactId>utils</artifactId>
152                 <version>${policy.common.version}</version>
153             </dependency>
154         </dependencies>
155     </dependencyManagement>
156
157     <build>
158         <plugins>
159             <plugin>
160                 <groupId>org.jacoco</groupId>
161                 <artifactId>jacoco-maven-plugin</artifactId>
162                 <executions>
163                     <execution>
164                         <id>pre-unit-test</id>
165                         <goals>
166                             <goal>prepare-agent</goal>
167                         </goals>
168                         <configuration>
169                             <destFile>${sonar.jacoco.reportPath}</destFile>
170                             <append>true</append>
171                         </configuration>
172                     </execution>
173                     <execution>
174                         <id>post-unit-test</id>
175                         <phase>test</phase>
176                         <goals>
177                             <goal>report</goal>
178                         </goals>
179                         <configuration>
180                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
181                         </configuration>
182                     </execution>
183                 </executions>
184             </plugin>
185             <plugin>
186                 <artifactId>maven-checkstyle-plugin</artifactId>
187                 <executions>
188                     <execution>
189                         <id>onap-java-style</id>
190                         <goals>
191                             <goal>check</goal>
192                         </goals>
193                         <phase>process-sources</phase>
194                         <configuration>
195                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml 
196                                 with minor changes -->
197                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
198                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
199                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
200                             <includeResources>true</includeResources>
201                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
202                             <includeTestResources>true</includeTestResources>
203                             <excludes>
204                             </excludes>
205                             <consoleOutput>true</consoleOutput>
206                             <failOnViolation>true</failOnViolation>
207                             <violationSeverity>warning</violationSeverity>
208                         </configuration>
209                     </execution>
210                 </executions>
211                 <dependencies>
212                     <dependency>
213                         <groupId>org.onap.oparent</groupId>
214                         <artifactId>checkstyle</artifactId>
215                         <version>${oparent.version}</version>
216                         <scope>compile</scope>
217                     </dependency>
218                 </dependencies>
219             </plugin>
220         </plugins>
221         <pluginManagement>
222             <plugins>
223                 <plugin>
224                     <groupId>org.jacoco</groupId>
225                     <artifactId>jacoco-maven-plugin</artifactId>
226                     <version>${jacoco.version}</version>
227                     <configuration>
228                         <!-- Note: This exclusion list should match <sonar.exclusions> property above -->
229                         <excludes>
230                             <exclude>**/gen/**</exclude>
231                             <exclude>**/generated-sources/**</exclude>
232                             <exclude>**/yang-gen/**</exclude>
233                             <exclude>**/pax/**</exclude>
234                         </excludes>
235                     </configuration>
236                     <executions>
237                         <!-- Prepares the property pointing to the JaCoCo runtime agent which is passed as VM argument when 
238                             Maven the Surefire plugin is executed. -->
239                         <execution>
240                             <id>pre-unit-test</id>
241                             <goals>
242                                 <goal>prepare-agent</goal>
243                             </goals>
244                             <configuration>
245                                 <destFile>${sonar.jacoco.reportPath}</destFile>
246                             </configuration>
247                         </execution>
248                         <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
249                         <execution>
250                             <id>post-unit-test</id>
251                             <phase>test</phase>
252                             <goals>
253                                 <goal>report</goal>
254                             </goals>
255                             <configuration>
256                                 <dataFile>${sonar.jacoco.reportPath}</dataFile>
257                             </configuration>
258                         </execution>
259                     </executions>
260                 </plugin>
261                 <plugin>
262                     <groupId>org.eclipse.m2e</groupId>
263                     <artifactId>lifecycle-mapping</artifactId>
264                     <version>1.0.0</version>
265                     <configuration>
266                         <lifecycleMappingMetadata>
267                             <pluginExecutions>
268                                 <pluginExecution>
269                                     <pluginExecutionFilter>
270                                         <groupId>org.apache.maven.plugins</groupId>
271                                         <artifactId>maven-checkstyle-plugin</artifactId>
272                                         <versionRange>2.17,)</versionRange>
273                                         <goals>
274                                             <goal>check</goal>
275                                         </goals>
276                                     </pluginExecutionFilter>
277                                     <action>
278                                         <ignore />
279                                     </action>
280                                 </pluginExecution>
281                             </pluginExecutions>
282                         </lifecycleMappingMetadata>
283                     </configuration>
284                 </plugin>
285             </plugins>
286         </pluginManagement>
287     </build>
288 </project>