Merge "Add patch operation for update node leaves"
[cps.git] / cps-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   Copyright (c) 2021 Pantheon.tech.
5   Modifications Copyright (C) 2021 Bell Canada.
6   Modifications Copyright (C) 2021-2022 Nordix Foundation.
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     <parent>
26         <groupId>org.onap.oparent</groupId>
27         <artifactId>oparent</artifactId>
28         <version>3.2.0</version>
29         <relativePath/>
30     </parent>
31     <modelVersion>4.0.0</modelVersion>
32
33     <groupId>org.onap.cps</groupId>
34     <artifactId>cps-parent</artifactId>
35     <version>3.3.0-SNAPSHOT</version>
36     <packaging>pom</packaging>
37
38     <properties>
39         <app>org.onap.cps.Application</app>
40         <java.version>11</java.version>
41         <minimum-coverage>0.97</minimum-coverage>
42         <postgres.version>42.5.1</postgres.version>
43
44         <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
45         <sonar.coverage.jacoco.xmlReportPaths>
46             ../jacoco-report/target/site/jacoco-aggregate/jacoco.xml
47         </sonar.coverage.jacoco.xmlReportPaths>
48     </properties>
49
50     <profiles>
51         <profile>
52             <id>Windows</id>
53             <activation>
54                 <os>
55                     <family>Windows</family>
56                 </os>
57             </activation>
58             <properties>
59                 <script.executor>python</script.executor>
60             </properties>
61         </profile>
62         <profile>
63             <id>unix</id>
64             <activation>
65                 <os>
66                     <family>unix</family>
67                 </os>
68             </activation>
69             <properties>
70                 <script.executor>python3</script.executor>
71             </properties>
72         </profile>
73     </profiles>
74
75     <dependencyManagement>
76         <dependencies>
77             <dependency>
78                 <groupId>org.onap.cps</groupId>
79                 <artifactId>cps-dependencies</artifactId>
80                 <version>${project.version}</version>
81                 <type>pom</type>
82                 <scope>import</scope>
83             </dependency>
84             <dependency>
85                 <groupId>org.onap.cps</groupId>
86                 <artifactId>cps-bom</artifactId>
87                 <version>${project.version}</version>
88                 <type>pom</type>
89                 <scope>import</scope>
90             </dependency>
91         </dependencies>
92     </dependencyManagement>
93
94     <build>
95         <resources>
96             <resource>
97                 <directory>src/main/resources</directory>
98                 <filtering>true</filtering>
99             </resource>
100             <resource>
101                 <directory>target/generated-sources/license</directory>
102                 <includes>
103                     <include>third-party-licenses.txt</include>
104                 </includes>
105             </resource>
106             <resource>
107                 <directory>target/generated-resources/licenses</directory>
108                 <includes>
109                     <include>*.*</include>
110                 </includes>
111                 <targetPath>third-party-licenses</targetPath>
112             </resource>
113         </resources>
114         <pluginManagement>
115             <plugins>
116                 <plugin>
117                     <groupId>org.springframework.boot</groupId>
118                     <artifactId>spring-boot-maven-plugin</artifactId>
119                     <version>2.6.4</version>
120                     <executions>
121                         <execution>
122                             <goals>
123                                 <goal>build-info</goal>
124                                 <goal>repackage</goal>
125                             </goals>
126                         </execution>
127                     </executions>
128                 </plugin>
129                 <plugin>
130                     <groupId>org.apache.maven.plugins</groupId>
131                     <artifactId>maven-surefire-plugin</artifactId>
132                     <version>3.0.0-M5</version>
133                 </plugin>
134                 <!-- Swagger code generation. -->
135                 <plugin>
136                     <groupId>io.swagger.codegen.v3</groupId>
137                     <artifactId>swagger-codegen-maven-plugin</artifactId>
138                     <version>3.0.27</version>
139                     <executions>
140                         <execution>
141                             <id>openapi-yaml-gen</id>
142                             <goals>
143                                 <goal>generate</goal>
144                             </goals>
145                             <phase>compile</phase>
146                             <configuration>
147                                 <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
148                                 <language>openapi-yaml</language>
149                             </configuration>
150                         </execution>
151                     </executions>
152                 </plugin>
153                 <plugin>
154                     <groupId>com.github.spotbugs</groupId>
155                     <artifactId>spotbugs-maven-plugin</artifactId>
156                     <version>4.1.3</version>
157                     <dependencies>
158                         <dependency>
159                             <groupId>com.github.spotbugs</groupId>
160                             <artifactId>spotbugs</artifactId>
161                             <version>4.2.0</version>
162                         </dependency>
163                         <dependency>
164                             <groupId>${project.groupId}</groupId>
165                             <artifactId>spotbugs</artifactId>
166                             <version>${project.version}</version>
167                         </dependency>
168                         <dependency>
169                             <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
170                             <groupId>org.slf4j</groupId>
171                             <artifactId>slf4j-simple</artifactId>
172                             <version>1.8.0-beta4</version>
173                         </dependency>
174                     </dependencies>
175                     <configuration>
176                         <plugins>
177                             <plugin>
178                                 <groupId>jp.skypencil.findbugs.slf4j</groupId>
179                                 <artifactId>bug-pattern</artifactId>
180                                 <version>1.5.0</version>
181                             </plugin>
182                         </plugins>
183                         <!--
184                           Enables analysis which takes more memory but finds more bugs.
185                           If you run out of memory, changes the value of the effort element
186                           to 'Low'.
187                         -->
188                         <addSourceDirs>true</addSourceDirs>
189                         <effort>Max</effort>
190                         <!-- Reports all bugs (other values are medium and max) -->
191                         <threshold>Low</threshold>
192                         <!-- Build doesn't fail if problems are found -->
193                         <failOnError>true</failOnError>
194                         <!-- References the excluded rules -->
195                         <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
196                         <!-- Produces XML report -->
197                         <xmlOutput>true</xmlOutput>
198                         <!-- Configures the directory in which the XML report is created -->
199                         <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
200                     </configuration>
201                     <executions>
202                         <!--
203                           Ensures that SpotBugs inspects source code when project is compiled.
204                         -->
205                         <execution>
206                             <id>analyze-compile</id>
207                             <phase>compile</phase>
208                             <goals>
209                                 <goal>check</goal>
210                             </goals>
211                         </execution>
212                     </executions>
213                 </plugin>
214                 <plugin>
215                     <groupId>org.jsonschema2pojo</groupId>
216                     <artifactId>jsonschema2pojo-maven-plugin</artifactId>
217                     <version>1.1.1</version>
218                     <configuration>
219                         <targetVersion>${java.version}</targetVersion>
220                     </configuration>
221                     <executions>
222                         <execution>
223                             <goals>
224                                 <goal>generate</goal>
225                             </goals>
226                         </execution>
227                     </executions>
228                 </plugin>
229             </plugins>
230         </pluginManagement>
231         <plugins>
232             <plugin>
233                 <groupId>org.apache.maven.plugins</groupId>
234                 <artifactId>maven-compiler-plugin</artifactId>
235                 <configuration>
236                     <source>${java.version}</source>
237                     <target>${java.version}</target>
238                 </configuration>
239             </plugin>
240             <plugin>
241                 <groupId>org.apache.maven.plugins</groupId>
242                 <artifactId>maven-checkstyle-plugin</artifactId>
243                 <executions>
244                     <execution>
245                         <id>onap-license</id>
246                         <goals>
247                             <goal>check</goal>
248                         </goals>
249                         <phase>process-sources</phase>
250                         <configuration>
251                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
252                             <includeResources>false</includeResources>
253                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
254                             <includeTestResources>false</includeTestResources>
255                             <sourceDirectories>
256                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
257                             </sourceDirectories>
258                             <consoleOutput>false</consoleOutput>
259                             <violationSeverity>warning</violationSeverity>
260                             <failOnViolation>true</failOnViolation>
261                         </configuration>
262                     </execution>
263                     <execution>
264                         <id>onap-java-style</id>
265                         <goals>
266                             <goal>check</goal>
267                         </goals>
268                         <phase>process-sources</phase>
269                         <configuration>
270                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
271                             <sourceDirectories>
272                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
273                             </sourceDirectories>
274                             <includeResources>true</includeResources>
275                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
276                             <includeTestResources>true</includeTestResources>
277                             <consoleOutput>false</consoleOutput>
278                             <violationSeverity>warning</violationSeverity>
279                             <failOnViolation>true</failOnViolation>
280                         </configuration>
281                     </execution>
282                     <execution>
283                         <id>cps-java-style</id>
284                         <goals>
285                             <goal>check</goal>
286                         </goals>
287                         <phase>process-sources</phase>
288                         <configuration>
289                             <configLocation>cps-java-style.xml</configLocation>
290                             <sourceDirectories>
291                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
292                             </sourceDirectories>
293                             <includeResources>true</includeResources>
294                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
295                             <includeTestResources>true</includeTestResources>
296                             <consoleOutput>true</consoleOutput>
297                             <violationSeverity>warning</violationSeverity>
298                             <failOnViolation>true</failOnViolation>
299                         </configuration>
300                     </execution>
301                 </executions>
302                 <dependencies>
303                     <dependency>
304                         <groupId>org.onap.oparent</groupId>
305                         <artifactId>checkstyle</artifactId>
306                         <version>3.1.0</version>
307                     </dependency>
308                     <dependency>
309                         <groupId>${project.groupId}</groupId>
310                         <artifactId>checkstyle</artifactId>
311                         <version>${project.version}</version>
312                     </dependency>
313                 </dependencies>
314             </plugin>
315             <!-- Mandatory plugins for using Spock -->
316             <plugin>
317                 <!-- The gmavenplus plugin is used to compile Groovy code.
318                     To learn more about this plugin, visit https://github.com/groovy/GMavenPlus/wiki -->
319                 <groupId>org.codehaus.gmavenplus</groupId>
320                 <artifactId>gmavenplus-plugin</artifactId>
321                 <version>1.9.0</version>
322                 <executions>
323                     <execution>
324                         <goals>
325                             <goal>compileTests</goal>
326                         </goals>
327                     </execution>
328                 </executions>
329             </plugin>
330             <!-- Required because names of spec classes don't match default
331                 Surefire patterns (`*Test` etc.) -->
332             <plugin>
333                 <groupId>org.apache.maven.plugins</groupId>
334                 <artifactId>maven-surefire-plugin</artifactId>
335                 <configuration>
336                     <!--suppress UnresolvedMavenProperty -->
337                     <argLine>${surefireArgLine}</argLine>
338                     <useFile>false</useFile>
339                     <includes>
340                         <include>**/*Spec.java</include>
341                         <include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
342                     </includes>
343                     <excludes>
344                         <exclude>**/IT*.java</exclude>
345                     </excludes>
346                     <environmentVariables>
347                         <!--
348                             disable privileged container usage to cleanup the test containers;
349                             these will be removed automatically on jvm termination;
350                             see https://www.testcontainers.org/features/configuration/#disabling-ryuk
351                          -->
352                         <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
353                         <TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>${docker.pull.registry}/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>
354                     </environmentVariables>
355                 </configuration>
356             </plugin>
357             <plugin>
358                 <groupId>org.jacoco</groupId>
359                 <artifactId>jacoco-maven-plugin</artifactId>
360                 <configuration>
361                     <excludes>
362                         <exclude>org/onap/cps/event/model/*</exclude>
363                         <exclude>org/onap/cps/rest/model/*</exclude>
364                         <exclude>org/onap/cps/cpspath/parser/antlr4/*</exclude>
365                         <exclude>org/onap/cps/ncmp/rest/model/*</exclude>
366                     </excludes>
367                 </configuration>
368                 <executions>
369                     <execution>
370                         <id>default-prepare-agent</id>
371                         <goals>
372                             <goal>prepare-agent</goal>
373                         </goals>
374                     </execution>
375                     <execution>
376                         <id>coverage-check</id>
377                         <goals>
378                             <goal>check</goal>
379                         </goals>
380                         <configuration>
381                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
382                             <rules>
383                                 <rule>
384                                     <element>BUNDLE</element>
385                                     <limits>
386                                         <limit>
387                                             <counter>INSTRUCTION</counter>
388                                             <value>COVEREDRATIO</value>
389                                             <minimum>${minimum-coverage}</minimum>
390                                         </limit>
391                                     </limits>
392                                 </rule>
393                             </rules>
394                         </configuration>
395                     </execution>
396                 </executions>
397             </plugin>
398             <plugin>
399                 <groupId>com.github.spotbugs</groupId>
400                 <artifactId>spotbugs-maven-plugin</artifactId>
401             </plugin>
402             <plugin>
403                 <groupId>org.sonarsource.scanner.maven</groupId>
404                 <artifactId>sonar-maven-plugin</artifactId>
405             </plugin>
406             <plugin>
407                 <groupId>org.codehaus.mojo</groupId>
408                 <artifactId>exec-maven-plugin</artifactId>
409                 <version>1.6.0</version>
410                 <executions>
411                     <execution>
412                         <id>generate-csv</id>
413                         <phase>prepare-package</phase>
414                         <goals>
415                             <goal>exec</goal>
416                         </goals>
417                     </execution>
418                 </executions>
419                 <configuration>
420                     <executable>${script.executor}</executable>
421                     <workingDirectory>../cps-ri/src/main/resources/</workingDirectory>
422                     <arguments>
423                         <argument>yangResourceCsvGenerator.py</argument>
424                         <argument>dmi-registry@2021-12-13</argument>
425                         <argument>dmi-registry@2022-02-10</argument>
426                         <argument>dmi-registry@2022-05-10</argument>
427                     </arguments>
428                 </configuration>
429             </plugin>
430         </plugins>
431     </build>
432 </project>