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