Increment code coverage for Application
[oam/nf-oam-adopter.git] / ves-nf-oam-adopter / ves-nf-oam-adopter-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ============LICENSE_START=======================================================
4 * O-RAN-SC
5 * ================================================================================
6 * Copyright (C) 2021 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 * ============LICENSE_END============================================
20 *
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0"
23          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
27     <parent>
28         <groupId>org.o-ran-sc.oam</groupId>
29         <artifactId>ves-nf-oam-adopter-parent-lite</artifactId>
30         <version>1.0.0-SNAPSHOT</version>
31         <relativePath>../ves-nf-oam-adopter-parent-lite/pom.xml</relativePath>
32     </parent>
33
34     <artifactId>ves-nf-oam-adopter-parent</artifactId>
35     <packaging>pom</packaging>
36
37     <properties>
38         <!-- Code coverate & Sonar -->
39         <minimum.coverage>0.9</minimum.coverage>
40         <jacoco.reportDirectory.aggregate>
41             ${project.reporting.outputDirectory}/jacoco-aggregate
42         </jacoco.reportDirectory.aggregate>
43         <sonar.coverage.jacoco.xmlReportPaths>
44             ../ves-nf-oam-adopter-event-notifier/target/site/jacoco-ut/jacoco.xml,
45             ../ves-nf-oam-adopter-event-notifier/target/site/jacoco-aggregate/jacoco.xml,
46             ../ves-nf-oam-adopter-snmp-manager/target/site/jacoco-ut/jacoco.xml,
47             ../ves-nf-oam-adopter-snmp-manager/target/site/jacoco-aggregate/jacoco.xml,
48             ../ves-nf-oam-adopter-pm-manager/target/site/jacoco-ut/jacoco.xml,
49             ../ves-nf-oam-adopter-pm-manager/target/site/jacoco-aggregate/jacoco.xml,
50             ../ves-nf-oam-adopter-pm-sb-rest-client/target/site/jacoco-ut/jacoco.xml,
51             ../ves-nf-oam-adopter-pm-sb-rest-client/target/site/jacoco-aggregate/jacoco.xml
52         </sonar.coverage.jacoco.xmlReportPaths>
53         <sonar.scanner.version>3.8.0.2131</sonar.scanner.version>
54         <!--Dependency Versions-->
55         <commons-configuration2.version>2.7</commons-configuration2.version>
56         <commons-io.version>2.6</commons-io.version>
57         <commons-beanutils.version>1.9.4</commons-beanutils.version>
58         <gson.version>2.8.6</gson.version>
59         <guava.version>30.1-jre</guava.version>
60         <httpclient5.version>5.0.3</httpclient5.version>
61         <jdt.annotation.version>2.2.600</jdt.annotation.version>
62         <lombok.version>1.18.20</lombok.version>
63         <rxjava.version>3.0.12</rxjava.version>
64         <snmp4j.version>3.4.4</snmp4j.version>
65         <spotbugs.version>4.2.3</spotbugs.version>
66         <spring.boot.version>2.4.5</spring.boot.version>
67         <swagger-annotations.version>2.1.9</swagger-annotations.version>
68         <!--Plugins Versions-->
69         <com.puppycrawl.tools.version>8.41</com.puppycrawl.tools.version>
70         <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
71         <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
72         <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
73         <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
74         <spotbugs-maven-plugin.version>4.2.3</spotbugs-maven-plugin.version>
75         <swagger-codegen-maven-plugin.version>3.0.25</swagger-codegen-maven-plugin.version>
76         <!--Image properties-->
77         <base.image>openjdk:11-jre-slim</base.image>
78         <base.config>${project.basedir}/configuration/</base.config>
79         <image.workdir>/o-ran-ves-adapter/</image.workdir>
80         <nexus.repository.mirror>nexus3.o-ran-sc.org:10001/</nexus.repository.mirror>
81         <nexus.repository>nexus3.o-ran-sc.org:10004/o-ran-sc/</nexus.repository>
82     </properties>
83
84     <dependencyManagement>
85         <dependencies>
86             <dependency>
87                 <groupId>${project.groupId}</groupId>
88                 <artifactId>ves-nf-oam-adopter-artifacts</artifactId>
89                 <version>${project.version}</version>
90                 <type>pom</type>
91                 <scope>import</scope>
92             </dependency>
93             <dependency>
94                 <groupId>com.google.code.gson</groupId>
95                 <artifactId>gson</artifactId>
96                 <version>${gson.version}</version>
97             </dependency>
98             <dependency>
99                 <groupId>org.eclipse.jdt</groupId>
100                 <artifactId>org.eclipse.jdt.annotation</artifactId>
101                 <version>${jdt.annotation.version}</version>
102             </dependency>
103             <dependency>
104                 <groupId>io.reactivex.rxjava3</groupId>
105                 <artifactId>rxjava</artifactId>
106                 <version>${rxjava.version}</version>
107             </dependency>
108             <dependency>
109                 <groupId>org.apache.httpcomponents.client5</groupId>
110                 <artifactId>httpclient5</artifactId>
111                 <version>${httpclient5.version}</version>
112             </dependency>
113             <dependency>
114                 <groupId>org.projectlombok</groupId>
115                 <artifactId>lombok</artifactId>
116                 <version>${lombok.version}</version>
117             </dependency>
118             <dependency>
119                 <groupId>org.snmp4j</groupId>
120                 <artifactId>snmp4j</artifactId>
121                 <version>${snmp4j.version}</version>
122             </dependency>
123             <dependency>
124                 <groupId>org.apache.commons</groupId>
125                 <artifactId>commons-configuration2</artifactId>
126                 <version>${commons-configuration2.version}</version>
127             </dependency>
128             <dependency>
129                 <groupId>commons-io</groupId>
130                 <artifactId>commons-io</artifactId>
131                 <version>${commons-io.version}</version>
132             </dependency>
133             <dependency>
134                 <groupId>commons-beanutils</groupId>
135                 <artifactId>commons-beanutils</artifactId>
136                 <version>${commons-beanutils.version}</version>
137             </dependency>
138             <dependency>
139                 <groupId>com.google.guava</groupId>
140                 <artifactId>guava</artifactId>
141                 <version>${guava.version}</version>
142             </dependency>
143             <dependency>
144                 <groupId>com.github.spotbugs</groupId>
145                 <artifactId>spotbugs-annotations</artifactId>
146                 <version>${spotbugs.version}</version>
147             </dependency>
148             <dependency>
149                 <groupId>io.swagger.core.v3</groupId>
150                 <artifactId>swagger-annotations</artifactId>
151                 <version>${swagger-annotations.version}</version>
152             </dependency>
153             <dependency>
154                 <groupId>org.springframework.boot</groupId>
155                 <artifactId>spring-boot-starter</artifactId>
156                 <version>${spring.boot.version}</version>
157                 <exclusions>
158                     <exclusion>
159                         <groupId>org.springframework.boot</groupId>
160                         <artifactId>spring-boot-starter-logging</artifactId>
161                     </exclusion>
162                     <exclusion>
163                         <groupId>junit</groupId>
164                         <artifactId>junit</artifactId>
165                     </exclusion>
166                 </exclusions>
167             </dependency>
168             <dependency>
169                 <groupId>org.springframework.boot</groupId>
170                 <artifactId>spring-boot-dependencies</artifactId>
171                 <version>${spring.boot.version}</version>
172                 <type>pom</type>
173                 <scope>import</scope>
174                 <exclusions>
175                     <exclusion>
176                         <groupId>org.springframework.boot</groupId>
177                         <artifactId>spring-boot-starter-logging</artifactId>
178                     </exclusion>
179                     <exclusion>
180                         <groupId>junit</groupId>
181                         <artifactId>junit</artifactId>
182                     </exclusion>
183                 </exclusions>
184             </dependency>
185         </dependencies>
186     </dependencyManagement>
187
188     <build>
189         <pluginManagement>
190             <plugins>
191                 <plugin>
192                     <groupId>org.sonarsource.scanner.maven</groupId>
193                     <artifactId>sonar-maven-plugin</artifactId>
194                     <version>${sonar.scanner.version}</version>
195                 </plugin>
196                 <plugin>
197                     <groupId>org.apache.maven.plugins</groupId>
198                     <artifactId>maven-compiler-plugin</artifactId>
199                     <version>${maven-compiler-plugin.version}</version>
200                     <configuration>
201                         <release>${java.version}</release>
202                         <forceJavacCompilerUse>true</forceJavacCompilerUse>
203                     </configuration>
204                 </plugin>
205                 <plugin>
206                     <groupId>org.apache.maven.plugins</groupId>
207                     <artifactId>maven-checkstyle-plugin</artifactId>
208                     <version>${maven-checkstyle-plugin.version}</version>
209                     <executions>
210                         <execution>
211                             <id>ves-nf-oam-adopter-java-style</id>
212                             <goals>
213                                 <goal>check</goal>
214                             </goals>
215                             <phase>process-sources</phase>
216                             <configuration>
217                                 <configLocation>ves-nf-oam-adopter-java-style.xml</configLocation>
218                                 <sourceDirectories>
219                                     <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
220                                 </sourceDirectories>
221                                 <includeResources>true</includeResources>
222                                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
223                                 <includeTestResources>true</includeTestResources>
224                                 <consoleOutput>true</consoleOutput>
225                                 <violationSeverity>warning</violationSeverity>
226                                 <failOnViolation>true</failOnViolation>
227                             </configuration>
228                         </execution>
229                     </executions>
230                     <dependencies>
231                         <dependency>
232                             <groupId>com.puppycrawl.tools</groupId>
233                             <artifactId>checkstyle</artifactId>
234                             <version>${com.puppycrawl.tools.version}</version>
235                         </dependency>
236                         <dependency>
237                             <groupId>${project.groupId}</groupId>
238                             <artifactId>ves-nf-oam-adopter-checkstyle</artifactId>
239                             <version>${project.version}</version>
240                         </dependency>
241                     </dependencies>
242                 </plugin>
243                 <plugin>
244                     <groupId>com.github.spotbugs</groupId>
245                     <artifactId>spotbugs-maven-plugin</artifactId>
246                     <version>${spotbugs-maven-plugin.version}</version>
247                     <dependencies>
248                         <dependency>
249                             <groupId>com.github.spotbugs</groupId>
250                             <artifactId>spotbugs</artifactId>
251                             <version>${spotbugs-maven-plugin.version}</version>
252                         </dependency>
253                         <dependency>
254                             <groupId>${project.groupId}</groupId>
255                             <artifactId>ves-nf-oam-adopter-spotbugs</artifactId>
256                             <version>${project.version}</version>
257                         </dependency>
258                     </dependencies>
259                     <configuration>
260                         <plugins>
261                             <plugin>
262                                 <groupId>jp.skypencil.findbugs.slf4j</groupId>
263                                 <artifactId>bug-pattern</artifactId>
264                                 <version>1.5.0</version>
265                             </plugin>
266                         </plugins>
267                         <!--
268                           Enables analysis which takes more memory but finds more bugs.
269                           If you run out of memory, changes the value of the effort element
270                           to 'Low'.
271                         -->
272                         <effort>Max</effort>
273                         <!-- Reports all bugs (other values are medium and max) -->
274                         <threshold>Low</threshold>
275                         <!-- Build fail if problems are found -->
276                         <failOnError>true</failOnError>
277                         <!-- References the excluded rules -->
278                         <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
279                         <!-- Produces XML report -->
280                         <xmlOutput>true</xmlOutput>
281                         <!-- Configures the directory in which the XML report is created -->
282                         <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
283                     </configuration>
284                     <executions>
285                         <!--
286                           Ensures that SpotBugs inspects source code when project is compiled.
287                         -->
288                         <execution>
289                             <id>analyze-compile</id>
290                             <phase>compile</phase>
291                             <goals>
292                                 <goal>check</goal>
293                             </goals>
294                         </execution>
295                     </executions>
296                 </plugin>
297                 <plugin>
298                     <groupId>org.apache.maven.plugins</groupId>
299                     <artifactId>maven-surefire-plugin</artifactId>
300                     <version>3.0.0-M4</version>
301                     <configuration>
302                         <!--suppress UnresolvedMavenProperty -->
303                         <argLine>${surefireArgLine}</argLine>
304                         <useFile>false</useFile>
305                         <includes>
306                             <include>**/*Test.java</include>
307                         </includes>
308                         <excludes>
309                             <exclude>**/IT*.java</exclude>
310                         </excludes>
311                     </configuration>
312                 </plugin>
313                 <plugin>
314                     <groupId>org.jacoco</groupId>
315                     <artifactId>jacoco-maven-plugin</artifactId>
316                     <version>0.8.6</version>
317                     <configuration>
318                         <excludes>
319                             <exclude>**/api/*</exclude>
320                             <exclude>**/model/*</exclude>
321                             <exclude>**/pojos/*</exclude>
322                             <exclude>**/configurations/*</exclude>
323                             <exclude>**/properties/*</exclude>
324                             <exclude>**/config/*</exclude>
325                             <exclude>**/dto/*</exclude>
326                             <exclude>**/AdapterApplication.class</exclude>
327                         </excludes>
328                     </configuration>
329                     <executions>
330                         <execution>
331                             <id>pre-unit-test</id>
332                             <goals>
333                                 <goal>prepare-agent</goal>
334                             </goals>
335                             <configuration>
336                                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
337                                 <propertyName>surefireArgLine</propertyName>
338                             </configuration>
339                         </execution>
340                         <execution>
341                             <id>post-unit-test</id>
342                             <phase>test</phase>
343                             <goals>
344                                 <goal>report</goal>
345                             </goals>
346                             <configuration>
347                                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
348                                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
349                             </configuration>
350                         </execution>
351                         <execution>
352                             <id>default-prepare-agent</id>
353                             <goals>
354                                 <goal>prepare-agent</goal>
355                             </goals>
356                         </execution>
357                         <execution>
358                             <id>default-report</id>
359                             <phase>prepare-package</phase>
360                             <goals>
361                                 <goal>report</goal>
362                             </goals>
363                         </execution>
364                         <execution>
365                             <id>default-check</id>
366                             <goals>
367                                 <goal>check</goal>
368                             </goals>
369                             <configuration>
370                                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
371                                 <rules>
372                                     <rule>
373                                         <element>BUNDLE</element>
374                                         <limits>
375                                             <limit>
376                                                 <counter>INSTRUCTION</counter>
377                                                 <value>COVEREDRATIO</value>
378                                                 <minimum>${minimum.coverage}</minimum>
379                                             </limit>
380                                         </limits>
381                                     </rule>
382                                 </rules>
383                             </configuration>
384                         </execution>
385                         <execution>
386                             <id>report</id>
387                             <goals>
388                                 <goal>report-aggregate</goal>
389                             </goals>
390                             <phase>verify</phase>
391                             <configuration>
392                                 <dataFileIncludes>
393                                     <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
394                                 </dataFileIncludes>
395                             </configuration>
396                         </execution>
397                     </executions>
398                 </plugin>
399                 <plugin>
400                     <groupId>org.apache.maven.plugins</groupId>
401                     <artifactId>maven-enforcer-plugin</artifactId>
402                     <version>${maven-enforcer-plugin.version}</version>
403                     <executions>
404                         <execution>
405                             <id>enforce-maven</id>
406                             <goals>
407                                 <goal>enforce</goal>
408                             </goals>
409                             <configuration>
410                                 <rules>
411                                     <requireMavenVersion>
412                                         <version>3.6.0</version>
413                                     </requireMavenVersion>
414                                 </rules>
415                             </configuration>
416                         </execution>
417                     </executions>
418                 </plugin>
419                 <plugin>
420                     <groupId>org.apache.maven.plugins</groupId>
421                     <artifactId>maven-javadoc-plugin</artifactId>
422                     <version>${maven-javadoc-plugin.version}</version>
423                     <configuration combine.children="append">
424                         <!-- Keep things quiet except for warnings/errors -->
425                         <quiet>true</quiet>
426                     </configuration>
427                     <executions>
428                         <execution>
429                             <id>attach-javadocs</id>
430                             <goals>
431                                 <goal>jar</goal>
432                             </goals>
433                         </execution>
434                     </executions>
435                 </plugin>
436                 <plugin>
437                     <groupId>org.springframework.boot</groupId>
438                     <artifactId>spring-boot-maven-plugin</artifactId>
439                     <version>${spring.boot.version}</version>
440                     <executions>
441                         <execution>
442                             <goals>
443                                 <goal>repackage</goal>
444                             </goals>
445                         </execution>
446                     </executions>
447                 </plugin>
448                 <plugin>
449                     <groupId>io.swagger.codegen.v3</groupId>
450                     <artifactId>swagger-codegen-maven-plugin</artifactId>
451                     <version>${swagger-codegen-maven-plugin.version}</version>
452                 </plugin>
453             </plugins>
454         </pluginManagement>
455         <plugins>
456             <plugin>
457                 <groupId>org.apache.maven.plugins</groupId>
458                 <artifactId>maven-compiler-plugin</artifactId>
459             </plugin>
460             <plugin>
461                 <groupId>org.apache.maven.plugins</groupId>
462                 <artifactId>maven-checkstyle-plugin</artifactId>
463             </plugin>
464             <plugin>
465                 <groupId>com.github.spotbugs</groupId>
466                 <artifactId>spotbugs-maven-plugin</artifactId>
467             </plugin>
468             <plugin>
469                 <groupId>org.jacoco</groupId>
470                 <artifactId>jacoco-maven-plugin</artifactId>
471             </plugin>
472             <plugin>
473                 <groupId>org.sonarsource.scanner.maven</groupId>
474                 <artifactId>sonar-maven-plugin</artifactId>
475             </plugin>
476             <plugin>
477                 <groupId>org.apache.maven.plugins</groupId>
478                 <artifactId>maven-enforcer-plugin</artifactId>
479             </plugin>
480             <plugin>
481                 <groupId>org.apache.maven.plugins</groupId>
482                 <artifactId>maven-javadoc-plugin</artifactId>
483             </plugin>
484             <plugin>
485                 <groupId>org.apache.maven.plugins</groupId>
486                 <artifactId>maven-surefire-plugin</artifactId>
487             </plugin>
488         </plugins>
489     </build>
490 </project>