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