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