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