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