Update versions to resolve vulnerabilities
[cps/cps-tbdmt.git] / cps-tbdmt-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5     <modelVersion>4.0.0</modelVersion>
6     <parent>
7         <groupId>org.onap.oparent</groupId>
8         <artifactId>oparent</artifactId>
9         <version>3.2.0</version>
10         <relativePath/>
11     </parent>
12
13     <groupId>org.onap.cps</groupId>
14     <artifactId>cps-tbdmt-parent</artifactId>
15     <version>0.0.1-SNAPSHOT</version>
16     <packaging>pom</packaging>
17
18     <properties>
19         <cps.version>1.0.0</cps.version>
20         <java.version>11</java.version>
21         <minimum-coverage>0.9</minimum-coverage>
22         <nexusproxy>https://nexus.onap.org</nexusproxy>
23         <oparent.version>3.2.0</oparent.version>
24         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
25         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
26         <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
27         <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
28         <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
29         <spotbugs.bug-pattern.version>1.5.0</spotbugs.bug-pattern.version>
30         <spotbugs.version>4.2.0</spotbugs.version>
31         <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
32         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
33
34         <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
35         <sonar.coverage.jacoco.xmlReportPaths>
36             ../cps-tbdmt-service/target/site/jacoco-ut/jacoco.xml,
37             ../cps-tbdmt-rest/target/site/jacoco-ut/jacoco.xml,
38             ../cps-tbdmt-application/target/site/jacoco-ut/jacoco.xml,
39         </sonar.coverage.jacoco.xmlReportPaths>
40     </properties>
41
42     <distributionManagement>
43         <repository>
44             <id>ecomp-releases</id>
45             <name>ECOMP Release Repository</name>
46             <url>${nexusproxy}${releaseNexusPath}</url>
47         </repository>
48         <snapshotRepository>
49             <id>ecomp-snapshots</id>
50             <name>ECOMP Snapshot Repository</name>
51             <url>${nexusproxy}${snapshotNexusPath}</url>
52         </snapshotRepository>
53     </distributionManagement>
54
55     <dependencyManagement>
56         <dependencies>
57             <dependency>
58                 <groupId>org.onap.cps</groupId>
59                 <artifactId>cps-tbdmt-dependencies</artifactId>
60                 <version>${project.version}</version>
61                 <type>pom</type>
62                 <scope>import</scope>
63             </dependency>
64             <dependency>
65                 <groupId>org.onap.cps</groupId>
66                 <artifactId>cps-tbdmt-bom</artifactId>
67                 <version>${project.version}</version>
68                 <type>pom</type>
69                 <scope>import</scope>
70             </dependency>
71         </dependencies>
72     </dependencyManagement>
73
74
75     <build>
76         <resources>
77             <resource>
78                 <directory>src/main/resources</directory>
79                 <filtering>true</filtering>
80             </resource>
81             <resource>
82                 <directory>target/generated-sources/license</directory>
83                 <includes>
84                     <include>third-party-licenses.txt</include>
85                 </includes>
86             </resource>
87             <resource>
88                 <directory>target/generated-resources/licenses</directory>
89                 <includes>
90                     <include>*.*</include>
91                 </includes>
92                 <targetPath>third-party-licenses</targetPath>
93             </resource>
94         </resources>
95         <pluginManagement>
96             <plugins>
97                 <plugin>
98                     <groupId>org.springframework.boot</groupId>
99                     <artifactId>spring-boot-maven-plugin</artifactId>
100                     <version>${spring-boot-maven-plugin.version}</version>
101                     <executions>
102                         <execution>
103                             <goals>
104                                 <goal>build-info</goal>
105                                 <goal>repackage</goal>
106                             </goals>
107                         </execution>
108                     </executions>
109                 </plugin>
110                 <!-- Swagger code generation. -->
111                 <plugin>
112                     <groupId>io.swagger.codegen.v3</groupId>
113                     <artifactId>swagger-codegen-maven-plugin</artifactId>
114                     <version>${swagger-codegen-maven-plugin.version}</version>
115                 </plugin>
116                 <plugin>
117                     <groupId>com.github.spotbugs</groupId>
118                     <artifactId>spotbugs-maven-plugin</artifactId>
119                     <version>${spotbugs-maven-plugin.version}</version>
120                     <dependencies>
121                         <dependency>
122                             <groupId>com.github.spotbugs</groupId>
123                             <artifactId>spotbugs</artifactId>
124                             <version>${spotbugs.version}</version>
125                         </dependency>
126                         <dependency>
127                             <groupId>${project.groupId}</groupId>
128                             <artifactId>spotbugs</artifactId>
129                             <version>${cps.version}</version>
130                         </dependency>
131                         <dependency>
132                             <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
133                             <groupId>org.slf4j</groupId>
134                             <artifactId>slf4j-simple</artifactId>
135                             <version>${spotbugs.slf4j.version}</version>
136                         </dependency>
137                     </dependencies>
138                     <configuration>
139                         <plugins>
140                             <plugin>
141                                 <groupId>jp.skypencil.findbugs.slf4j</groupId>
142                                 <artifactId>bug-pattern</artifactId>
143                                 <version>1.5.0</version>
144                             </plugin>
145                         </plugins>
146                         <!--
147                           Enables analysis which takes more memory but finds more bugs.
148                           If you run out of memory, changes the value of the effort element
149                           to 'Low'.
150                         -->
151                         <effort>Max</effort>
152                         <!-- Reports all bugs (other values are medium and max) -->
153                         <threshold>Low</threshold>
154                         <!-- Build doesn't fail if problems are found -->
155                         <failOnError>true</failOnError>
156                         <!-- References the excluded rules -->
157                         <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
158                         <!-- Produces XML report -->
159                         <xmlOutput>true</xmlOutput>
160                         <!-- Configures the directory in which the XML report is created -->
161                         <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
162                     </configuration>
163                     <executions>
164                         <!--
165                           Ensures that SpotBugs inspects source code when project is compiled.
166                         -->
167                         <execution>
168                             <id>analyze-compile</id>
169                             <phase>compile</phase>
170                             <goals>
171                                 <goal>check</goal>
172                             </goals>
173                         </execution>
174                     </executions>
175                 </plugin>
176             </plugins>
177         </pluginManagement>
178         <plugins>
179             <plugin>
180                 <groupId>org.apache.maven.plugins</groupId>
181                 <artifactId>maven-compiler-plugin</artifactId>
182                 <configuration>
183                     <source>${java.version}</source>
184                     <target>${java.version}</target>
185                 </configuration>
186             </plugin>
187             <plugin>
188                 <groupId>org.apache.maven.plugins</groupId>
189                 <artifactId>maven-checkstyle-plugin</artifactId>
190                 <executions>
191                     <execution>
192                         <id>onap-license</id>
193                         <goals>
194                             <goal>check</goal>
195                         </goals>
196                         <phase>process-sources</phase>
197                         <configuration>
198                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
199                             <includeResources>false</includeResources>
200                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
201                             <includeTestResources>false</includeTestResources>
202                             <sourceDirectories>
203                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
204                             </sourceDirectories>
205                             <consoleOutput>false</consoleOutput>
206                             <violationSeverity>warning</violationSeverity>
207                             <failOnViolation>true</failOnViolation>
208                         </configuration>
209                     </execution>
210                     <execution>
211                         <id>onap-java-style</id>
212                         <goals>
213                             <goal>check</goal>
214                         </goals>
215                         <phase>process-sources</phase>
216                         <configuration>
217                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
218                             <sourceDirectories>
219                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
220                             </sourceDirectories>
221                             <includeResources>true</includeResources>
222                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
223                             <includeTestResources>true</includeTestResources>
224                             <consoleOutput>false</consoleOutput>
225                             <violationSeverity>warning</violationSeverity>
226                             <failOnViolation>true</failOnViolation>
227                         </configuration>
228                     </execution>
229                     <execution>
230                         <id>cps-java-style</id>
231                         <goals>
232                             <goal>check</goal>
233                         </goals>
234                         <phase>process-sources</phase>
235                         <configuration>
236                             <configLocation>cps-java-style.xml</configLocation>
237                             <sourceDirectories>
238                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
239                             </sourceDirectories>
240                             <includeResources>true</includeResources>
241                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
242                             <includeTestResources>true</includeTestResources>
243                             <consoleOutput>true</consoleOutput>
244                             <violationSeverity>warning</violationSeverity>
245                             <failOnViolation>true</failOnViolation>
246                         </configuration>
247                     </execution>
248                 </executions>
249                 <dependencies>
250                     <dependency>
251                         <groupId>org.onap.oparent</groupId>
252                         <artifactId>checkstyle</artifactId>
253                         <version>${oparent.version}</version>
254                     </dependency>
255                     <dependency>
256                         <groupId>org.onap.cps</groupId>
257                         <artifactId>checkstyle</artifactId>
258                         <version>${cps.version}</version>
259                     </dependency>
260                 </dependencies>
261             </plugin>
262             <!-- Required because names of spec classes don't match default
263                 Surefire patterns (`*Test` etc.) -->
264             <plugin>
265                 <groupId>org.apache.maven.plugins</groupId>
266                 <artifactId>maven-surefire-plugin</artifactId>
267                 <configuration>
268                     <!--suppress UnresolvedMavenProperty -->
269                     <argLine>${surefireArgLine}</argLine>
270                     <useFile>false</useFile>
271                     <includes>
272                         <include>**/*Spec.java</include>
273                         <include>**/*Test.java</include>
274                     </includes>
275                     <excludes>
276                         <exclude>**/IT*.java</exclude>
277                     </excludes>
278                     <environmentVariables>
279                         <!--
280                             disable privileged container usage to cleanup the test containers;
281                             these will be removed automatically on jvm termination;
282                             see https://www.testcontainers.org/features/configuration/#disabling-ryuk
283                          -->
284                         <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
285                     </environmentVariables>
286                 </configuration>
287             </plugin>
288             <plugin>
289                 <groupId>org.jacoco</groupId>
290                 <artifactId>jacoco-maven-plugin</artifactId>
291                 <executions>
292                     <execution>
293                         <id>default-prepare-agent</id>
294                         <goals>
295                             <goal>prepare-agent</goal>
296                         </goals>
297                     </execution>
298                     <execution>
299                         <id>coverage-check</id>
300                         <goals>
301                             <goal>check</goal>
302                         </goals>
303                         <configuration>
304                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
305                             <rules>
306                                 <rule>
307                                     <element>BUNDLE</element>
308                                     <limits>
309                                         <limit>
310                                             <counter>INSTRUCTION</counter>
311                                             <value>COVEREDRATIO</value>
312                                             <minimum>${minimum-coverage}</minimum>
313                                         </limit>
314                                     </limits>
315                                 </rule>
316                             </rules>
317                         </configuration>
318                     </execution>
319                     <execution>
320                         <id>report</id>
321                         <goals>
322                             <goal>report-aggregate</goal>
323                         </goals>
324                         <phase>verify</phase>
325                         <configuration>
326                             <dataFileIncludes>
327                                 <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
328                             </dataFileIncludes>
329                         </configuration>
330                     </execution>
331                 </executions>
332             </plugin>
333             <plugin>
334                 <groupId>com.github.spotbugs</groupId>
335                 <artifactId>spotbugs-maven-plugin</artifactId>
336             </plugin>
337             <plugin>
338                 <groupId>org.sonarsource.scanner.maven</groupId>
339                 <artifactId>sonar-maven-plugin</artifactId>
340             </plugin>
341         </plugins>
342     </build>
343 </project>