e18de4ecd86fae9a49832e62cec72a90730e56bb
[ccsdk/parent.git] / springboot / springboot2 / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3     <modelVersion>4.0.0</modelVersion>
4
5     <parent>
6         <groupId>org.springframework.boot</groupId>
7         <artifactId>spring-boot-starter-parent</artifactId>
8         <version>2.1.8.RELEASE</version>
9         <relativePath/>
10     </parent>
11
12     <groupId>org.onap.ccsdk.parent</groupId>
13     <artifactId>spring-boot-starter-parent</artifactId>
14     <version>1.5.1-SNAPSHOT</version>
15     <packaging>pom</packaging>
16
17     <name>ONAP :: ${project.groupId} :: ${project.artifactId}</name>
18     <description>Root POM to be used in place of odlparent for CCSDK based projects</description>
19     <url>http://wiki.onap.org</url>
20     <organization>
21         <name>ONAP</name>
22     </organization>
23
24     <issueManagement>
25         <system>JIRA</system>
26         <url>https://jira.onap.org/</url>
27     </issueManagement>
28     <distributionManagement>
29         <repository>
30             <id>ecomp-releases</id>
31             <url>https://nexus.onap.org/content/repositories/releases</url>
32         </repository>
33         <snapshotRepository>
34             <id>ecomp-snapshots</id>
35             <url>https://nexus.onap.org/content/repositories/snapshots</url>
36         </snapshotRepository>
37     </distributionManagement>
38
39     <properties>
40         <!-- Sonar properties -->
41         <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
42         <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
43         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
44         <!-- Default Sonar configuration -->
45         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml,${project.reporting.outputDirectory}/jacoco-it/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
46         <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
47         <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
48
49         <!-- Jacoco properties -->
50         <jacoco.version>0.8.5</jacoco.version>
51         <!-- properties from oparent -->
52         <maven.compiler.source>1.8</maven.compiler.source>
53         <maven.compiler.target>1.8</maven.compiler.target>
54         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
55         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
56         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
57         <!-- sitePath may be overridden in the inheriting POM if desired -->
58         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
59
60         <!-- If following file exist, auto-generation of swagger.json will be done -->
61         <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
62         <!-- If following file exist, auto-generation of sdk will be done -->
63         <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
64         <!-- end of properties from oparent -->
65
66         <!-- ONAP repositories -->
67         <onap.nexus.host>nexus.onap.org</onap.nexus.host>
68         <onap.nexus.port>443</onap.nexus.port>
69         <onap.nexus.protocol>https</onap.nexus.protocol>
70         <onap.nexus.public-url>https://nexus.onap.org/content/groups/public</onap.nexus.public-url>
71         <onap.nexus.staging-url>https://nexus.onap.org/content/groups/staging</onap.nexus.staging-url>
72         <onap.nexus.release-url>https://nexus.onap.org/content/repositories/releases</onap.nexus.release-url>
73         <onap.nexus.snapshot-url>https://nexus.onap.org/content/repositories/snapshots</onap.nexus.snapshot-url>
74         <onap.nexus.staging.server-id>ecomp-staging</onap.nexus.staging.server-id>
75         <onap.nexus.staging.profile-id>176c31dfe190a</onap.nexus.staging.profile-id>
76
77         <java.version.source>1.8</java.version.source>
78         <java.version.target>1.8</java.version.target>
79         <bundle.plugin.version>2.5.0</bundle.plugin.version>
80         <maven.compile.plugin.version>2.5.1</maven.compile.plugin.version>
81         <features.file>features.xml</features.file>
82         <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
83         <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
84         <checkstyle.skip>true</checkstyle.skip>
85
86         <!-- CCSDK component versions -->
87         <ccsdk.cds.version>0.7.0-SNAPSHOT</ccsdk.cds.version>
88         <ccsdk.sli.core.version>0.7.0-SNAPSHOT</ccsdk.sli.core.version>
89         <ccsdk.sli.adaptors.version>0.7.0-SNAPSHOT</ccsdk.sli.adaptors.version>
90         <ccsdk.sli.northbound.version>0.7.0-SNAPSHOT</ccsdk.sli.northbound.version>
91         <ccsdk.sli.plugins.version>0.7.0-SNAPSHOT</ccsdk.sli.plugins.version>
92         <ccsdk.distribution.version>0.7.0-SNAPSHOT</ccsdk.distribution.version>
93         <sdnctl.sli.version>${ccsdk.sli.core.version}</sdnctl.sli.version>
94         <sdnctl.aai.service.version>${ccsdk.sli.adaptors.version}</sdnctl.aai.service.version>
95         <sdnctl.dblib.version>${ccsdk.sli.core.version}</sdnctl.dblib.version>
96         <sdnctl.mdsal.resource.version>${ccsdk.sli.adaptors.version}</sdnctl.mdsal.resource.version>
97         <sdnctl.slipluginutils.version>${ccsdk.sli.core.version}</sdnctl.slipluginutils.version>
98
99         <!-- Spring versions -->
100         <spring.boot.version>2.1.8.RELEASE</spring.boot.version>
101         <spring.version>5.1.9.RELEASE</spring.version>
102
103         <!-- Kotlin versions -->
104         <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
105         <kotlin.version>1.3.50</kotlin.version>
106         <kotlin.maven.version>1.3.50</kotlin.maven.version>
107         <kotlin.couroutines.version>1.3.2</kotlin.couroutines.version>
108         <kotlinpoet.version>1.4.4</kotlinpoet.version>
109         <kroto-plus.version>0.5.0</kroto-plus.version>
110         <mockk.version>1.9.3</mockk.version>
111
112         <apache.httpcomponents.core.version>4.4.12</apache.httpcomponents.core.version>
113         <apache.httpcomponents.client.version>4.5.10</apache.httpcomponents.client.version>
114         <derby.version>10.14.2.0</derby.version>
115         <eelf.version>1.0.0</eelf.version>
116         <grpc.version>1.25.0</grpc.version>
117         <protobuff.java.version>3.10.0</protobuff.java.version>
118         <protobuff.java.utils.version>3.10.0</protobuff.java.utils.version>
119         <atomix.version>3.1.5</atomix.version>
120         <jersey.version>2.25.1</jersey.version>
121         <jettison.version>1.3.8</jettison.version>
122         <junit.version>4.12</junit.version>
123         <logback.version>1.2.3</logback.version>
124         <mariadb.connector.version>2.4.4</mariadb.connector.version>
125         <mariadb4j.version>2.4.0</mariadb4j.version>
126         <slf4j.version>1.7.25</slf4j.version>
127         <testng.version>6.11</testng.version>
128         <tomcat-jdbc.version>9.0.27</tomcat-jdbc.version>
129         <dependency-list.file>direct-dependencies.txt</dependency-list.file>
130     </properties>
131
132     <dependencyManagement>
133         <dependencies>
134             <dependency>
135                 <groupId>org.onap.ccsdk.parent</groupId>
136                 <artifactId>dependencies-bom</artifactId>
137                 <version>1.5.1-SNAPSHOT</version>
138                 <type>pom</type>
139                 <scope>import</scope>
140             </dependency>
141             <dependency>
142                 <groupId>org.onap.ccsdk.sli.core</groupId>
143                 <artifactId>sli-common</artifactId>
144                 <version>${ccsdk.sli.core.version}</version>
145             </dependency>
146
147             <dependency>
148                 <groupId>org.onap.ccsdk.sli.core</groupId>
149                 <artifactId>sli-provider</artifactId>
150                 <version>${ccsdk.sli.core.version}</version>
151             </dependency>
152             <dependency>
153                 <groupId>org.onap.ccsdk.sli.core</groupId>
154                 <artifactId>ccsdk-sli</artifactId>
155                 <version>${ccsdk.sli.core.version}</version>
156                 <type>xml</type>
157                 <classifier>features</classifier>
158             </dependency>
159             <dependency>
160                 <groupId>org.onap.ccsdk.sli.adaptors</groupId>
161                 <artifactId>aai-service-provider</artifactId>
162                 <version>${sdnctl.aai.service.version}</version>
163             </dependency>
164
165             <dependency>
166                 <groupId>org.onap.ccsdk.sli.core</groupId>
167                 <artifactId>dblib-provider</artifactId>
168                 <version>${sdnctl.dblib.version}</version>
169             </dependency>
170             <dependency>
171                 <groupId>junit</groupId>
172                 <artifactId>junit</artifactId>
173                 <version>${junit.version}</version>
174                 <scope>test</scope>
175             </dependency>
176         </dependencies>
177
178     </dependencyManagement>
179
180     <repositories>
181         <repository>
182             <id>onap-public</id>
183             <url>https://nexus.onap.org/content/groups/public</url>
184             <releases>
185                 <enabled>true</enabled>
186                 <updatePolicy>never</updatePolicy>
187             </releases>
188             <snapshots>
189                 <enabled>true</enabled>
190                 <updatePolicy>always</updatePolicy>
191             </snapshots>
192         </repository>
193         <repository>
194             <id>onap-staging</id>
195             <url>https://nexus.onap.org/content/groups/staging</url>
196             <releases>
197                 <enabled>true</enabled>
198                 <updatePolicy>never</updatePolicy>
199             </releases>
200             <snapshots>
201                 <enabled>true</enabled>
202                 <updatePolicy>always</updatePolicy>
203             </snapshots>
204         </repository>
205         <repository>
206             <id>ecomp-release</id>
207             <name>onap-repository-releases</name>
208             <url>https://nexus.onap.org/content/repositories/releases</url>
209             <releases>
210                 <enabled>true</enabled>
211                 <updatePolicy>never</updatePolicy>
212             </releases>
213             <snapshots>
214                 <enabled>false</enabled>
215             </snapshots>
216         </repository>
217         <repository>
218             <id>ecomp-snapshot</id>
219             <name>onap-repository-snapshots</name>
220             <url>https://nexus.onap.org/content/repositories/snapshots</url>
221             <releases>
222                 <enabled>false</enabled>
223             </releases>
224             <snapshots>
225                 <enabled>true</enabled>
226             </snapshots>
227         </repository>
228         <repository>
229             <id>opendaylight-mirror</id>
230             <name>opendaylight-mirror</name>
231             <url>https://nexus.opendaylight.org/content/repositories/public/</url>
232             <releases>
233                 <enabled>true</enabled>
234                 <updatePolicy>never</updatePolicy>
235             </releases>
236             <snapshots>
237                 <enabled>false</enabled>
238             </snapshots>
239         </repository>
240         <repository>
241             <id>opendaylight-snapshot</id>
242             <name>opendaylight-snapshot</name>
243             <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
244             <releases>
245                 <enabled>false</enabled>
246             </releases>
247             <snapshots>
248                 <enabled>true</enabled>
249             </snapshots>
250         </repository>
251
252     </repositories>
253     <pluginRepositories>
254         <pluginRepository>
255             <id>onap-public</id>
256             <url>${onap.nexus.public-url}</url>
257             <releases>
258                 <enabled>true</enabled>
259             </releases>
260             <snapshots>
261                 <enabled>true</enabled>
262             </snapshots>
263         </pluginRepository>
264         <pluginRepository>
265             <id>onap-staging</id>
266             <url>${onap.nexus.staging-url}</url>
267             <releases>
268                 <enabled>true</enabled>
269             </releases>
270             <snapshots>
271                 <enabled>true</enabled>
272             </snapshots>
273         </pluginRepository>
274         <pluginRepository>
275             <id>onap-snapshot</id>
276             <url>${onap.nexus.snapshot-url}</url>
277             <releases>
278                 <enabled>false</enabled>
279             </releases>
280             <snapshots>
281                 <enabled>true</enabled>
282             </snapshots>
283         </pluginRepository>
284         <pluginRepository>
285             <id>opendaylight-mirror</id>
286             <name>opendaylight-mirror</name>
287             <url>${opendaylight.nexus.public-url}</url>
288             <releases>
289                 <enabled>true</enabled>
290                 <updatePolicy>never</updatePolicy>
291             </releases>
292             <snapshots>
293                 <enabled>false</enabled>
294             </snapshots>
295         </pluginRepository>
296         <pluginRepository>
297             <id>opendaylight-snapshot</id>
298             <name>opendaylight-snapshot</name>
299             <url>${opendaylight.nexus.snapshot-url}</url>
300             <releases>
301                 <enabled>false</enabled>
302             </releases>
303             <snapshots>
304                 <enabled>true</enabled>
305             </snapshots>
306         </pluginRepository>
307         <!-- Black Duck plugin dependencies -->
308         <pluginRepository>
309             <id>JCenter</id>
310             <name>JCenter Repository</name>
311             <url>http://jcenter.bintray.com</url>
312         </pluginRepository>
313
314         <pluginRepository>
315             <id>Restlet</id>
316             <name>Restlet Repository</name>
317             <url>http://maven.restlet.com</url>
318         </pluginRepository>
319     </pluginRepositories>
320
321     <build>
322         <pluginManagement>
323             <plugins>
324
325                 <!-- Plugins from ONAP oparent -->
326                 <plugin>
327                     <groupId>org.apache.maven.plugins</groupId>
328                     <artifactId>maven-deploy-plugin</artifactId>
329                     <!-- This version supports the "deployAtEnd" parameter -->
330                     <version>2.8</version>
331                     <configuration>
332                         <skip/>
333                     </configuration>
334                 </plugin>
335
336                 <plugin>
337                     <groupId>org.apache.maven.plugins</groupId>
338                     <artifactId>maven-site-plugin</artifactId>
339                     <version>3.6</version>
340                     <dependencies>
341                         <dependency>
342                             <groupId>org.apache.maven.wagon</groupId>
343                             <artifactId>wagon-webdav-jackrabbit</artifactId>
344                             <version>2.10</version>
345                         </dependency>
346                         <dependency>
347                             <groupId>org.apache.maven.doxia</groupId>
348                             <artifactId>doxia-core</artifactId>
349                             <version>1.7</version>
350                         </dependency>
351                         <dependency>
352                             <groupId>org.apache.maven.doxia</groupId>
353                             <artifactId>doxia-sink-api</artifactId>
354                             <version>1.7</version>
355                         </dependency>
356                         <dependency>
357                             <groupId>org.apache.maven.doxia</groupId>
358                             <artifactId>doxia-logging-api</artifactId>
359                             <version>1.7</version>
360                         </dependency>
361                     </dependencies>
362                     <executions>
363                         <execution>
364                             <id>attach-descriptor</id>
365                             <goals>
366                                 <goal>attach-descriptor</goal>
367                             </goals>
368                         </execution>
369                     </executions>
370                 </plugin>
371                 <plugin>
372                     <artifactId>maven-checkstyle-plugin</artifactId>
373                     <version>2.17</version>
374                     <dependencies>
375                         <dependency>
376                             <groupId>org.onap.oparent</groupId>
377                             <artifactId>checkstyle</artifactId>
378                             <version>1.1.1</version>
379                         </dependency>
380                     </dependencies>
381                     <executions>
382                         <execution>
383                             <id>check-license</id>
384                             <goals>
385                                 <goal>check</goal>
386                             </goals>
387                             <phase>process-sources</phase>
388                             <configuration>
389                                 <configLocation>onap-checkstyle/check-license.xml</configLocation>
390                                 <headerLocation>onap-checkstyle/apache-license-2.regexp.txt</headerLocation>
391                                 <includeResources>false</includeResources>
392                                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
393                                 <includeTestResources>false</includeTestResources>
394                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
395                                 <excludes>
396                                 </excludes>
397                                 <failsOnError>false</failsOnError>
398                                 <consoleOutput>true</consoleOutput>
399                             </configuration>
400                         </execution>
401                         <execution>
402                             <id>check-style</id>
403                             <goals>
404                                 <goal>check</goal>
405                             </goals>
406                             <phase>process-sources</phase>
407                             <configuration>
408                                 <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
409                                     with minor changes -->
410                                 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
411                                 <!-- <sourceDirectory> is needed so that checkstyle ignores the generated
412                                     sources directory -->
413                                 <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
414                                 <includeResources>true</includeResources>
415                                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
416                                 <includeTestResources>true</includeTestResources>
417                                 <excludes>
418                                 </excludes>
419                                 <failsOnError>false</failsOnError>
420                                 <consoleOutput>true</consoleOutput>
421                             </configuration>
422                         </execution>
423                     </executions>
424                 </plugin>
425
426                 <plugin>
427                     <groupId>org.apache.maven.plugins</groupId>
428                     <artifactId>maven-surefire-plugin</artifactId>
429                     <version>2.19.1</version>
430                     <configuration>
431                         <!-- Sets the VM argument line used when unit tests are run. -->
432                         <argLine>${surefireArgLine}</argLine>
433                         <!-- Excludes integration tests when unit tests are run. -->
434                         <excludes>
435                             <exclude>**/IT*.java</exclude>
436                         </excludes>
437                     </configuration>
438                 </plugin>
439                 <plugin>
440                     <groupId>org.apache.maven.plugins</groupId>
441                     <artifactId>maven-failsafe-plugin</artifactId>
442                     <version>2.19.1</version>
443                     <executions>
444                         <!-- Ensures that both integration-test and verify goals of the Failsafe
445                             Maven plugin are executed. -->
446                         <execution>
447                             <id>integration-tests</id>
448                             <goals>
449                                 <goal>integration-test</goal>
450                                 <goal>verify</goal>
451                             </goals>
452                             <configuration>
453                                 <!-- Sets the VM argument line used when integration tests are run. -->
454                                 <argLine>${failsafeArgLine}</argLine>
455                             </configuration>
456                         </execution>
457                     </executions>
458                 </plugin>
459                 <plugin>
460                     <groupId>org.apache.maven.plugins</groupId>
461                     <artifactId>maven-compiler-plugin</artifactId>
462                     <version>${maven.compile.plugin.version}</version>
463                     <configuration>
464                         <source>${java.version.source}</source>
465                         <target>${java.version.target}</target>
466                     </configuration>
467                 </plugin>
468                 <plugin>
469                     <groupId>org.sonarsource.scanner.maven</groupId>
470                     <artifactId>sonar-maven-plugin</artifactId>
471                     <version>3.6.0.1398</version>
472                 </plugin>
473
474                 <!-- End of plugins from ONAP oparent -->
475
476                 <plugin>
477                     <groupId>org.apache.maven.plugins</groupId>
478                     <artifactId>maven-javadoc-plugin</artifactId>
479                     <version>2.10</version>
480                     <configuration>
481                         <additionalDependencies>
482                             <additionalDependency>
483                                 <groupId>org.slf4j</groupId>
484                                 <artifactId>slf4j-api</artifactId>
485                                 <version>${slf4j.version}</version>
486                             </additionalDependency>
487                             <additionalDependency>
488                                 <groupId>org.antlr</groupId>
489                                 <artifactId>antlr4</artifactId>
490                                 <version>${antlr.version}</version>
491                             </additionalDependency>
492                             <additionalDependency>
493                                 <groupId>org.antlr</groupId>
494                                 <artifactId>antlr4-runtime</artifactId>
495                                 <version>${antlr.version}</version>
496                             </additionalDependency>
497
498                             <additionalDependency>
499                                 <groupId>com.sun.jersey</groupId>
500                                 <artifactId>jersey-client</artifactId>
501                                 <version>${jersey.client.version}</version>
502                             </additionalDependency>
503                             <additionalDependency>
504                                 <groupId>com.sun.jersey</groupId>
505                                 <artifactId>jersey-core</artifactId>
506                                 <version>${jersey.version}</version>
507                             </additionalDependency>
508                             <additionalDependency>
509                                 <groupId>org.apache.httpcomponents</groupId>
510                                 <artifactId>httpcore-osgi</artifactId>
511                                 <version>${apache.httpcomponents.core.version}</version>
512                             </additionalDependency>
513                             <additionalDependency>
514                                 <groupId>org.apache.httpcomponents</groupId>
515                                 <artifactId>httpclient-osgi</artifactId>
516                                 <version>${apache.httpcomponents.client.version}</version>
517                             </additionalDependency>
518                             <additionalDependency>
519                                 <groupId>commons-lang</groupId>
520                                 <artifactId>commons-lang</artifactId>
521                                 <version>${commons.lang.version}</version>
522                             </additionalDependency>
523                         </additionalDependencies>
524                     </configuration>
525
526                     <executions>
527                         <execution>
528                             <id>aggregate</id>
529                             <goals>
530                                 <goal>aggregate</goal>
531                             </goals>
532                             <phase>site</phase>
533
534                         </execution>
535                     </executions>
536                 </plugin>
537                 <plugin>
538                     <groupId>com.github.ferstl</groupId>
539                     <artifactId>depgraph-maven-plugin</artifactId>
540                     <version>3.3.0</version>
541                     <configuration>
542                         <graphFormat>text</graphFormat>
543                         <outputFileName>${dependency-list.file}</outputFileName>
544                         <outputDirectory>${project.basedir}</outputDirectory>
545                         <transitiveExcludes>*</transitiveExcludes>
546                         <showVersions>true</showVersions>
547                         <showGroupIds>true</showGroupIds>
548                     </configuration>
549                 </plugin>
550             </plugins>
551
552         </pluginManagement>
553         <plugins>
554             <!-- Plugins from ONAP oparent -->
555             <!-- Jacoco / Sonar -->
556             <plugin>
557                 <groupId>org.jacoco</groupId>
558                 <artifactId>jacoco-maven-plugin</artifactId>
559                 <version>${jacoco.version}</version>
560                 <executions>
561                     <execution>
562                         <id>pre-unit-test</id>
563                         <goals>
564                             <goal>prepare-agent</goal>
565                         </goals>
566                         <configuration>
567                             <!-- Sets the path to the file which contains the execution data. -->
568                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
569                             <!-- Sets the name of the property containing the settings for JaCoCo
570                                                                  runtime agent. -->
571                             <propertyName>surefireArgLine</propertyName>
572                         </configuration>
573                     </execution>
574                     <!-- Ensures that the code coverage report for unit tests is created
575                                                  after unit tests have been run. -->
576                     <execution>
577                         <id>post-unit-test</id>
578                         <phase>test</phase>
579                         <goals>
580                             <goal>report</goal>
581                         </goals>
582                         <configuration>
583                             <!-- Sets the path to the file which contains the execution data. -->
584                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
585                             <!-- Sets the output directory for the code coverage report. -->
586                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
587                         </configuration>
588                     </execution>
589                     <execution>
590                         <id>pre-integration-test</id>
591                         <phase>pre-integration-test</phase>
592                         <goals>
593                             <goal>prepare-agent</goal>
594                         </goals>
595                         <configuration>
596                             <!-- Sets the path to the file which contains the execution data. -->
597                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
598                             <!-- Sets the name of the property containing the settings for JaCoCo
599                                                                  runtime agent. -->
600                             <propertyName>failsafeArgLine</propertyName>
601                         </configuration>
602                     </execution>
603                     <!-- Ensures that the code coverage report for integration tests after
604                                                  integration tests have been run. -->
605                     <execution>
606                         <id>post-integration-test</id>
607                         <phase>post-integration-test</phase>
608                         <goals>
609                             <goal>report</goal>
610                         </goals>
611                         <configuration>
612                             <!-- Sets the path to the file which contains the execution data. -->
613                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
614                             <!-- Sets the output directory for the code coverage report. -->
615                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
616                         </configuration>
617                     </execution>
618                     <execution>
619                         <id>default-prepare-agent</id>
620                         <goals>
621                             <goal>prepare-agent</goal>
622                         </goals>
623                     </execution>
624                     <execution>
625                         <id>default-report</id>
626                         <phase>prepare-package</phase>
627                         <goals>
628                             <goal>report</goal>
629                         </goals>
630                     </execution>
631                     <execution>
632                         <id>default-check</id>
633                         <goals>
634                             <goal>check</goal>
635                         </goals>
636                         <configuration>
637                             <rules>
638                                 <rule>
639                                     <element>PACKAGE</element>
640                                     <limits>
641                                         <limit>
642                                             <counter>COMPLEXITY</counter>
643                                             <value>COVEREDRATIO</value>
644                                             <minimum>0.0</minimum>
645                                         </limit>
646                                     </limits>
647                                 </rule>
648                             </rules>
649                         </configuration>
650                     </execution>
651                 </executions>
652             </plugin>
653             <plugin>
654                 <artifactId>maven-checkstyle-plugin</artifactId>
655             </plugin>
656             <plugin>
657                 <groupId>org.codehaus.mojo</groupId>
658                 <artifactId>build-helper-maven-plugin</artifactId>
659                 <version>1.12</version>
660             </plugin>
661             <!-- Jacoco / Sonar -->
662             <plugin>
663                 <groupId>org.jacoco</groupId>
664                 <artifactId>jacoco-maven-plugin</artifactId>
665             </plugin>
666             <plugin>
667                 <groupId>org.apache.maven.plugins</groupId>
668                 <artifactId>maven-surefire-plugin</artifactId>
669             </plugin>
670             <plugin>
671                 <groupId>org.apache.maven.plugins</groupId>
672                 <artifactId>maven-failsafe-plugin</artifactId>
673             </plugin>
674
675             <!-- End of plugins from ONAP oparent -->
676             <plugin>
677                 <groupId>org.codehaus.mojo</groupId>
678                 <artifactId>properties-maven-plugin</artifactId>
679                 <version>1.0.0</version>
680                 <executions>
681                     <execution>
682                         <goals>
683                             <goal>set-system-properties</goal>
684                         </goals>
685                         <configuration>
686                             <properties>
687                                 <property>
688                                     <name>maven.wagon.http.ssl.allowall</name>
689                                     <value>${ssl.allowall}</value>
690                                 </property>
691                                 <property>
692                                     <name>maven.wagon.http.ssl.insecure</name>
693                                     <value>${ssl.insecure}</value>
694                                 </property>
695                             </properties>
696                         </configuration>
697                     </execution>
698                 </executions>
699             </plugin>
700             <plugin>
701                 <groupId>org.codehaus.mojo</groupId>
702                 <artifactId>versions-maven-plugin</artifactId>
703                 <version>2.5</version>
704                 <configuration>
705                     <processAllModules>true</processAllModules>
706                 </configuration>
707             </plugin>
708             <plugin>
709                 <artifactId>maven-scm-plugin</artifactId>
710                 <version>1.8.1</version>
711                 <configuration>
712                     <tag>${project.artifactId}-${project.version}</tag>
713                 </configuration>
714             </plugin>
715         </plugins>
716     </build>
717
718     <reporting>
719         <plugins>
720             <plugin>
721                 <artifactId>maven-javadoc-plugin</artifactId>
722                 <version>2.10.4</version>
723                 <configuration>
724                     <failOnError>false</failOnError>
725                     <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
726                     <docletArtifact>
727                         <groupId>org.umlgraph</groupId>
728                         <artifactId>umlgraph</artifactId>
729                         <version>5.6</version>
730                     </docletArtifact>
731                     <additionalparam>-views</additionalparam>
732                     <useStandardDocletOptions>true</useStandardDocletOptions>
733                     <excludePackageNames>org.opendaylight.*</excludePackageNames>
734                 </configuration>
735                 <reportSets>
736                     <reportSet>
737                         <reports>
738                             <report>javadoc-no-fork</report>
739                             <report>test-javadoc-no-fork</report>
740                         </reports>
741                     </reportSet>
742                     <reportSet>
743                         <id>aggregate</id>
744                         <reports>
745                             <report>aggregate</report>
746                             <report>test-aggregate</report>
747                         </reports>
748                     </reportSet>
749                 </reportSets>
750             </plugin>
751             <plugin>
752                 <groupId>org.apache.maven.plugins</groupId>
753                 <artifactId>maven-jxr-plugin</artifactId>
754                 <version>2.3</version>
755                 <reportSets>
756                     <reportSet>
757                         <id>aggregate</id>
758                         <reports>
759                             <report>aggregate</report>
760                             <report>test-aggregate</report>
761                         </reports>
762                     </reportSet>
763                 </reportSets>
764             </plugin>
765
766             <plugin>
767                 <artifactId>maven-surefire-plugin</artifactId>
768                 <version>2.17</version>
769             </plugin>
770             <plugin>
771                 <groupId>org.apache.maven.plugins</groupId>
772                 <artifactId>maven-changelog-plugin</artifactId>
773                 <version>2.3</version>
774                 <reportSets>
775                     <reportSet>
776                         <id>dual-report</id>
777                         <configuration>
778                             <type>range</type>
779                             <range>30</range>
780                         </configuration>
781                         <reports>
782                             <report>changelog</report>
783                             <report>file-activity</report>
784                         </reports>
785                     </reportSet>
786                 </reportSets>
787             </plugin>
788             <plugin>
789                 <groupId>org.codehaus.mojo</groupId>
790                 <artifactId>taglist-maven-plugin</artifactId>
791                 <version>2.4</version>
792             </plugin>
793         </plugins>
794     </reporting>
795
796     <profiles>
797         <!-- Profiles from ONAP oparent -->
798         <profile>
799             <id>generate-json</id>
800             <activation>
801                 <file>
802                     <exists>${swagger-properties}</exists>
803                 </file>
804                 <property>
805                     <name>swagger-sdk.generate-json</name>
806                 </property>
807             </activation>
808             <build>
809                 <plugins>
810                     <plugin>
811                         <groupId>org.codehaus.mojo</groupId>
812                         <artifactId>properties-maven-plugin</artifactId>
813                         <version>1.0.0</version>
814                         <executions>
815                             <execution>
816                                 <phase>initialize</phase>
817                                 <goals>
818                                     <goal>read-project-properties</goal>
819                                 </goals>
820                                 <configuration>
821                                     <files>
822                                         <file>${basedir}/src/main/resources/swagger.properties</file>
823                                     </files>
824                                 </configuration>
825                             </execution>
826                         </executions>
827                     </plugin>
828                     <plugin>
829                         <groupId>com.github.kongchen</groupId>
830                         <artifactId>swagger-maven-plugin</artifactId>
831                         <version>3.1.4</version>
832                         <configuration>
833                             <apiSources>
834                                 <apiSource>
835                                     <locations>${api-rest-package}</locations>
836                                     <schemes>http,https</schemes>
837                                     <host>${api-host-ip}:${api-host-port}</host>
838                                     <basePath>${api-base-path}</basePath>
839                                     <info>
840                                         <title>${api-title}</title>
841                                         <version>${api-version}</version>
842                                         <description>${api-description}</description>
843                                         <license>
844                                             <name>${api-license}</name>
845                                         </license>
846                                     </info>
847                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
848                                 </apiSource>
849                             </apiSources>
850                         </configuration>
851                         <executions>
852                             <execution>
853                                 <phase>compile</phase>
854                                 <goals>
855                                     <goal>generate</goal>
856                                 </goals>
857                             </execution>
858                         </executions>
859                     </plugin>
860                     <plugin>
861                         <groupId>org.apache.maven.plugins</groupId>
862                         <artifactId>maven-install-plugin</artifactId>
863                         <version>2.3.1</version>
864                         <executions>
865                             <execution>
866                                 <id>install-file-id</id>
867                                 <phase>install</phase>
868                                 <goals>
869                                     <goal>install-file</goal>
870                                 </goals>
871                                 <configuration>
872                                     <file>${basedir}/src/main/resources/swagger.json</file>
873                                     <groupId>${project.groupId}</groupId>
874                                     <artifactId>${project.artifactId}-swagger-schema</artifactId>
875                                     <version>${project.version}</version>
876                                     <packaging>json</packaging>
877                                 </configuration>
878                             </execution>
879                         </executions>
880                     </plugin>
881                 </plugins>
882             </build>
883         </profile>
884         <profile>
885             <id>generate-sdk</id>
886             <activation>
887                 <file>
888                     <exists>${swagger-json}</exists>
889                 </file>
890                 <property>
891                     <name>swagger-sdk.generate-java-sdk</name>
892                 </property>
893             </activation>
894             <build>
895                 <plugins>
896                     <plugin>
897                         <groupId>org.apache.maven.plugins</groupId>
898                         <artifactId>maven-antrun-plugin</artifactId>
899                         <version>1.8</version>
900                         <executions>
901                             <execution>
902                                 <phase>initialize</phase>
903                                 <id>ant-create-script</id>
904                                 <configuration>
905                                     <exportAntProperties>true</exportAntProperties>
906                                     <tasks>
907
908                                         <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
909                                         <condition property="is_windows" value="true">
910                                             <os family="windows"/>
911                                         </condition>
912                                         <condition property="isLinux" value="true">
913                                             <os family="unix"/>
914                                         </condition>
915                                         <if>
916                                             <equals arg1="${is_windows}" arg2="true"/>
917                                             <then>
918                                                 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
919                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
920                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
921                                             </then>
922                                             <else>
923                                                 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
924                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
925                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
926                                                 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
927                                             </else>
928                                         </if>
929                                     </tasks>
930                                 </configuration>
931                                 <goals>
932                                     <goal>run</goal>
933                                 </goals>
934                             </execution>
935                         </executions>
936                         <dependencies>
937                             <dependency>
938                                 <groupId>ant-contrib</groupId>
939                                 <artifactId>ant-contrib</artifactId>
940                                 <version>1.0b3</version>
941                                 <exclusions>
942                                     <exclusion>
943                                         <groupId>ant</groupId>
944                                         <artifactId>ant</artifactId>
945                                     </exclusion>
946                                 </exclusions>
947                             </dependency>
948                         </dependencies>
949                     </plugin>
950                     <plugin>
951                         <groupId>io.swagger</groupId>
952                         <artifactId>swagger-codegen-maven-plugin</artifactId>
953                         <version>2.2.1</version>
954                         <executions>
955                             <execution>
956                                 <goals>
957                                     <goal>generate</goal>
958                                 </goals>
959                                 <configuration>
960                                     <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
961                                     <output>${project.build.directory}/generated-sources</output>
962                                     <language>java</language>
963                                     <configOptions>
964                                         <dateLibrary>joda</dateLibrary>
965                                     </configOptions>
966                                     <library>jersey2</library>
967                                     <groupId>${project.groupId}</groupId>
968                                     <artifactId>${project.artifactId}-java-sdk</artifactId>
969                                     <artifactVersion>${project.version}</artifactVersion>
970                                     <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
971                                     <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
972                                     <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
973                                 </configuration>
974                             </execution>
975                         </executions>
976                     </plugin>
977                     <plugin>
978                         <groupId>org.codehaus.mojo</groupId>
979                         <artifactId>exec-maven-plugin</artifactId>
980                         <version>1.5.0</version>
981                         <executions>
982                             <execution>
983                                 <id>swagger-generate-sources</id>
984                                 <phase>generate-sources</phase>
985                                 <goals>
986                                     <goal>exec</goal>
987                                 </goals>
988                                 <configuration>
989                                     <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
990                                 </configuration>
991                             </execution>
992                         </executions>
993                     </plugin>
994                     <plugin>
995                         <groupId>org.apache.maven.plugins</groupId>
996                         <artifactId>maven-clean-plugin</artifactId>
997                         <version>3.0.0</version>
998                         <executions>
999                             <execution>
1000                                 <id>clean-generated-files</id>
1001                                 <phase>generate-sources</phase>
1002                                 <goals>
1003                                     <goal>clean</goal>
1004                                 </goals>
1005                                 <configuration>
1006                                     <filesets>
1007                                         <fileset>
1008                                             <directory>${project.build.directory}/generated-sources</directory>
1009                                         </fileset>
1010                                     </filesets>
1011                                 </configuration>
1012                             </execution>
1013                         </executions>
1014                     </plugin>
1015                 </plugins>
1016             </build>
1017             <dependencies>
1018                 <dependency>
1019                     <groupId>org.onap.msb.swagger-sdk</groupId>
1020                     <artifactId>swagger-sdk</artifactId>
1021                     <version>1.0.0</version>
1022                 </dependency>
1023             </dependencies>
1024         </profile>
1025         <profile>
1026             <!-- http://blog2.vorburger.ch/2016/06/improve-maven-build-speed-with-q.html
1027                  q = http://memory-alpha.wikia.com/wiki/Q ;)
1028
1029                  The Quick profile is used during incremental local development, when you want to "just get that JAR built",
1030                  which is very handy e.g. for fast hot reloading cycles in Karaf with bundle watch.  It (intentionally!) skips
1031                  tests, quality checks etc. which are great and useful to run before finally submitting changes to Gerrit, and
1032                  which all must run on Gerrit, but which are overhead during ongoing fast iterative local development.
1033
1034                  Note that the idea here is that your IDE will already have run quality checks such as e.g. Checkstyle
1035                  while you typed the code anyway.  Similarly, if you wrote a test, you'll probably already have compiled and run it
1036                  from your IDE, so when you want the OSGi bundle JAR for Karaf, ASAP, you typically don't want all that to run again.
1037               -->
1038             <id>q</id>
1039             <properties>
1040                 <skipTests>true</skipTests>
1041                 <!-- But NOT <maven.test.skip>true, as that's for compiling, not running, tests;
1042                      and that's usually quick.  Skipping test compilation with -Pq with maven.test.skip would be
1043                      particularly confusing when used in a project with maven-jar-plugin <goal>test-jar, so don't.)  -->
1044                 <skipIT>true</skipIT>
1045                 <skipITs>true</skipITs>
1046                 <skip.karaf.featureTest>true</skip.karaf.featureTest>
1047                 <jacoco.skip>true</jacoco.skip>
1048                 <maven.javadoc.skip>true</maven.javadoc.skip>
1049                 <maven.source.skip>true</maven.source.skip>
1050                 <checkstyle.skip>true</checkstyle.skip>
1051                 <findbugs.skip>true</findbugs.skip>
1052                 <spotbugs.skip>true</spotbugs.skip>
1053                 <pmd.skip>true</pmd.skip>
1054                 <cpd.skip>true</cpd.skip>
1055                 <maven.site.skip>true</maven.site.skip>
1056                 <invoker.skip>true</invoker.skip>
1057                 <enforcer.skip>true</enforcer.skip>
1058                 <duplicate-finder.skip>true</duplicate-finder.skip>
1059                 <mdsal.skip.verbose>true</mdsal.skip.verbose> <!-- Bug 6236 -->
1060                 <maven.gitcommitid.skip>true</maven.gitcommitid.skip>
1061                 <modernizer.skip>true</modernizer.skip>
1062                 <format.skipExecute>true</format.skipExecute>
1063                 <format.skipValidate>true</format.skipValidate>
1064             </properties>
1065         </profile>
1066         <profile>
1067             <id>sonar-jacoco-aggregate</id>
1068             <activation>
1069                 <property>
1070                     <name>onap.jacoco.aggregateFile</name>
1071                 </property>
1072             </activation>
1073             <build>
1074                 <plugins>
1075                     <plugin>
1076                         <groupId>org.jacoco</groupId>
1077                         <artifactId>jacoco-maven-plugin</artifactId>
1078                         <executions>
1079                             <execution>
1080                                 <id>merge</id>
1081                                 <goals>
1082                                     <goal>merge</goal>
1083                                 </goals>
1084                                 <phase>generate-resources</phase>
1085                                 <configuration>
1086                                     <destFile>${onap.jacoco.aggregateFile}</destFile>
1087                                     <fileSets>
1088                                         <fileSet>
1089                                             <directory>${project.basedir}</directory>
1090                                             <includes>
1091                                                 <include>**/target/code-coverage/*.exec</include>
1092                                             </includes>
1093                                         </fileSet>
1094                                     </fileSets>
1095                                 </configuration>
1096                             </execution>
1097                         </executions>
1098                     </plugin>
1099                 </plugins>
1100             </build>
1101         </profile>
1102         <!-- End of profiles from ONAP oparent -->
1103     </profiles>
1104 </project>