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