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