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