rename nf-proxy to network-cm-proxy
[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         <base.image>nexus3.onap.org:10001/onap/integration-java11:8.0.0</base.image>
41         <java.version>11</java.version>
42         <minimum-coverage>0.9</minimum-coverage>
43         <nexusproxy>https://nexus.onap.org</nexusproxy>
44         <oparent.version>3.1.0</oparent.version>
45         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
46         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
47         <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
48         <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
49         <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
50         <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
51         <spotbugs.version>4.2.0</spotbugs.version>
52         <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
53         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
54
55         <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
56         <sonar.coverage.jacoco.xmlReportPaths>
57             ../cps-ri/target/site/jacoco-ut/jacoco.xml,
58             ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
59             ../cps-service/target/site/jacoco-ut/jacoco.xml,
60             ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
61             ../cps-rest/target/site/jacoco-ut/jacoco.xml,
62             ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
63             ../cps-ncmp-rest/target/site/jacoco-ut/jacoco.xml,
64             ../cps-ncmp-rest/target/site/jacoco-aggregate/jacoco.xml,
65             ../cps-application/target/site/jacoco-ut/jacoco.xml,
66             ../cps-application/target/site/jacoco-aggregate/jacoco.xml
67         </sonar.coverage.jacoco.xmlReportPaths>
68     </properties>
69
70     <distributionManagement>
71         <repository>
72             <id>ecomp-releases</id>
73             <name>ECOMP Release Repository</name>
74             <url>${nexusproxy}${releaseNexusPath}</url>
75         </repository>
76         <snapshotRepository>
77             <id>ecomp-snapshots</id>
78             <name>ECOMP Snapshot Repository</name>
79             <url>${nexusproxy}${snapshotNexusPath}</url>
80         </snapshotRepository>
81     </distributionManagement>
82
83     <dependencyManagement>
84         <dependencies>
85             <dependency>
86                 <groupId>org.onap.cps</groupId>
87                 <artifactId>cps-dependencies</artifactId>
88                 <version>${project.version}</version>
89                 <type>pom</type>
90                 <scope>import</scope>
91             </dependency>
92             <dependency>
93                 <groupId>org.onap.cps</groupId>
94                 <artifactId>cps-bom</artifactId>
95                 <version>${project.version}</version>
96                 <type>pom</type>
97                 <scope>import</scope>
98             </dependency>
99         </dependencies>
100     </dependencyManagement>
101
102     <build>
103         <resources>
104             <resource>
105                 <directory>src/main/resources</directory>
106                 <filtering>true</filtering>
107             </resource>
108             <resource>
109                 <directory>target/generated-sources/license</directory>
110                 <includes>
111                     <include>third-party-licenses.txt</include>
112                 </includes>
113             </resource>
114             <resource>
115                 <directory>target/generated-resources/licenses</directory>
116                 <includes>
117                     <include>*.*</include>
118                 </includes>
119                 <targetPath>third-party-licenses</targetPath>
120             </resource>
121         </resources>
122         <pluginManagement>
123             <plugins>
124                 <plugin>
125                     <groupId>org.springframework.boot</groupId>
126                     <artifactId>spring-boot-maven-plugin</artifactId>
127                     <version>${spring-boot-maven-plugin.version}</version>
128                     <executions>
129                         <execution>
130                             <goals>
131                                 <goal>build-info</goal>
132                                 <goal>repackage</goal>
133                             </goals>
134                         </execution>
135                     </executions>
136                 </plugin>
137                 <!-- Swagger code generation. -->
138                 <plugin>
139                     <groupId>io.swagger.codegen.v3</groupId>
140                     <artifactId>swagger-codegen-maven-plugin</artifactId>
141                     <version>${swagger-codegen-maven-plugin.version}</version>
142                 </plugin>
143                 <plugin>
144                     <groupId>com.github.spotbugs</groupId>
145                     <artifactId>spotbugs-maven-plugin</artifactId>
146                     <version>${spotbugs-maven-plugin.version}</version>
147                     <dependencies>
148                         <dependency>
149                             <groupId>com.github.spotbugs</groupId>
150                             <artifactId>spotbugs</artifactId>
151                             <version>${spotbugs.version}</version>
152                         </dependency>
153                         <dependency>
154                             <groupId>${project.groupId}</groupId>
155                             <artifactId>spotbugs</artifactId>
156                             <version>${project.version}</version>
157                         </dependency>
158                         <dependency>
159                             <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
160                             <groupId>org.slf4j</groupId>
161                             <artifactId>slf4j-simple</artifactId>
162                             <version>${spotbugs.slf4j.version}</version>
163                         </dependency>
164                     </dependencies>
165                     <configuration>
166                         <plugins>
167                             <plugin>
168                                 <groupId>jp.skypencil.findbugs.slf4j</groupId>
169                                 <artifactId>bug-pattern</artifactId>
170                                 <version>1.5.0</version>
171                             </plugin>
172                         </plugins>
173                         <!--
174                           Enables analysis which takes more memory but finds more bugs.
175                           If you run out of memory, changes the value of the effort element
176                           to 'Low'.
177                         -->
178                         <effort>Max</effort>
179                         <!-- Reports all bugs (other values are medium and max) -->
180                         <threshold>Low</threshold>
181                         <!-- Build doesn't fail if problems are found -->
182                         <failOnError>true</failOnError>
183                         <!-- References the excluded rules -->
184                         <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
185                         <!-- Produces XML report -->
186                         <xmlOutput>true</xmlOutput>
187                         <!-- Configures the directory in which the XML report is created -->
188                         <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
189                     </configuration>
190                     <executions>
191                         <!--
192                           Ensures that SpotBugs inspects source code when project is compiled.
193                         -->
194                         <execution>
195                             <id>analyze-compile</id>
196                             <phase>compile</phase>
197                             <goals>
198                                 <goal>check</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>${oparent.version}</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                     </environmentVariables>
328                 </configuration>
329             </plugin>
330             <plugin>
331                 <groupId>org.jacoco</groupId>
332                 <artifactId>jacoco-maven-plugin</artifactId>
333                 <executions>
334                     <execution>
335                         <id>default-prepare-agent</id>
336                         <goals>
337                             <goal>prepare-agent</goal>
338                         </goals>
339                     </execution>
340                     <execution>
341                         <id>coverage-check</id>
342                         <goals>
343                             <goal>check</goal>
344                         </goals>
345                         <configuration>
346                             <excludes>
347                                 <exclude>org/onap/cps/rest/model/*</exclude>
348                             </excludes>
349                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
350                             <rules>
351                                 <rule>
352                                     <element>BUNDLE</element>
353                                     <limits>
354                                         <limit>
355                                             <counter>INSTRUCTION</counter>
356                                             <value>COVEREDRATIO</value>
357                                             <minimum>${minimum-coverage}</minimum>
358                                         </limit>
359                                     </limits>
360                                 </rule>
361                             </rules>
362                         </configuration>
363                     </execution>
364                     <execution>
365                         <id>report</id>
366                         <goals>
367                             <goal>report-aggregate</goal>
368                         </goals>
369                         <phase>verify</phase>
370                         <configuration>
371                             <dataFileIncludes>
372                                 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
373                             </dataFileIncludes>
374                         </configuration>
375                     </execution>
376                 </executions>
377             </plugin>
378             <plugin>
379                 <groupId>com.github.spotbugs</groupId>
380                 <artifactId>spotbugs-maven-plugin</artifactId>
381             </plugin>
382             <plugin>
383                 <groupId>org.sonarsource.scanner.maven</groupId>
384                 <artifactId>sonar-maven-plugin</artifactId>
385             </plugin>
386         </plugins>
387     </build>
388 </project>