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