127a9ab2fc6051bf7dc578bbef1fc93b7ff839b2
[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.1.0</version>
30         <relativePath />
31     </parent>
32
33     <groupId>org.onap.policy.models</groupId>
34     <artifactId>policy-models</artifactId>
35     <version>2.2.0-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.6.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         </dependency>
110
111         <dependency>
112             <groupId>javax.ws.rs</groupId>
113             <artifactId>javax.ws.rs-api</artifactId>
114             <version>${javax.ws.rs-api.version}</version>
115         </dependency>
116
117         <dependency>
118             <groupId>org.mariadb.jdbc</groupId>
119             <artifactId>mariadb-java-client</artifactId>
120         </dependency>
121
122         <dependency>
123             <groupId>org.eclipse.persistence</groupId>
124             <artifactId>eclipselink</artifactId>
125         </dependency>
126
127         <dependency>
128             <groupId>junit</groupId>
129             <artifactId>junit</artifactId>
130             <scope>test</scope>
131         </dependency>
132
133         <dependency>
134             <groupId>org.assertj</groupId>
135             <artifactId>assertj-core</artifactId>
136             <scope>test</scope>
137         </dependency>
138
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
146         <dependency>
147             <groupId>org.glassfish.jersey.inject</groupId>
148             <artifactId>jersey-hk2</artifactId>
149         </dependency>
150     </dependencies>
151
152     <dependencyManagement>
153         <dependencies>
154             <dependency>
155                 <groupId>org.onap.policy.common</groupId>
156                 <artifactId>utils</artifactId>
157                 <version>${policy.common.version}</version>
158             </dependency>
159         </dependencies>
160     </dependencyManagement>
161
162     <build>
163         <plugins>
164             <plugin>
165                 <groupId>org.jacoco</groupId>
166                 <artifactId>jacoco-maven-plugin</artifactId>
167                 <executions>
168                     <execution>
169                         <id>pre-unit-test</id>
170                         <goals>
171                             <goal>prepare-agent</goal>
172                         </goals>
173                         <configuration>
174                             <destFile>${sonar.jacoco.reportPath}</destFile>
175                             <append>true</append>
176                         </configuration>
177                     </execution>
178                     <execution>
179                         <id>post-unit-test</id>
180                         <phase>test</phase>
181                         <goals>
182                             <goal>report</goal>
183                         </goals>
184                         <configuration>
185                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
186                         </configuration>
187                     </execution>
188                 </executions>
189             </plugin>
190             <plugin>
191                 <artifactId>maven-checkstyle-plugin</artifactId>
192                 <executions>
193                     <execution>
194                         <id>onap-java-style</id>
195                         <goals>
196                             <goal>check</goal>
197                         </goals>
198                         <phase>process-sources</phase>
199                         <configuration>
200                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml 
201                                 with minor changes -->
202                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
203                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
204                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
205                             <includeResources>true</includeResources>
206                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
207                             <includeTestResources>true</includeTestResources>
208                             <excludes>
209                             </excludes>
210                             <consoleOutput>true</consoleOutput>
211                             <failOnViolation>true</failOnViolation>
212                             <violationSeverity>warning</violationSeverity>
213                         </configuration>
214                     </execution>
215                 </executions>
216                 <dependencies>
217                     <dependency>
218                         <groupId>org.onap.oparent</groupId>
219                         <artifactId>checkstyle</artifactId>
220                         <version>${oparent.version}</version>
221                         <scope>compile</scope>
222                     </dependency>
223                 </dependencies>
224             </plugin>
225         </plugins>
226         <pluginManagement>
227             <plugins>
228                 <plugin>
229                     <groupId>org.jacoco</groupId>
230                     <artifactId>jacoco-maven-plugin</artifactId>
231                     <version>${jacoco.version}</version>
232                     <configuration>
233                         <!-- Note: This exclusion list should match <sonar.exclusions> property above -->
234                         <excludes>
235                             <exclude>**/gen/**</exclude>
236                             <exclude>**/generated-sources/**</exclude>
237                             <exclude>**/yang-gen/**</exclude>
238                             <exclude>**/pax/**</exclude>
239                         </excludes>
240                     </configuration>
241                     <executions>
242                         <!-- Prepares the property pointing to the JaCoCo runtime agent which is passed as VM argument when 
243                             Maven the Surefire plugin is executed. -->
244                         <execution>
245                             <id>pre-unit-test</id>
246                             <goals>
247                                 <goal>prepare-agent</goal>
248                             </goals>
249                             <configuration>
250                                 <destFile>${sonar.jacoco.reportPath}</destFile>
251                             </configuration>
252                         </execution>
253                         <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
254                         <execution>
255                             <id>post-unit-test</id>
256                             <phase>test</phase>
257                             <goals>
258                                 <goal>report</goal>
259                             </goals>
260                             <configuration>
261                                 <dataFile>${sonar.jacoco.reportPath}</dataFile>
262                             </configuration>
263                         </execution>
264                     </executions>
265                 </plugin>
266                 <plugin>
267                     <groupId>org.eclipse.m2e</groupId>
268                     <artifactId>lifecycle-mapping</artifactId>
269                     <version>1.0.0</version>
270                     <configuration>
271                         <lifecycleMappingMetadata>
272                             <pluginExecutions>
273                                 <pluginExecution>
274                                     <pluginExecutionFilter>
275                                         <groupId>org.apache.maven.plugins</groupId>
276                                         <artifactId>maven-checkstyle-plugin</artifactId>
277                                         <versionRange>2.17,)</versionRange>
278                                         <goals>
279                                             <goal>check</goal>
280                                         </goals>
281                                     </pluginExecutionFilter>
282                                     <action>
283                                         <ignore />
284                                     </action>
285                                 </pluginExecution>
286                             </pluginExecutions>
287                         </lifecycleMappingMetadata>
288                     </configuration>
289                 </plugin>
290             </plugins>
291         </pluginManagement>
292     </build>
293 </project>