Cleaning up springboot parent poms
[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.2.4.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.2-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.1-SNAPSHOT</ccsdk.cds.version>
88         <ccsdk.sli.core.version>0.7.1-SNAPSHOT</ccsdk.sli.core.version>
89         <ccsdk.sli.adaptors.version>0.7.1-SNAPSHOT</ccsdk.sli.adaptors.version>
90         <ccsdk.sli.northbound.version>0.7.1-SNAPSHOT</ccsdk.sli.northbound.version>
91         <ccsdk.sli.plugins.version>0.7.1-SNAPSHOT</ccsdk.sli.plugins.version>
92         <ccsdk.distribution.version>0.7.1-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.2.4.RELEASE</spring.boot.version>
101         <spring.version>5.2.3.RELEASE</spring.version>
102
103         <!-- Kotlin versions -->
104         <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
105         <kotlin.version>1.3.61</kotlin.version>
106         <kotlin.maven.version>1.3.61</kotlin.maven.version>
107         <kotlin.couroutines.version>1.3.3</kotlin.couroutines.version>
108         <kotlinpoet.version>1.5.0</kotlinpoet.version>
109         <kroto-plus.version>0.5.0</kroto-plus.version>
110         <nats.version>2.6.6</nats.version>
111         <nats.streaming.version>2.2.3</nats.streaming.version>
112         <mockk.version>1.9.3</mockk.version>
113
114         <!-- Managed dependency versions -->
115         <apache.httpcomponents.core.version>4.4.12</apache.httpcomponents.core.version>
116         <apache.httpcomponents.client.version>4.5.10</apache.httpcomponents.client.version>
117         <derby.version>10.14.2.0</derby.version>
118         <eelf.version>1.0.0</eelf.version>
119         <grpc.version>1.25.0</grpc.version>
120         <protobuff.java.version>3.10.0</protobuff.java.version>
121         <protobuff.java.utils.version>3.10.0</protobuff.java.utils.version>
122         <atomix.version>3.1.5</atomix.version>
123         <jersey.version>2.25.1</jersey.version>
124         <junit.version>4.12</junit.version>
125         <logback.version>1.2.3</logback.version>
126         <mariadb.connector.version>2.4.4</mariadb.connector.version>
127         <mariadb4j.version>2.4.0</mariadb4j.version>
128         <slf4j.version>1.7.25</slf4j.version>
129         <testng.version>6.11</testng.version>
130         <tomcat-jdbc.version>9.0.27</tomcat-jdbc.version>
131         <dependency-list.file>direct-dependencies.txt</dependency-list.file>
132     </properties>
133
134     <dependencyManagement>
135         <dependencies>
136             <dependency>
137                 <groupId>org.onap.ccsdk.parent</groupId>
138                 <artifactId>dependencies-bom</artifactId>
139                 <version>1.5.2-SNAPSHOT</version>
140                 <type>pom</type>
141                 <scope>import</scope>
142             </dependency>
143             <dependency>
144                 <groupId>org.onap.ccsdk.sli.core</groupId>
145                 <artifactId>sli-common</artifactId>
146                 <version>${ccsdk.sli.core.version}</version>
147             </dependency>
148
149             <dependency>
150                 <groupId>org.onap.ccsdk.sli.core</groupId>
151                 <artifactId>sli-provider</artifactId>
152                 <version>${ccsdk.sli.core.version}</version>
153             </dependency>
154             <dependency>
155                 <groupId>org.onap.ccsdk.sli.core</groupId>
156                 <artifactId>ccsdk-sli</artifactId>
157                 <version>${ccsdk.sli.core.version}</version>
158                 <type>xml</type>
159                 <classifier>features</classifier>
160             </dependency>
161             <dependency>
162                 <groupId>org.onap.ccsdk.sli.adaptors</groupId>
163                 <artifactId>aai-service-provider</artifactId>
164                 <version>${sdnctl.aai.service.version}</version>
165             </dependency>
166
167             <dependency>
168                 <groupId>org.onap.ccsdk.sli.core</groupId>
169                 <artifactId>dblib-provider</artifactId>
170                 <version>${sdnctl.dblib.version}</version>
171             </dependency>
172             <dependency>
173                 <groupId>junit</groupId>
174                 <artifactId>junit</artifactId>
175                 <version>${junit.version}</version>
176                 <scope>test</scope>
177             </dependency>
178         </dependencies>
179
180     </dependencyManagement>
181
182     <repositories>
183         <repository>
184             <id>onap-public</id>
185             <url>https://nexus.onap.org/content/groups/public</url>
186             <releases>
187                 <enabled>true</enabled>
188                 <updatePolicy>never</updatePolicy>
189             </releases>
190             <snapshots>
191                 <enabled>true</enabled>
192                 <updatePolicy>always</updatePolicy>
193             </snapshots>
194         </repository>
195         <repository>
196             <id>onap-staging</id>
197             <url>https://nexus.onap.org/content/groups/staging</url>
198             <releases>
199                 <enabled>true</enabled>
200                 <updatePolicy>never</updatePolicy>
201             </releases>
202             <snapshots>
203                 <enabled>true</enabled>
204                 <updatePolicy>always</updatePolicy>
205             </snapshots>
206         </repository>
207         <repository>
208             <id>ecomp-release</id>
209             <name>onap-repository-releases</name>
210             <url>https://nexus.onap.org/content/repositories/releases</url>
211             <releases>
212                 <enabled>true</enabled>
213                 <updatePolicy>never</updatePolicy>
214             </releases>
215             <snapshots>
216                 <enabled>false</enabled>
217             </snapshots>
218         </repository>
219         <repository>
220             <id>ecomp-snapshot</id>
221             <name>onap-repository-snapshots</name>
222             <url>https://nexus.onap.org/content/repositories/snapshots</url>
223             <releases>
224                 <enabled>false</enabled>
225             </releases>
226             <snapshots>
227                 <enabled>true</enabled>
228             </snapshots>
229         </repository>
230     </repositories>
231     <pluginRepositories>
232         <pluginRepository>
233             <id>onap-public</id>
234             <url>${onap.nexus.public-url}</url>
235             <releases>
236                 <enabled>true</enabled>
237             </releases>
238             <snapshots>
239                 <enabled>true</enabled>
240             </snapshots>
241         </pluginRepository>
242         <pluginRepository>
243             <id>onap-staging</id>
244             <url>${onap.nexus.staging-url}</url>
245             <releases>
246                 <enabled>true</enabled>
247             </releases>
248             <snapshots>
249                 <enabled>true</enabled>
250             </snapshots>
251         </pluginRepository>
252         <pluginRepository>
253             <id>onap-snapshot</id>
254             <url>${onap.nexus.snapshot-url}</url>
255             <releases>
256                 <enabled>false</enabled>
257             </releases>
258             <snapshots>
259                 <enabled>true</enabled>
260             </snapshots>
261         </pluginRepository>
262         <!-- Black Duck plugin dependencies -->
263         <pluginRepository>
264             <id>JCenter</id>
265             <name>JCenter Repository</name>
266             <url>http://jcenter.bintray.com</url>
267         </pluginRepository>
268
269         <pluginRepository>
270             <id>Restlet</id>
271             <name>Restlet Repository</name>
272             <url>http://maven.restlet.com</url>
273         </pluginRepository>
274     </pluginRepositories>
275
276     <build>
277         <pluginManagement>
278             <plugins>
279                 <!-- Plugins from ONAP oparent -->
280                 <plugin>
281                     <groupId>org.apache.maven.plugins</groupId>
282                     <artifactId>maven-deploy-plugin</artifactId>
283                     <!-- This version supports the "deployAtEnd" parameter -->
284                     <version>2.8</version>
285                     <configuration>
286                         <skip/>
287                     </configuration>
288                 </plugin>
289                 <plugin>
290                     <groupId>org.apache.maven.plugins</groupId>
291                     <artifactId>maven-site-plugin</artifactId>
292                     <version>3.6</version>
293                     <dependencies>
294                         <dependency>
295                             <groupId>org.apache.maven.wagon</groupId>
296                             <artifactId>wagon-webdav-jackrabbit</artifactId>
297                             <version>2.10</version>
298                         </dependency>
299                     </dependencies>
300                 </plugin>
301                 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
302                 <plugin>
303                     <groupId>org.sonarsource.scanner.maven</groupId>
304                     <artifactId>sonar-maven-plugin</artifactId>
305                     <version>${sonar.scanner.version}</version>
306                 </plugin>
307                 <!-- end of plugins from ONAP version (parent of oparent) -->
308
309                 <plugin>
310                     <groupId>org.apache.maven.plugins</groupId>
311                     <artifactId>maven-surefire-plugin</artifactId>
312                     <version>2.22.0</version>
313                     <configuration>
314                         <!-- Sets the VM argument line used when unit tests are run. -->
315                         <argLine>${surefireArgLine}</argLine>
316                         <!-- Excludes integration tests when unit tests are run. -->
317                         <excludes>
318                             <exclude>**/IT*.java</exclude>
319                         </excludes>
320                     </configuration>
321                 </plugin>
322                 <plugin>
323                     <groupId>org.apache.maven.plugins</groupId>
324                     <artifactId>maven-failsafe-plugin</artifactId>
325                     <version>2.22.0</version>
326                     <executions>
327                         <!-- Ensures that both integration-test and verify goals of the Failsafe
328                             Maven plugin are executed. -->
329                         <execution>
330                             <id>integration-tests</id>
331                             <goals>
332                                 <goal>integration-test</goal>
333                                 <goal>verify</goal>
334                             </goals>
335                             <configuration>
336                                 <!-- Sets the VM argument line used when integration tests are run. -->
337                                 <argLine>${failsafeArgLine}</argLine>
338                             </configuration>
339                         </execution>
340                     </executions>
341                 </plugin>
342
343                 <!-- End of plugins from ONAP oparent -->
344                 <plugin>
345                     <groupId>org.codehaus.mojo</groupId>
346                     <artifactId>properties-maven-plugin</artifactId>
347                     <version>1.0.0</version>
348                     <executions>
349                         <execution>
350                             <goals>
351                                 <goal>set-system-properties</goal>
352                             </goals>
353                             <configuration>
354                                 <properties>
355                                     <property>
356                                         <name>maven.wagon.http.ssl.allowall</name>
357                                         <value>${ssl.allowall}</value>
358                                     </property>
359                                     <property>
360                                         <name>maven.wagon.http.ssl.insecure</name>
361                                         <value>${ssl.insecure}</value>
362                                     </property>
363                                 </properties>
364                             </configuration>
365                         </execution>
366                     </executions>
367                 </plugin>
368
369                 <plugin>
370                     <groupId>org.codehaus.mojo</groupId>
371                     <artifactId>versions-maven-plugin</artifactId>
372                     <version>2.5</version>
373                     <configuration>
374                         <processAllModules>true</processAllModules>
375                     </configuration>
376                 </plugin>
377                 <plugin>
378                     <artifactId>maven-scm-plugin</artifactId>
379                     <version>1.8.1</version>
380                     <configuration>
381                         <tag>${project.artifactId}-${project.version}</tag>
382                     </configuration>
383                 </plugin>
384                 <plugin>
385                     <groupId>com.github.ferstl</groupId>
386                     <artifactId>depgraph-maven-plugin</artifactId>
387                     <version>3.3.0</version>
388                     <configuration>
389                         <graphFormat>text</graphFormat>
390                         <outputFileName>${dependency-list.file}</outputFileName>
391                         <outputDirectory>${project.basedir}</outputDirectory>
392                         <transitiveExcludes>*</transitiveExcludes>
393                         <showVersions>true</showVersions>
394                         <showGroupIds>true</showGroupIds>
395                     </configuration>
396                 </plugin>
397             </plugins>
398         </pluginManagement>
399
400         <plugins>
401             <!-- Plugins from oparent version (parent of oparent) -->
402             <plugin>
403                 <groupId>org.apache.maven.plugins</groupId>
404                 <artifactId>maven-deploy-plugin</artifactId>
405             </plugin>
406             <plugin>
407                 <groupId>org.apache.maven.plugins</groupId>
408                 <artifactId>maven-site-plugin</artifactId>
409             </plugin>
410             <plugin>
411                 <groupId>org.apache.maven.plugins</groupId>
412                 <artifactId>maven-enforcer-plugin</artifactId>
413             </plugin>
414             <!-- end of plugins from oparent version (parent of oparent) -->
415
416             <!-- Plugins from oparent -->
417             <plugin>
418                 <artifactId>maven-checkstyle-plugin</artifactId>
419                 <version>2.17</version>
420                 <dependencies>
421                     <dependency>
422                         <groupId>org.onap.oparent</groupId>
423                         <artifactId>checkstyle</artifactId>
424                         <version>1.2.2</version>
425                     </dependency>
426                 </dependencies>
427                 <executions>
428                     <execution>
429                         <id>onap-license</id>
430                         <goals>
431                             <goal>check</goal>
432                         </goals>
433                         <phase>process-sources</phase>
434                         <configuration>
435                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
436                             <includeResources>false</includeResources>
437                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
438                             <includeTestResources>false</includeTestResources>
439                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
440                             <excludes>
441                             </excludes>
442                             <consoleOutput>true</consoleOutput>
443                             <failOnViolation>false</failOnViolation>
444                         </configuration>
445                     </execution>
446                     <execution>
447                         <id>onap-java-style</id>
448                         <goals>
449                             <goal>check</goal>
450                         </goals>
451                         <phase>process-sources</phase>
452                         <configuration>
453                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
454                                 with minor changes -->
455                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
456                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated
457                                 sources directory -->
458                             <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
459                             <includeResources>true</includeResources>
460                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
461                             <includeTestResources>true</includeTestResources>
462                             <excludes>
463                             </excludes>
464                             <consoleOutput>true</consoleOutput>
465                             <failOnViolation>false</failOnViolation>
466                         </configuration>
467                     </execution>
468                 </executions>
469             </plugin>
470             <plugin>
471                 <groupId>org.codehaus.mojo</groupId>
472                 <artifactId>build-helper-maven-plugin</artifactId>
473                 <version>1.12</version>
474             </plugin>
475             <!-- Jacoco / Sonar -->
476             <plugin>
477                 <groupId>org.jacoco</groupId>
478                 <artifactId>jacoco-maven-plugin</artifactId>
479                 <version>${jacoco.version}</version>
480                 <executions>
481                     <execution>
482                         <id>pre-unit-test</id>
483                         <goals>
484                             <goal>prepare-agent</goal>
485                         </goals>
486                         <configuration>
487                             <!-- Sets the path to the file which contains the execution data. -->
488                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
489                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
490                             <propertyName>surefireArgLine</propertyName>
491                         </configuration>
492                     </execution>
493                     <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
494                     <execution>
495                         <id>post-unit-test</id>
496                         <phase>test</phase>
497                         <goals>
498                             <goal>report</goal>
499                         </goals>
500                         <configuration>
501                             <!-- Sets the path to the file which contains the execution data. -->
502                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
503                             <!-- Sets the output directory for the code coverage report. -->
504                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
505                         </configuration>
506                     </execution>
507                     <execution>
508                         <id>pre-integration-test</id>
509                         <phase>pre-integration-test</phase>
510                         <goals>
511                             <goal>prepare-agent</goal>
512                         </goals>
513                         <configuration>
514                             <!-- Sets the path to the file which contains the execution data. -->
515                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
516                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
517                             <propertyName>failsafeArgLine</propertyName>
518                         </configuration>
519                     </execution>
520                     <!-- Ensures that the code coverage report for integration tests after integration tests have been run. -->
521                     <execution>
522                         <id>post-integration-test</id>
523                         <phase>post-integration-test</phase>
524                         <goals>
525                             <goal>report</goal>
526                         </goals>
527                         <configuration>
528                             <!-- Sets the path to the file which contains the execution data. -->
529                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
530                             <!-- Sets the output directory for the code coverage report. -->
531                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
532                         </configuration>
533                     </execution>
534                     <execution>
535                         <id>default-prepare-agent</id>
536                         <goals>
537                             <goal>prepare-agent</goal>
538                         </goals>
539                     </execution>
540                     <execution>
541                         <id>default-report</id>
542                         <phase>prepare-package</phase>
543                         <goals>
544                             <goal>report</goal>
545                         </goals>
546                     </execution>
547                     <execution>
548                         <id>default-check</id>
549                         <goals>
550                             <goal>check</goal>
551                         </goals>
552                         <configuration>
553                             <rules>
554                                 <rule>
555                                     <element>PACKAGE</element>
556                                     <limits>
557                                         <limit>
558                                             <counter>COMPLEXITY</counter>
559                                             <value>COVEREDRATIO</value>
560                                             <minimum>0.0</minimum>
561                                         </limit>
562                                     </limits>
563                                 </rule>
564                             </rules>
565                         </configuration>
566                     </execution>
567                 </executions>
568             </plugin>
569             <plugin>
570                 <groupId>org.apache.maven.plugins</groupId>
571                 <artifactId>maven-surefire-plugin</artifactId>
572             </plugin>
573             <plugin>
574                 <groupId>org.apache.maven.plugins</groupId>
575                 <artifactId>maven-failsafe-plugin</artifactId>
576             </plugin>
577             <!-- end of plugins from oparent -->
578             <plugin>
579                 <groupId>org.apache.maven.plugins</groupId>
580                 <artifactId>maven-javadoc-plugin</artifactId>
581                 <version>2.10.4</version>
582                 <executions>
583                     <execution>
584                         <id>attach-javadocs</id>
585                         <goals>
586                             <goal>jar</goal>
587                         </goals>
588                         <configuration>
589                             <additionalparam>-Xdoclint:none</additionalparam>
590                         </configuration>
591                     </execution>
592                 </executions>
593             </plugin>
594         </plugins>
595     </build>
596
597     <reporting>
598         <plugins>
599             <plugin>
600                 <artifactId>maven-javadoc-plugin</artifactId>
601                 <version>2.10.4</version>
602                 <configuration>
603                     <failOnError>false</failOnError>
604                     <additionalparam>-Xdoclint:none</additionalparam>
605                 </configuration>
606             </plugin>
607             <plugin>
608                 <groupId>org.jacoco</groupId>
609                 <artifactId>jacoco-maven-plugin</artifactId>
610                 <version>${jacoco.version}</version>
611                 <reportSets>
612                     <reportSet>
613                         <reports>
614                             <!-- select non-aggregate reports -->
615                             <report>report</report>
616                         </reports>
617                     </reportSet>
618                 </reportSets>
619             </plugin>
620         </plugins>
621     </reporting>
622
623     <profiles>
624         <!-- Profiles from ONAP oparent -->
625         <profile>
626             <id>generate-json</id>
627             <activation>
628                 <file>
629                     <exists>${swagger-properties}</exists>
630                 </file>
631                 <property>
632                     <name>swagger-sdk.generate-json</name>
633                 </property>
634             </activation>
635             <build>
636                 <plugins>
637                     <plugin>
638                         <groupId>org.codehaus.mojo</groupId>
639                         <artifactId>properties-maven-plugin</artifactId>
640                         <version>1.0.0</version>
641                         <executions>
642                             <execution>
643                                 <phase>initialize</phase>
644                                 <goals>
645                                     <goal>read-project-properties</goal>
646                                 </goals>
647                                 <configuration>
648                                     <files>
649                                         <file>${basedir}/src/main/resources/swagger.properties</file>
650                                     </files>
651                                 </configuration>
652                             </execution>
653                         </executions>
654                     </plugin>
655                     <plugin>
656                         <groupId>com.github.kongchen</groupId>
657                         <artifactId>swagger-maven-plugin</artifactId>
658                         <version>3.1.4</version>
659                         <configuration>
660                             <apiSources>
661                                 <apiSource>
662                                     <locations>${api-rest-package}</locations>
663                                     <schemes>http,https</schemes>
664                                     <host>${api-host-ip}:${api-host-port}</host>
665                                     <basePath>${api-base-path}</basePath>
666                                     <info>
667                                         <title>${api-title}</title>
668                                         <version>${api-version}</version>
669                                         <description>${api-description}</description>
670                                         <license>
671                                             <name>${api-license}</name>
672                                         </license>
673                                     </info>
674                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
675                                 </apiSource>
676                             </apiSources>
677                         </configuration>
678                         <executions>
679                             <execution>
680                                 <phase>compile</phase>
681                                 <goals>
682                                     <goal>generate</goal>
683                                 </goals>
684                             </execution>
685                         </executions>
686                     </plugin>
687                     <plugin>
688                         <groupId>org.apache.maven.plugins</groupId>
689                         <artifactId>maven-install-plugin</artifactId>
690                         <version>2.3.1</version>
691                         <executions>
692                             <execution>
693                                 <id>install-file-id</id>
694                                 <phase>install</phase>
695                                 <goals>
696                                     <goal>install-file</goal>
697                                 </goals>
698                                 <configuration>
699                                     <file>${basedir}/src/main/resources/swagger.json</file>
700                                     <groupId>${project.groupId}</groupId>
701                                     <artifactId>${project.artifactId}-swagger-schema</artifactId>
702                                     <version>${project.version}</version>
703                                     <packaging>json</packaging>
704                                 </configuration>
705                             </execution>
706                         </executions>
707                     </plugin>
708                 </plugins>
709             </build>
710         </profile>
711         <profile>
712             <id>generate-sdk</id>
713             <activation>
714                 <file>
715                     <exists>${swagger-json}</exists>
716                 </file>
717                 <property>
718                     <name>swagger-sdk.generate-java-sdk</name>
719                 </property>
720             </activation>
721             <build>
722                 <plugins>
723                     <plugin>
724                         <groupId>org.apache.maven.plugins</groupId>
725                         <artifactId>maven-antrun-plugin</artifactId>
726                         <version>1.8</version>
727                         <executions>
728                             <execution>
729                                 <phase>initialize</phase>
730                                 <id>ant-create-script</id>
731                                 <configuration>
732                                     <exportAntProperties>true</exportAntProperties>
733                                     <tasks>
734
735                                         <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
736                                         <condition property="is_windows" value="true">
737                                             <os family="windows"/>
738                                         </condition>
739                                         <condition property="isLinux" value="true">
740                                             <os family="unix"/>
741                                         </condition>
742                                         <if>
743                                             <equals arg1="${is_windows}" arg2="true"/>
744                                             <then>
745                                                 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
746                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
747                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
748                                             </then>
749                                             <else>
750                                                 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
751                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
752                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
753                                                 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
754                                             </else>
755                                         </if>
756                                     </tasks>
757                                 </configuration>
758                                 <goals>
759                                     <goal>run</goal>
760                                 </goals>
761                             </execution>
762                         </executions>
763                         <dependencies>
764                             <dependency>
765                                 <groupId>ant-contrib</groupId>
766                                 <artifactId>ant-contrib</artifactId>
767                                 <version>1.0b3</version>
768                                 <exclusions>
769                                     <exclusion>
770                                         <groupId>ant</groupId>
771                                         <artifactId>ant</artifactId>
772                                     </exclusion>
773                                 </exclusions>
774                             </dependency>
775                         </dependencies>
776                     </plugin>
777                     <plugin>
778                         <groupId>io.swagger</groupId>
779                         <artifactId>swagger-codegen-maven-plugin</artifactId>
780                         <version>2.2.1</version>
781                         <executions>
782                             <execution>
783                                 <goals>
784                                     <goal>generate</goal>
785                                 </goals>
786                                 <configuration>
787                                     <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
788                                     <output>${project.build.directory}/generated-sources</output>
789                                     <language>java</language>
790                                     <configOptions>
791                                         <dateLibrary>joda</dateLibrary>
792                                     </configOptions>
793                                     <library>jersey2</library>
794                                     <groupId>${project.groupId}</groupId>
795                                     <artifactId>${project.artifactId}-java-sdk</artifactId>
796                                     <artifactVersion>${project.version}</artifactVersion>
797                                     <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
798                                     <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
799                                     <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
800                                 </configuration>
801                             </execution>
802                         </executions>
803                     </plugin>
804                     <plugin>
805                         <groupId>org.codehaus.mojo</groupId>
806                         <artifactId>exec-maven-plugin</artifactId>
807                         <version>1.5.0</version>
808                         <executions>
809                             <execution>
810                                 <id>swagger-generate-sources</id>
811                                 <phase>generate-sources</phase>
812                                 <goals>
813                                     <goal>exec</goal>
814                                 </goals>
815                                 <configuration>
816                                     <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
817                                 </configuration>
818                             </execution>
819                         </executions>
820                     </plugin>
821                     <plugin>
822                         <groupId>org.apache.maven.plugins</groupId>
823                         <artifactId>maven-clean-plugin</artifactId>
824                         <version>3.0.0</version>
825                         <executions>
826                             <execution>
827                                 <id>clean-generated-files</id>
828                                 <phase>generate-sources</phase>
829                                 <goals>
830                                     <goal>clean</goal>
831                                 </goals>
832                                 <configuration>
833                                     <filesets>
834                                         <fileset>
835                                             <directory>${project.build.directory}/generated-sources</directory>
836                                         </fileset>
837                                     </filesets>
838                                 </configuration>
839                             </execution>
840                         </executions>
841                     </plugin>
842                 </plugins>
843             </build>
844             <dependencies>
845                 <dependency>
846                     <groupId>org.onap.msb.swagger-sdk</groupId>
847                     <artifactId>swagger-sdk</artifactId>
848                     <version>1.0.0</version>
849                 </dependency>
850             </dependencies>
851         </profile>
852         <profile>
853             <!-- http://blog2.vorburger.ch/2016/06/improve-maven-build-speed-with-q.html
854                  q = http://memory-alpha.wikia.com/wiki/Q ;)
855
856                  The Quick profile is used during incremental local development, when you want to "just get that JAR built",
857                  which is very handy e.g. for fast hot reloading cycles in Karaf with bundle watch.  It (intentionally!) skips
858                  tests, quality checks etc. which are great and useful to run before finally submitting changes to Gerrit, and
859                  which all must run on Gerrit, but which are overhead during ongoing fast iterative local development.
860
861                  Note that the idea here is that your IDE will already have run quality checks such as e.g. Checkstyle
862                  while you typed the code anyway.  Similarly, if you wrote a test, you'll probably already have compiled and run it
863                  from your IDE, so when you want the OSGi bundle JAR for Karaf, ASAP, you typically don't want all that to run again.
864               -->
865             <id>q</id>
866             <properties>
867                 <skipTests>true</skipTests>
868                 <!-- But NOT <maven.test.skip>true, as that's for compiling, not running, tests;
869                      and that's usually quick.  Skipping test compilation with -Pq with maven.test.skip would be
870                      particularly confusing when used in a project with maven-jar-plugin <goal>test-jar, so don't.)  -->
871                 <skipIT>true</skipIT>
872                 <skipITs>true</skipITs>
873                 <skip.karaf.featureTest>true</skip.karaf.featureTest>
874                 <jacoco.skip>true</jacoco.skip>
875                 <maven.javadoc.skip>true</maven.javadoc.skip>
876                 <maven.source.skip>true</maven.source.skip>
877                 <checkstyle.skip>true</checkstyle.skip>
878                 <findbugs.skip>true</findbugs.skip>
879                 <spotbugs.skip>true</spotbugs.skip>
880                 <pmd.skip>true</pmd.skip>
881                 <cpd.skip>true</cpd.skip>
882                 <maven.site.skip>true</maven.site.skip>
883                 <invoker.skip>true</invoker.skip>
884                 <enforcer.skip>true</enforcer.skip>
885                 <duplicate-finder.skip>true</duplicate-finder.skip>
886                 <mdsal.skip.verbose>true</mdsal.skip.verbose> <!-- Bug 6236 -->
887                 <maven.gitcommitid.skip>true</maven.gitcommitid.skip>
888                 <modernizer.skip>true</modernizer.skip>
889                 <format.skipExecute>true</format.skipExecute>
890                 <format.skipValidate>true</format.skipValidate>
891             </properties>
892         </profile>
893         <profile>
894             <id>sonar-jacoco-aggregate</id>
895             <activation>
896                 <property>
897                     <name>onap.jacoco.aggregateFile</name>
898                 </property>
899             </activation>
900             <build>
901                 <plugins>
902                     <plugin>
903                         <groupId>org.jacoco</groupId>
904                         <artifactId>jacoco-maven-plugin</artifactId>
905                         <executions>
906                             <execution>
907                                 <id>merge</id>
908                                 <goals>
909                                     <goal>merge</goal>
910                                 </goals>
911                                 <phase>generate-resources</phase>
912                                 <configuration>
913                                     <destFile>${onap.jacoco.aggregateFile}</destFile>
914                                     <fileSets>
915                                         <fileSet>
916                                             <directory>${project.basedir}</directory>
917                                             <includes>
918                                                 <include>**/target/code-coverage/*.exec</include>
919                                             </includes>
920                                         </fileSet>
921                                     </fileSets>
922                                 </configuration>
923                             </execution>
924                         </executions>
925                     </plugin>
926                 </plugins>
927             </build>
928         </profile>
929         <!-- End of profiles from ONAP oparent -->
930     </profiles>
931 </project>