Upgrade dependency versions in oparent
[oparent.git] / oparent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 2016-2017 Huawei Technologies Co., Ltd.
4    Modifications copyright (C) 2019 AT&T Intellectual Property
5    Modifications Copyright (C) 2019-2020 Nordix Foundation.
6    Modifications Copyright (C) 2020 Bell Canada.
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 -->
20 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21   <modelVersion>4.0.0</modelVersion>
22   <parent>
23     <groupId>org.onap.oparent</groupId>
24     <artifactId>version</artifactId>
25     <!-- When changing, also change the oparent.version property -->
26     <version>3.3.3-SNAPSHOT</version>
27     <relativePath>..</relativePath>
28   </parent>
29   <artifactId>oparent</artifactId>
30   <name>oparent/oparent</name>
31   <packaging>pom</packaging>
32   <scm>
33     <connection>scm:git:ssh://git.onap.org:29418/oparent.git</connection>
34     <developerConnection>scm:git:ssh://git.onap.org:29418/oparent.git</developerConnection>
35     <tag>HEAD</tag>
36     <url>https://wiki.onap.org/display/DW/Integration+Project</url>
37   </scm>
38   <properties>
39     <oparent.version>3.3.3-SNAPSHOT</oparent.version>
40     <jacoco.version>0.8.5</jacoco.version>
41     <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
42     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
43     <!-- Default Sonar configuration -->
44     <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
45     <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
46     <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
47     <!-- If following file exist, auto-generation of swagger.json will be done -->
48     <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
49     <!-- If following file exist, auto-generation of sdk will be done -->
50     <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
51   </properties>
52   <profiles>
53     <profile>
54         <id>cve</id>
55         <build>
56             <plugins>
57                 <plugin>
58                     <groupId>org.owasp</groupId>
59                     <artifactId>dependency-check-maven</artifactId>
60                     <version>5.3.2</version>
61                     <executions>
62                         <execution>
63                             <goals>
64                                 <goal>check</goal>
65                             </goals>
66                         </execution>
67                     </executions>
68                 </plugin>
69             </plugins>
70         </build>
71     </profile>
72
73     <profile>
74       <id>generate-json</id>
75       <activation>
76         <file>
77           <exists>${swagger-properties}</exists>
78         </file>
79         <property>
80           <name>swagger-sdk.generate-json</name>
81         </property>
82       </activation>
83       <build>
84         <plugins>
85           <plugin>
86             <groupId>org.codehaus.mojo</groupId>
87             <artifactId>properties-maven-plugin</artifactId>
88             <version>1.0.0</version>
89             <executions>
90               <execution>
91                 <phase>initialize</phase>
92                 <goals>
93                   <goal>read-project-properties</goal>
94                 </goals>
95                 <configuration>
96                   <files>
97                     <file>${basedir}/src/main/resources/swagger.properties</file>
98                   </files>
99                 </configuration>
100               </execution>
101             </executions>
102           </plugin>
103           <plugin>
104             <groupId>com.github.kongchen</groupId>
105             <artifactId>swagger-maven-plugin</artifactId>
106             <version>3.1.4</version>
107             <configuration>
108               <apiSources>
109                 <apiSource>
110                   <locations>${api-rest-package}</locations>
111                   <schemes>http,https</schemes>
112                   <host>${api-host-ip}:${api-host-port}</host>
113                   <basePath>${api-base-path}</basePath>
114                   <info>
115                     <title>${api-title}</title>
116                     <version>${api-version}</version>
117                     <description>${api-description}</description>
118                     <license>
119                       <name>${api-license}</name>
120                     </license>
121                   </info>
122                   <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
123                 </apiSource>
124               </apiSources>
125             </configuration>
126             <executions>
127               <execution>
128                 <phase>compile</phase>
129                 <goals>
130                   <goal>generate</goal>
131                 </goals>
132               </execution>
133             </executions>
134           </plugin>
135           <plugin>
136             <groupId>org.apache.maven.plugins</groupId>
137             <artifactId>maven-install-plugin</artifactId>
138             <version>2.3.1</version>
139             <executions>
140               <execution>
141                 <id>install-file-id</id>
142                 <phase>install</phase>
143                 <goals>
144                   <goal>install-file</goal>
145                 </goals>
146                 <configuration>
147                   <file>${basedir}/src/main/resources/swagger.json</file>
148                   <groupId>${project.groupId}</groupId>
149                   <artifactId>${project.artifactId}-swagger-schema</artifactId>
150                   <version>${project.version}</version>
151                   <packaging>json</packaging>
152                 </configuration>
153               </execution>
154             </executions>
155           </plugin>
156         </plugins>
157       </build>
158     </profile>
159     <profile>
160       <id>generate-sdk</id>
161       <activation>
162         <file>
163           <exists>${swagger-json}</exists>
164         </file>
165         <property>
166           <name>swagger-sdk.generate-java-sdk</name>
167         </property>
168       </activation>
169       <build>
170         <plugins>
171           <plugin>
172             <groupId>org.apache.maven.plugins</groupId>
173             <artifactId>maven-antrun-plugin</artifactId>
174             <version>1.8</version>
175             <executions>
176               <execution>
177                 <phase>initialize</phase>
178                 <id>ant-create-script</id>
179                 <configuration>
180                   <exportAntProperties>true</exportAntProperties>
181                   <tasks>
182                     <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
183                     <condition property="is_windows" value="true">
184                       <os family="windows"/>
185                     </condition>
186                     <condition property="isLinux" value="true">
187                       <os family="unix"/>
188                     </condition>
189                     <if>
190                       <equals arg1="${is_windows}" arg2="true"/>
191                       <then>
192                         <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
193                         <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
194                         <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
195                       </then>
196                       <else>
197                         <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
198                         <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
199                         <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
200                         <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
201                       </else>
202                     </if>
203                   </tasks>
204                 </configuration>
205                 <goals>
206                   <goal>run</goal>
207                 </goals>
208               </execution>
209             </executions>
210             <dependencies>
211               <dependency>
212                 <groupId>ant-contrib</groupId>
213                 <artifactId>ant-contrib</artifactId>
214                 <version>1.0b3</version>
215                 <exclusions>
216                   <exclusion>
217                     <artifactId>ant</artifactId>
218                     <groupId>ant</groupId>
219                   </exclusion>
220                 </exclusions>
221               </dependency>
222             </dependencies>
223           </plugin>
224           <plugin>
225             <groupId>io.swagger</groupId>
226             <artifactId>swagger-codegen-maven-plugin</artifactId>
227             <version>2.2.1</version>
228             <executions>
229               <execution>
230                 <goals>
231                   <goal>generate</goal>
232                 </goals>
233                 <configuration>
234                   <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
235                   <output>${project.build.directory}/generated-sources</output>
236                   <language>java</language>
237                   <configOptions>
238                     <dateLibrary>joda</dateLibrary>
239                   </configOptions>
240                   <library>jersey2</library>
241                   <groupId>${project.groupId}</groupId>
242                   <artifactId>${project.artifactId}-java-sdk</artifactId>
243                   <artifactVersion>${project.version}</artifactVersion>
244                   <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
245                   <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
246                   <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
247                 </configuration>
248               </execution>
249             </executions>
250           </plugin>
251           <plugin>
252             <artifactId>exec-maven-plugin</artifactId>
253             <groupId>org.codehaus.mojo</groupId>
254             <version>1.5.0</version>
255             <executions>
256               <execution>
257                 <id>swagger-generate-sources</id>
258                 <phase>generate-sources</phase>
259                 <goals>
260                   <goal>exec</goal>
261                 </goals>
262                 <configuration>
263                   <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
264                 </configuration>
265               </execution>
266             </executions>
267           </plugin>
268           <plugin>
269             <groupId>org.apache.maven.plugins</groupId>
270             <artifactId>maven-clean-plugin</artifactId>
271             <version>3.0.0</version>
272             <executions>
273               <execution>
274                 <id>clean-generated-files</id>
275                 <phase>generate-sources</phase>
276                 <goals>
277                   <goal>clean</goal>
278                 </goals>
279                 <configuration>
280                   <filesets>
281                     <fileset>
282                       <directory>${project.build.directory}/generated-sources</directory>
283                     </fileset>
284                   </filesets>
285                 </configuration>
286               </execution>
287             </executions>
288           </plugin>
289         </plugins>
290       </build>
291       <dependencies>
292         <dependency>
293           <groupId>org.onap.msb.swagger-sdk</groupId>
294           <artifactId>swagger-sdk</artifactId>
295           <version>1.0.0</version>
296         </dependency>
297       </dependencies>
298     </profile>
299   </profiles>
300   <dependencyManagement>
301     <dependencies>
302       <dependency>
303         <groupId>org.onap.oparent</groupId>
304         <artifactId>dependencies</artifactId>
305         <version>${oparent.version}</version>
306         <type>pom</type>
307         <scope>import</scope>
308       </dependency>
309     </dependencies>
310   </dependencyManagement>
311   <build>
312     <pluginManagement>
313       <plugins>
314         <plugin>
315           <groupId>org.jacoco</groupId>
316           <artifactId>jacoco-maven-plugin</artifactId>
317           <version>${jacoco.version}</version>
318           <configuration>
319             <!-- Note: This exclusion list should match <sonar.exclusions>
320          property above -->
321             <excludes>
322               <exclude>**/gen/**</exclude>
323               <exclude>**/generated-sources/**</exclude>
324               <exclude>**/yang-gen/**</exclude>
325               <exclude>**/pax/**</exclude>
326             </excludes>
327           </configuration>
328           <executions>
329             <!--
330         Prepares the property pointing to the JaCoCo runtime agent which
331         is passed as VM argument when Maven the Surefire plugin is executed.
332         -->
333             <execution>
334               <id>pre-unit-test</id>
335               <goals>
336                 <goal>prepare-agent</goal>
337               </goals>
338               <configuration>
339                 <!-- Sets the path to the file which contains the execution data. -->
340                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
341                 <!--
342             Sets the name of the property containing the settings
343             for JaCoCo runtime agent.
344         -->
345                 <propertyName>surefireArgLine</propertyName>
346               </configuration>
347             </execution>
348             <!--
349         Ensures that the code coverage report for unit tests is created after
350         unit tests have been run.
351         -->
352             <execution>
353               <id>post-unit-test</id>
354               <phase>test</phase>
355               <goals>
356                 <goal>report</goal>
357               </goals>
358               <configuration>
359                 <!-- Sets the path to the file which contains the execution data. -->
360                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
361                 <!-- Sets the output directory for the code coverage report. -->
362                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
363               </configuration>
364             </execution>
365             <execution>
366               <id>pre-integration-test</id>
367               <phase>pre-integration-test</phase>
368               <goals>
369                 <goal>prepare-agent</goal>
370               </goals>
371               <configuration>
372                 <!-- Sets the path to the file which contains the execution data. -->
373                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
374                 <!--
375             Sets the name of the property containing the settings
376             for JaCoCo runtime agent.
377         -->
378                 <propertyName>failsafeArgLine</propertyName>
379               </configuration>
380             </execution>
381             <!--
382         Ensures that the code coverage report for integration tests after
383         integration tests have been run.
384         -->
385             <execution>
386               <id>post-integration-test</id>
387               <phase>post-integration-test</phase>
388               <goals>
389                 <goal>report</goal>
390               </goals>
391               <configuration>
392                 <!-- Sets the path to the file which contains the execution data. -->
393                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
394                 <!-- Sets the output directory for the code coverage report. -->
395                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
396               </configuration>
397             </execution>
398           </executions>
399         </plugin>
400         <plugin>
401           <groupId>org.apache.maven.plugins</groupId>
402           <artifactId>maven-surefire-plugin</artifactId>
403           <version>3.0.0-M4</version>
404           <configuration>
405             <!-- Sets the VM argument line used when unit tests are run. -->
406             <argLine>${surefireArgLine}</argLine>
407             <!-- Excludes integration tests when unit tests are run. -->
408             <excludes>
409               <exclude>**/IT*.java</exclude>
410             </excludes>
411           </configuration>
412         </plugin>
413         <plugin>
414           <groupId>org.apache.maven.plugins</groupId>
415           <artifactId>maven-failsafe-plugin</artifactId>
416           <version>3.0.0-M4</version>
417           <executions>
418             <!--
419         Ensures that both integration-test and verify goals of the Failsafe Maven
420         plugin are executed.
421         -->
422             <execution>
423               <id>integration-tests</id>
424               <goals>
425                 <goal>integration-test</goal>
426                 <goal>verify</goal>
427               </goals>
428               <configuration>
429                 <!-- Sets the VM argument line used when integration tests are run. -->
430                 <argLine>${failsafeArgLine}</argLine>
431               </configuration>
432             </execution>
433           </executions>
434         </plugin>
435         <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
436         <plugin>
437           <groupId>org.sonarsource.scanner.maven</groupId>
438           <artifactId>sonar-maven-plugin</artifactId>
439           <version>${sonar.scanner.version}</version>
440         </plugin>
441         <plugin>
442           <groupId>org.apache.maven.plugins</groupId>
443           <artifactId>maven-checkstyle-plugin</artifactId>
444           <version>3.1.1</version>
445           <dependencies>
446             <dependency>
447               <groupId>com.puppycrawl.tools</groupId>
448               <artifactId>checkstyle</artifactId>
449               <version>8.43</version>
450             </dependency>
451           </dependencies>
452         </plugin>
453       </plugins>
454     </pluginManagement>
455     <plugins>
456       <plugin>
457         <artifactId>maven-checkstyle-plugin</artifactId>
458         <dependencies>
459           <dependency>
460             <groupId>org.onap.oparent</groupId>
461             <artifactId>checkstyle</artifactId>
462             <version>${oparent.version}</version>
463           </dependency>
464         </dependencies>
465         <executions>
466           <execution>
467             <id>onap-license</id>
468             <goals>
469               <goal>check</goal>
470             </goals>
471             <phase>process-sources</phase>
472             <configuration>
473               <configLocation>onap-checkstyle/check-license.xml</configLocation>
474               <includeResources>false</includeResources>
475               <includeTestSourceDirectory>true</includeTestSourceDirectory>
476               <includeTestResources>false</includeTestResources>
477               <sourceDirectories>
478                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
479               </sourceDirectories>
480               <excludes>
481               </excludes>
482               <consoleOutput>true</consoleOutput>
483               <failOnViolation>false</failOnViolation>
484             </configuration>
485           </execution>
486           <execution>
487             <id>onap-java-style</id>
488             <goals>
489               <goal>check</goal>
490             </goals>
491             <phase>process-sources</phase>
492             <configuration>
493               <!-- Use Google Java Style Guide:
494                    https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
495                    with minor changes -->
496               <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
497               <!-- <sourceDirectories> is needed so that checkstyle ignores the generated sources directory -->
498               <sourceDirectories>
499                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
500               </sourceDirectories>
501               <includeResources>true</includeResources>
502               <includeTestSourceDirectory>true</includeTestSourceDirectory>
503               <includeTestResources>true</includeTestResources>
504               <excludes>
505               </excludes>
506               <consoleOutput>true</consoleOutput>
507               <failOnViolation>false</failOnViolation>
508             </configuration>
509           </execution>
510         </executions>
511       </plugin>
512       <plugin>
513         <groupId>org.codehaus.mojo</groupId>
514         <artifactId>build-helper-maven-plugin</artifactId>
515         <version>1.12</version>
516       </plugin>
517       <!-- Jacoco / Sonar -->
518       <plugin>
519         <groupId>org.jacoco</groupId>
520         <artifactId>jacoco-maven-plugin</artifactId>
521       </plugin>
522       <plugin>
523         <groupId>org.apache.maven.plugins</groupId>
524         <artifactId>maven-surefire-plugin</artifactId>
525       </plugin>
526       <plugin>
527         <groupId>org.apache.maven.plugins</groupId>
528         <artifactId>maven-failsafe-plugin</artifactId>
529       </plugin>
530     </plugins>
531   </build>
532 </project>