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